Commit 89115625 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm][arm] Optimize runtime stub slots

This reduces the size per runtime stub slot by using the same sequence
we plan to use for far jumps.
Note that alignment is not an issue here, since runtime stub slots are
never patched.

R=mstarzinger@chromium.org
CC=joey.gouly@arm.com

Bug: v8:9477
Change-Id: Ib8f0f7b4930617b9c16dc54f6773572c70b681c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1784292
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63567}
parent 719bc030
......@@ -77,8 +77,12 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
}
void JumpTableAssembler::EmitRuntimeStubSlot(Address builtin_target) {
JumpToInstructionStream(builtin_target);
CheckConstPool(true, false); // force emit of const pool
// Load from [pc + kInstrSize] to pc. Note that {pc} points two instructions
// after the currently executing one.
ldr_pcrel(pc, -kInstrSize); // 1 instruction
dd(builtin_target); // 4 bytes (== 1 instruction)
STATIC_ASSERT(kInstrSize == kInt32Size);
STATIC_ASSERT(kJumpTableStubSlotSize == 2 * kInstrSize);
}
void JumpTableAssembler::EmitJumpSlot(Address target) {
......
......@@ -168,7 +168,7 @@ class V8_EXPORT_PRIVATE JumpTableAssembler : public MacroAssembler {
static constexpr int kJumpTableLineSize = 3 * kInstrSize;
static constexpr int kJumpTableSlotSize = 3 * kInstrSize;
static constexpr int kLazyCompileTableSlotSize = 5 * kInstrSize;
static constexpr int kJumpTableStubSlotSize = 5 * kInstrSize;
static constexpr int kJumpTableStubSlotSize = 2 * kInstrSize;
#elif V8_TARGET_ARCH_ARM64
static constexpr int kJumpTableLineSize = 1 * kInstrSize;
static constexpr int kJumpTableSlotSize = 1 * 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