| 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..c06a07c467e936155f97e7ab86808cac3d696b98 100644
|
| --- a/test/cctest/wasm/test-run-wasm.cc
|
| +++ b/test/cctest/wasm/test-run-wasm.cc
|
| @@ -2473,6 +2473,45 @@ 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(11), WASM_I64(12), WASM_I32(13),
|
| + WASM_I32_CONVERT_I64(WASM_I64(14)), WASM_I64(15), WASM_I64(16),
|
| + WASM_I64(17), WASM_I64(18), WASM_I64(19), WASM_I64(20),
|
| + WASM_I64(21), WASM_I64(22), WASM_I64(23), WASM_I64(24),
|
| + WASM_I64(25), WASM_I64(26), WASM_I64(27), WASM_I64(28),
|
| + WASM_I64(29))));
|
| +
|
| + CHECK_EQ(i + 11, 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;
|
|
|