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

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

Issue 1655883002: [wasm] Initial commit for the Int64Reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Initialize replacement array Created 4 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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index 088f9fc9e35dc6127e0937c141c491d97ade0cfc..10152471e522e201711ef1fabd31080193f6ca5e 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -116,6 +116,23 @@ TEST(Run_WasmInt64Const_many) {
}
#endif
+TEST(Run_WasmI32ConvertI64) {
+ FOR_INT64_INPUTS(i) {
+ WasmRunner<int32_t> r;
+ BUILD(r, WASM_I32_CONVERT_I64(WASM_I64(*i)));
+ CHECK_EQ(static_cast<int32_t>(*i), r.Call());
+ }
+}
+
+TEST(Run_WasmI64AndConstants) {
+ FOR_INT64_INPUTS(i) {
+ FOR_INT64_INPUTS(j) {
+ WasmRunner<int32_t> r;
+ BUILD(r, WASM_I32_CONVERT_I64(WASM_I64_AND(WASM_I64(*i), WASM_I64(*j))));
+ CHECK_EQ(static_cast<int32_t>(*i & *j), r.Call());
+ }
+ }
+}
TEST(Run_WasmInt32Param0) {
WasmRunner<int32_t> r(MachineType::Int32());
@@ -216,7 +233,6 @@ void TestInt32Binop(WasmOpcode opcode, int32_t expected, int32_t a, int32_t b) {
}
}
-
TEST(Run_WasmInt32Binops) {
TestInt32Binop(kExprI32Add, 88888888, 33333333, 55555555);
TestInt32Binop(kExprI32Sub, -1111111, 7777777, 8888888);
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698