Commit 305b2e0d authored by Farazmand's avatar Farazmand Committed by Commit Bot

PPC/s390: [wasm] No longer copy runtime stubs into each module.

Port a4b19dcc

Original Commit Message:

    This switches from copying entire runtime stubs into each module to only
    having small jump table slots in each module that act as a trampoline to
    the actual embedded builtin representing the runtime stub. This reduces
    the memory footprint of modules.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, miladfar@ca.ibm.com
BUG=
LOG=N

Change-Id: Ibbe5fdf4d926b45582748ae8b15eb316107409dc
Reviewed-on: https://chromium-review.googlesource.com/c/1470455Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59629}
parent a94c91ca
......@@ -146,6 +146,10 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
b(r1); // 2 bytes
}
void JumpTableAssembler::EmitRuntimeStubSlot(Address builtin_target) {
JumpToInstructionStream(builtin_target);
}
void JumpTableAssembler::EmitJumpSlot(Address target) {
mov(r1, Operand(target));
b(r1);
......@@ -191,6 +195,10 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
bctr();
}
void JumpTableAssembler::EmitRuntimeStubSlot(Address builtin_target) {
JumpToInstructionStream(builtin_target);
}
void JumpTableAssembler::EmitJumpSlot(Address target) {
mov(r0, Operand(target));
mtctr(r0);
......
......@@ -130,17 +130,13 @@ class JumpTableAssembler : public MacroAssembler {
static constexpr int kJumpTableSlotSize = 3 * kInstrSize;
static constexpr int kJumpTableStubSlotSize = 6 * kInstrSize;
#elif V8_TARGET_ARCH_S390X
static constexpr int kJumpTableLineSize = 20;
static constexpr int kJumpTableLineSize = 128;
static constexpr int kJumpTableSlotSize = 20;
#elif V8_TARGET_ARCH_S390
static constexpr int kJumpTableLineSize = 14;
static constexpr int kJumpTableSlotSize = 14;
static constexpr int kJumpTableStubSlotSize = 14;
#elif V8_TARGET_ARCH_PPC64
static constexpr int kJumpTableLineSize = 48;
static constexpr int kJumpTableLineSize = 64;
static constexpr int kJumpTableSlotSize = 48;
#elif V8_TARGET_ARCH_PPC
static constexpr int kJumpTableLineSize = 24;
static constexpr int kJumpTableSlotSize = 24;
static constexpr int kJumpTableStubSlotSize = 7 * kInstrSize;
#elif V8_TARGET_ARCH_MIPS
static constexpr int kJumpTableLineSize = 6 * kInstrSize;
static constexpr int kJumpTableSlotSize = 6 * 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