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

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: I forgot to remove some debug code. Created 4 years, 10 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 9cc15a74f75dfec5b64fc3010aa9f13869886882..0b847db489f1000f010acf965e6eb564eb492afb 100644
--- a/test/cctest/wasm/test-run-wasm-64.cc
+++ b/test/cctest/wasm/test-run-wasm-64.cc
@@ -51,6 +51,29 @@ TEST(Run_WasmI64Xor) {
}
}
// kExprI64Shl:
+#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87
+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 = 0; 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_I64(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_I64(40)));
+ FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
+ }
+}
+#endif
// kExprI64ShrU:
// kExprI64ShrS:
// kExprI64Eq:

Powered by Google App Engine
This is Rietveld 408576698