Commit f97f266d authored by Mu Tao's avatar Mu Tao Committed by Commit Bot

[mips][wasm] Implement patching of far jump table

Port 0a8ddb13

Original Commit Message:

    If the jump is too large for a near jump, we patch the far jump table
    instead, and patch the (near) jump table to jump to the far jump table
    slot.

Change-Id: Id9f12dee885b369a4946642301720d110dfe4f31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803641
Auto-Submit: Mu Tao <pamilty@gmail.com>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63781}
parent bb0d4eda
......@@ -234,14 +234,20 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
for (int i = 0; i < nop_bytes; i += kInstrSize) nop();
}
void JumpTableAssembler::EmitJumpSlot(Address target) {
bool JumpTableAssembler::EmitJumpSlot(Address target) {
Jump(target, RelocInfo::NONE);
return true;
}
void JumpTableAssembler::EmitFarJumpSlot(Address target) {
JumpToInstructionStream(target);
}
// static
void JumpTableAssembler::PatchFarJumpSlot(Address slot, Address target) {
UNREACHABLE();
}
void JumpTableAssembler::NopBytes(int bytes) {
DCHECK_LE(0, bytes);
DCHECK_EQ(0, bytes % kInstrSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment