[wasm][test] Extend jump-table stress test to all archs.
This extends the "test-jump-table-assembler" stress test to supported architectures. Note that on both PPC and S390 the tests flushes out the race during jump table patching pretty reliably. Fixing this issue is outside the scope of this change, this just ensures test coverage exists but keeps the test in question disabled. R=clemensh@chromium.org TEST=cctest/test-jump-table-assembler BUG=v8:8018 Change-Id: Ia299ed2a42f9858019627270a25026b53f3628d3 Reviewed-on: https://chromium-review.googlesource.com/c/1478200 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#59738}
This commit is contained in:
parent
48d5f1bce0
commit
4566cb4059
@ -425,6 +425,9 @@
|
||||
# TODO(ppc/s390): implement atomic operations
|
||||
'test-run-wasm-atomics/*': [SKIP],
|
||||
|
||||
# TODO(ppc/s390): support concurrent patching of jump table
|
||||
'test-jump-table-assembler/*': [SKIP],
|
||||
|
||||
}], # 'arch == ppc or arch == ppc64 or arch == s390 or arch == s390x'
|
||||
|
||||
['arch == ppc64', {
|
||||
|
@ -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,20 @@ 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);
|
||||
#else
|
||||
#error Unsupported architecture
|
||||
#endif
|
||||
@ -236,9 +246,6 @@ TEST(JumpTablePatchingStress) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM ||
|
||||
// V8_TARGET_ARCH_ARM64
|
||||
|
||||
#undef __
|
||||
#undef TRACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user