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

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

Issue 1756863002: [wasm] Int64Lowering of I64Shl on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Forgot to turn off the test for arm. Created 4 years, 9 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
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62107bda2f91a53c4a8fad7401e7e55bb21284b0..eea441b4ae09eb33f28f54d85805ff9672a5b301 100644
--- a/test/cctest/wasm/test-run-wasm-64.cc
+++ b/test/cctest/wasm/test-run-wasm-64.cc
@@ -51,6 +51,39 @@ TEST(Run_WasmI64Xor) {
}
}
// kExprI64Shl:
+#if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 && !V8_TARGET_ARCH_ARM
+TEST(Run_WasmI64Shl) {
+ {
+ WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
+ BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ FOR_UINT64_INPUTS(i) {
+ for (int64_t j = 1; j < 64; j++) {
+ CHECK_EQ(*i << j, r.Call(*i, j));
+ }
+ }
+ }
+ {
+ WasmRunner<int64_t> r(MachineType::Int64());
+ BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(0)));
+ FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 0, r.Call(*i)); }
+ }
+ {
+ WasmRunner<int64_t> r(MachineType::Int64());
+ BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(32)));
+ FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 32, r.Call(*i)); }
+ }
+ {
+ WasmRunner<int64_t> r(MachineType::Int64());
+ BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(20)));
+ FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 20, r.Call(*i)); }
+ }
+ {
+ WasmRunner<int64_t> r(MachineType::Int64());
+ BUILD(r, WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_I64V_1(40)));
+ FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
+ }
+}
+#endif
// kExprI64ShrU:
// kExprI64ShrS:
// kExprI64Eq:
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698