diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc index 198ba0971d..f60a02d7f3 100644 --- a/src/builtins/s390/builtins-s390.cc +++ b/src/builtins/s390/builtins-s390.cc @@ -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); diff --git a/src/s390/macro-assembler-s390.h b/src/s390/macro-assembler-s390.h index 98f8bb6e03..62179f7db6 100644 --- a/src/s390/macro-assembler-s390.h +++ b/src/s390/macro-assembler-s390.h @@ -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 diff --git a/src/wasm/jump-table-assembler.cc b/src/wasm/jump-table-assembler.cc index 9e64f1679c..bf048f8fd3 100644 --- a/src/wasm/jump-table-assembler.cc +++ b/src/wasm/jump-table-assembler.cc @@ -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