Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Unified Diff: test/cctest/wasm/test-run-wasm-64.cc

Issue 2637583002: [wasm] Fix codegen issue for i64.add and i64.sub on ia32 (Closed)
Patch Set: Add test-run-wasm-64.cc tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698