Index: test/cctest/test-asm-validator.cc |
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/test-asm-validator.cc |
index 967d0b10f3b1a156b1cf6e5324d62df3d7fc5772..bec68d6b7bdbc37c50e49341eb65662ee10b4c73 100644 |
--- a/test/cctest/test-asm-validator.cc |
+++ b/test/cctest/test-asm-validator.cc |
@@ -2366,3 +2366,25 @@ TEST(StoreFloatFromDouble) { |
} |
CHECK_FUNC_TYPES_END |
} |
+ |
+TEST(NegateDouble) { |
+ CHECK_FUNC_TYPES_BEGIN( |
+ "function bar() { var x = 0.0; x = -x; }\n" |
+ "function foo() { bar(); }") { |
+ CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) { |
+ CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) { |
+ CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
+ CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
+ } |
+ CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) { |
+ CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
+ CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
+ CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
+ CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
+ } |
+ } |
+ } |
+ CHECK_SKIP(); |
+ } |
+ CHECK_FUNC_TYPES_END |
+} |