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

Port 4cbec82cbe

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/1273825
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56536}
This commit is contained in:
Junliang Yan 2018-10-10 12:56:01 -04:00 committed by Commit Bot
parent a19044e243
commit bc2d6ccf91
3 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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

View File

@ -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