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: |