Index: test/cctest/wasm/test-run-wasm-asmjs.cc |
diff --git a/test/cctest/wasm/test-run-wasm-asmjs.cc b/test/cctest/wasm/test-run-wasm-asmjs.cc |
index bd80e28f9f7501f0df30a2bdc6d5ce04f351fc30..41871a1ab244ad7078bf0050de66040312aeeda0 100644 |
--- a/test/cctest/wasm/test-run-wasm-asmjs.cc |
+++ b/test/cctest/wasm/test-run-wasm-asmjs.cc |
@@ -39,7 +39,7 @@ uint32_t GetMatchingRelocInfoCount(Handle<Code> code, RelocInfo::Mode rmode) { |
WASM_EXEC_TEST(Int32AsmjsDivS) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32()); |
BUILD(r, WASM_BINOP(kExprI32AsmjsDivS, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
const int32_t kMin = std::numeric_limits<int32_t>::min(); |
@@ -52,7 +52,7 @@ WASM_EXEC_TEST(Int32AsmjsDivS) { |
WASM_EXEC_TEST(Int32AsmjsRemS) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32()); |
BUILD(r, WASM_BINOP(kExprI32AsmjsRemS, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
const int32_t kMin = std::numeric_limits<int32_t>::min(); |
@@ -65,7 +65,7 @@ WASM_EXEC_TEST(Int32AsmjsRemS) { |
WASM_EXEC_TEST(Int32AsmjsDivU) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32()); |
BUILD(r, WASM_BINOP(kExprI32AsmjsDivU, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
const int32_t kMin = std::numeric_limits<int32_t>::min(); |
@@ -78,7 +78,7 @@ WASM_EXEC_TEST(Int32AsmjsDivU) { |
WASM_EXEC_TEST(Int32AsmjsRemU) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32()); |
BUILD(r, WASM_BINOP(kExprI32AsmjsRemU, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
const int32_t kMin = std::numeric_limits<int32_t>::min(); |
@@ -91,7 +91,7 @@ WASM_EXEC_TEST(Int32AsmjsRemU) { |
WASM_EXEC_TEST(I32AsmjsSConvertF32) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Float32()); |
BUILD(r, WASM_UNOP(kExprI32AsmjsSConvertF32, WASM_GET_LOCAL(0))); |
@@ -103,7 +103,7 @@ WASM_EXEC_TEST(I32AsmjsSConvertF32) { |
WASM_EXEC_TEST(I32AsmjsSConvertF64) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<int32_t> r(&module, MachineType::Float64()); |
BUILD(r, WASM_UNOP(kExprI32AsmjsSConvertF64, WASM_GET_LOCAL(0))); |
@@ -115,7 +115,7 @@ WASM_EXEC_TEST(I32AsmjsSConvertF64) { |
WASM_EXEC_TEST(I32AsmjsUConvertF32) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<uint32_t> r(&module, MachineType::Float32()); |
BUILD(r, WASM_UNOP(kExprI32AsmjsUConvertF32, WASM_GET_LOCAL(0))); |
@@ -127,7 +127,7 @@ WASM_EXEC_TEST(I32AsmjsUConvertF32) { |
WASM_EXEC_TEST(I32AsmjsUConvertF64) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<uint32_t> r(&module, MachineType::Float64()); |
BUILD(r, WASM_UNOP(kExprI32AsmjsUConvertF64, WASM_GET_LOCAL(0))); |
@@ -139,7 +139,7 @@ WASM_EXEC_TEST(I32AsmjsUConvertF64) { |
WASM_EXEC_TEST(LoadMemI32_oob_asm) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
int32_t* memory = module.AddMemoryElems<int32_t>(8); |
WasmRunner<int32_t> r(&module, MachineType::Uint32()); |
module.RandomizeMemory(1112); |
@@ -160,7 +160,7 @@ WASM_EXEC_TEST(LoadMemI32_oob_asm) { |
WASM_EXEC_TEST(LoadMemF32_oob_asm) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
float* memory = module.AddMemoryElems<float>(8); |
WasmRunner<float> r(&module, MachineType::Uint32()); |
module.RandomizeMemory(1112); |
@@ -181,7 +181,7 @@ WASM_EXEC_TEST(LoadMemF32_oob_asm) { |
WASM_EXEC_TEST(LoadMemF64_oob_asm) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
double* memory = module.AddMemoryElems<double>(8); |
WasmRunner<double> r(&module, MachineType::Uint32()); |
module.RandomizeMemory(1112); |
@@ -204,7 +204,7 @@ WASM_EXEC_TEST(LoadMemF64_oob_asm) { |
WASM_EXEC_TEST(StoreMemI32_oob_asm) { |
TestingModule module(execution_mode); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
int32_t* memory = module.AddMemoryElems<int32_t>(8); |
WasmRunner<int32_t> r(&module, MachineType::Uint32(), MachineType::Uint32()); |
module.RandomizeMemory(1112); |
@@ -240,7 +240,7 @@ WASM_EXEC_TEST(StoreMemI32_oob_asm) { |
#define INT_LOAD_TEST(OP_TYPE) \ |
TEST(RunWasm_AsmCheckedRelocInfo##OP_TYPE) { \ |
TestingModule module(kExecuteCompiled); \ |
- module.origin = kAsmJsOrigin; \ |
+ module.ChangeOriginToAsmjs(); \ |
WasmRunner<int32_t> r(&module, MachineType::Uint32()); \ |
BUILD(r, WASM_UNOP(OP_TYPE, WASM_GET_LOCAL(0))); \ |
CHECK_EQ(1u, GetMatchingRelocInfoCount(module.instance->function_code[0], \ |
@@ -255,7 +255,7 @@ FOREACH_INT_CHECKED_LOAD_OP(INT_LOAD_TEST) |
#define INT_STORE_TEST(OP_TYPE) \ |
TEST(RunWasm_AsmCheckedRelocInfo##OP_TYPE) { \ |
TestingModule module(kExecuteCompiled); \ |
- module.origin = kAsmJsOrigin; \ |
+ module.ChangeOriginToAsmjs(); \ |
WasmRunner<int32_t> r(&module, MachineType::Uint32(), \ |
MachineType::Uint32()); \ |
BUILD(r, WASM_BINOP(OP_TYPE, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); \ |
@@ -270,7 +270,7 @@ FOREACH_INT_CHECKED_STORE_OP(INT_STORE_TEST) |
TEST(RunWasm_AsmCheckedLoadFloat32RelocInfo) { |
TestingModule module(kExecuteCompiled); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<float> r(&module, MachineType::Uint32()); |
BUILD(r, WASM_UNOP(kExprF32AsmjsLoadMem, WASM_GET_LOCAL(0))); |
@@ -283,7 +283,7 @@ TEST(RunWasm_AsmCheckedLoadFloat32RelocInfo) { |
TEST(RunWasm_AsmCheckedStoreFloat32RelocInfo) { |
TestingModule module(kExecuteCompiled); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<float> r(&module, MachineType::Uint32(), MachineType::Float32()); |
BUILD(r, WASM_BINOP(kExprF32AsmjsStoreMem, WASM_GET_LOCAL(0), |
WASM_GET_LOCAL(1))); |
@@ -297,7 +297,7 @@ TEST(RunWasm_AsmCheckedStoreFloat32RelocInfo) { |
TEST(RunWasm_AsmCheckedLoadFloat64RelocInfo) { |
TestingModule module(kExecuteCompiled); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<double> r(&module, MachineType::Uint32()); |
BUILD(r, WASM_UNOP(kExprF64AsmjsLoadMem, WASM_GET_LOCAL(0))); |
@@ -310,7 +310,7 @@ TEST(RunWasm_AsmCheckedLoadFloat64RelocInfo) { |
TEST(RunWasm_AsmCheckedStoreFloat64RelocInfo) { |
TestingModule module(kExecuteCompiled); |
- module.origin = kAsmJsOrigin; |
+ module.ChangeOriginToAsmjs(); |
WasmRunner<double> r(&module, MachineType::Uint32(), MachineType::Float64()); |
BUILD(r, WASM_BINOP(kExprF64AsmjsStoreMem, WASM_GET_LOCAL(0), |
WASM_GET_LOCAL(1))); |