Index: test/cctest/wasm/test-run-wasm-64.cc |
diff --git a/test/cctest/wasm/test-run-wasm-64.cc b/test/cctest/wasm/test-run-wasm-64.cc |
index e217bb8e71e09db7e09ac4f5afd08634e2427ced..ff1bdc96ac90b21cbf1b619717a545c4dfa22617 100644 |
--- a/test/cctest/wasm/test-run-wasm-64.cc |
+++ b/test/cctest/wasm/test-run-wasm-64.cc |
@@ -136,6 +136,16 @@ WASM_EXEC_TEST(I64Add) { |
} |
} |
+WASM_EXEC_TEST(I64AddRegress5800) { |
Mircea Trofin
2017/01/18 21:01:56
Elsewhere in cctest, we appear to have the naming
Eric Holk
2017/01/18 21:20:50
Done.
|
+ REQUIRE(I64Add); |
+ WasmRunner<int32_t> r(execution_mode); |
+ BUILD(r, WASM_BLOCK(WASM_BR_IF(0, WASM_I64_EQZ(WASM_I64_ADD( |
+ WASM_I64V(0), WASM_I64V(0x100000000)))), |
Mircea Trofin
2017/01/18 21:01:56
add comment explaining why you picked 0x100000000
Eric Holk
2017/01/18 21:20:50
Done.
|
+ WASM_RETURN1(WASM_I32V(0))), |
+ WASM_I32V(0)); |
+ CHECK_EQ(0, r.Call()); |
+} |
+ |
WASM_EXEC_TEST(I64Sub) { |
REQUIRE(I64Sub); |
WasmRunner<int64_t, int64_t, int64_t> r(execution_mode); |
@@ -145,6 +155,16 @@ WASM_EXEC_TEST(I64Sub) { |
} |
} |
+WASM_EXEC_TEST(I64SubRegress5800) { |
+ REQUIRE(I64Add); |
+ WasmRunner<int32_t> r(execution_mode); |
+ BUILD(r, WASM_BLOCK(WASM_BR_IF(0, WASM_I64_EQZ(WASM_I64_SUB( |
+ WASM_I64V(0), WASM_I64V(0x100000000)))), |
+ WASM_RETURN1(WASM_I32V(0))), |
+ WASM_I32V(0)); |
+ CHECK_EQ(0, r.Call()); |
+} |
+ |
WASM_EXEC_TEST(I64AddUseOnlyLowWord) { |
REQUIRE(I64Add); |
REQUIRE(I32ConvertI64); |