diff options
Diffstat (limited to 'deps/v8/src/wasm/jump-table-assembler.cc')
-rw-r--r-- | deps/v8/src/wasm/jump-table-assembler.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/deps/v8/src/wasm/jump-table-assembler.cc b/deps/v8/src/wasm/jump-table-assembler.cc index 029044c005..462e3a4b5a 100644 --- a/deps/v8/src/wasm/jump-table-assembler.cc +++ b/deps/v8/src/wasm/jump-table-assembler.cc @@ -53,7 +53,7 @@ void JumpTableAssembler::NopBytes(int bytes) { #elif V8_TARGET_ARCH_IA32 void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { - mov(edi, func_index); // 5 bytes + mov(kWasmCompileLazyFuncIndexRegister, func_index); // 5 bytes jmp(lazy_compile_target, RelocInfo::NONE); // 5 bytes } @@ -69,10 +69,10 @@ void JumpTableAssembler::NopBytes(int bytes) { #elif V8_TARGET_ARCH_ARM void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { - // Load function index to r4. + // Load function index to a register. // This generates [movw, movt] on ARMv7 and later, [ldr, constant pool marker, // constant] on ARMv6. - Move32BitImmediate(r4, Operand(func_index)); + Move32BitImmediate(kWasmCompileLazyFuncIndexRegister, Operand(func_index)); // EmitJumpSlot emits either [b], [movw, movt, mov] (ARMv7+), or [ldr, // constant]. // In total, this is <=5 instructions on all architectures. @@ -99,7 +99,7 @@ void JumpTableAssembler::NopBytes(int bytes) { #elif V8_TARGET_ARCH_ARM64 void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { - Mov(w8, func_index); // max. 2 instr + Mov(kWasmCompileLazyFuncIndexRegister.W(), func_index); // max. 2 instr Jump(lazy_compile_target, RelocInfo::NONE); // 1 instr } @@ -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 @@ -144,7 +144,7 @@ void JumpTableAssembler::NopBytes(int bytes) { #elif V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { - li(t0, func_index); // max. 2 instr + li(kWasmCompileLazyFuncIndexRegister, func_index); // max. 2 instr // Jump produces max. 4 instructions for 32-bit platform // and max. 6 instructions for 64-bit platform. Jump(lazy_compile_target, RelocInfo::NONE); @@ -165,8 +165,8 @@ void JumpTableAssembler::NopBytes(int bytes) { #elif V8_TARGET_ARCH_PPC void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { - // Load function index to r8. max 5 instrs - mov(r15, Operand(func_index)); + // Load function index to register. max 5 instrs + mov(kWasmCompileLazyFuncIndexRegister, Operand(func_index)); // Jump to {lazy_compile_target}. max 5 instrs mov(r0, Operand(lazy_compile_target)); mtctr(r0); |