Commit bc2d6ccf authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [wasm] Use a name for the lazy compile func index

Port 4cbec82c

Original Commit Message:

    Pure refactoring CL. Introduce a symbolic name for the register
    used to hold the function index when calling the lazy compile stub.
    This makes it easier to see this contract when looking at the
    macro assembler.

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

Change-Id: I320373dfe4734b27b85217a829bf574bc7b90a2d
Reviewed-on: https://chromium-review.googlesource.com/c/1273825Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56536}
parent a19044e2
......@@ -2274,9 +2274,10 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
}
void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
// The function index was put in r7 by the jump table trampoline.
// The function index was put in a register by the jump table trampoline.
// Convert to Smi for the runtime call.
__ SmiTag(r7, r7);
__ SmiTag(kWasmLazyCompileFuncIndexRegister,
kWasmLazyCompileFuncIndexRegister);
{
HardAbortScope hard_abort(masm); // Avoid calls to Abort.
FrameAndConstantPoolScope scope(masm, StackFrame::WASM_COMPILE_LAZY);
......
......@@ -38,6 +38,7 @@ constexpr Register kRuntimeCallFunctionRegister = r3;
constexpr Register kRuntimeCallArgCountRegister = r2;
constexpr Register kRuntimeCallArgvRegister = r4;
constexpr Register kWasmInstanceRegister = r6;
constexpr Register kWasmCompileLazyFuncIndexRegister = r7;
// ----------------------------------------------------------------------------
// Static helper functions
......
......@@ -122,7 +122,7 @@ void JumpTableAssembler::NopBytes(int bytes) {
void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
Address lazy_compile_target) {
// Load function index to r7. 6 bytes
lgfi(r7, Operand(func_index));
lgfi(kWasmCompileLazyFuncIndexRegister, Operand(func_index));
// Jump to {lazy_compile_target}. 6 bytes or 12 bytes
mov(r1, Operand(lazy_compile_target));
b(r1); // 2 bytes
......
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