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

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

Issue 1704033002: [wasm] WasmRunner can run tests with I64 parameters and return value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@new_wasm_runner
Patch Set: remove DCHECK 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
« no previous file with comments | « src/wasm/wasm-module.h ('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 e4f20dd8fc70d7ef861aacba82b2305414e57c61..448cf96507d1f99a7c81fcf2d55900da3f98eab1 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -2473,6 +2473,50 @@ TEST(Run_WasmCallF64StackParameter) {
CHECK_EQ(256.5, result);
}
+TEST(Run_WasmCallI64Parameter) {
+ // Build the target function.
+ LocalType param_types[20];
+ for (int i = 0; i < 20; i++) param_types[i] = kAstI64;
+ param_types[3] = kAstI32;
+ param_types[4] = kAstI32;
+ FunctionSig sig(1, 19, param_types);
+ for (int i = 0; i < 19; i++) {
+ TestingModule module;
+ WasmFunctionCompiler t(&sig);
+ if (i == 2 || i == 3) {
+ continue;
+ } else {
+ BUILD(t, WASM_GET_LOCAL(i));
+ }
+ uint32_t index = t.CompileAndAdd(&module);
+
+ // Build the calling function.
+ WasmRunner<int32_t> r;
+ r.env()->module = &module;
+ BUILD(r,
+ WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION(
+ index, WASM_I64(0xbcd12340000000b), WASM_I64(0xbcd12340000000c),
+ WASM_I32(0xd), WASM_I32_CONVERT_I64(WASM_I64(0xbcd12340000000e)),
+ WASM_I64(0xbcd12340000000f), WASM_I64(0xbcd1234000000010),
+ WASM_I64(0xbcd1234000000011), WASM_I64(0xbcd1234000000012),
+ WASM_I64(0xbcd1234000000013), WASM_I64(0xbcd1234000000014),
+ WASM_I64(0xbcd1234000000015), WASM_I64(0xbcd1234000000016),
+ WASM_I64(0xbcd1234000000017), WASM_I64(0xbcd1234000000018),
+ WASM_I64(0xbcd1234000000019), WASM_I64(0xbcd123400000001a),
+ WASM_I64(0xbcd123400000001b), WASM_I64(0xbcd123400000001c),
+ WASM_I64(0xbcd123400000001d))));
+
+ CHECK_EQ(i + 0xb, r.Call());
+ }
+}
+
+TEST(Run_WasmI64And) {
+ WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
+ BUILD(r, WASM_I64_AND(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ FOR_INT64_INPUTS(i) {
+ FOR_INT64_INPUTS(j) { CHECK_EQ((*i) & (*j), r.Call(*i, *j)); }
+ }
+}
TEST(Run_WasmCallVoid) {
const byte kMemOffset = 8;
« no previous file with comments | « src/wasm/wasm-module.h ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698