diff options
Diffstat (limited to 'deps/v8/test/cctest/wasm/test-jump-table-assembler.cc')
-rw-r--r-- | deps/v8/test/cctest/wasm/test-jump-table-assembler.cc | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/deps/v8/test/cctest/wasm/test-jump-table-assembler.cc b/deps/v8/test/cctest/wasm/test-jump-table-assembler.cc index d8d9e0412e..1472196504 100644 --- a/deps/v8/test/cctest/wasm/test-jump-table-assembler.cc +++ b/deps/v8/test/cctest/wasm/test-jump-table-assembler.cc @@ -24,10 +24,6 @@ namespace wasm { #define __ masm. -// TODO(v8:7424,v8:8018): Extend this test to all architectures. -#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ - V8_TARGET_ARCH_ARM64 - namespace { static volatile int global_stop_bit = 0; @@ -109,6 +105,30 @@ Address GenerateJumpTableThunk( __ Tbnz(scratch, 0, &exit); __ Mov(scratch, Immediate(jump_target, RelocInfo::NONE)); __ Br(scratch); +#elif V8_TARGET_ARCH_PPC64 + __ mov(scratch, Operand(stop_bit_address, RelocInfo::NONE)); + __ LoadP(scratch, MemOperand(scratch)); + __ cmpi(scratch, Operand::Zero()); + __ bne(&exit); + __ mov(scratch, Operand(jump_target, RelocInfo::NONE)); + __ Jump(scratch); +#elif V8_TARGET_ARCH_S390X + __ mov(scratch, Operand(stop_bit_address, RelocInfo::NONE)); + __ LoadP(scratch, MemOperand(scratch)); + __ CmpP(scratch, Operand(0)); + __ bne(&exit); + __ mov(scratch, Operand(jump_target, RelocInfo::NONE)); + __ Jump(scratch); +#elif V8_TARGET_ARCH_MIPS64 + __ li(scratch, Operand(stop_bit_address, RelocInfo::NONE)); + __ Lw(scratch, MemOperand(scratch, 0)); + __ Branch(&exit, ne, scratch, Operand(zero_reg)); + __ Jump(jump_target, RelocInfo::NONE); +#elif V8_TARGET_ARCH_MIPS + __ li(scratch, Operand(stop_bit_address, RelocInfo::NONE)); + __ lw(scratch, MemOperand(scratch, 0)); + __ Branch(&exit, ne, scratch, Operand(zero_reg)); + __ Jump(jump_target, RelocInfo::NONE); #else #error Unsupported architecture #endif @@ -236,9 +256,6 @@ TEST(JumpTablePatchingStress) { } } -#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || - // V8_TARGET_ARCH_ARM64 - #undef __ #undef TRACE |