Commit 7889803e authored by Yu Yin's avatar Yu Yin Committed by Commit Bot

[mips] Use t9 as the function call register.

on mips, we should use t9 when jump to a ExternalReference, because
the callee function will consider t9 as the function start address.

Change-Id: I56e2bf073fd24b2f3434dfd255d48264bfd0b2cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1826417
Auto-Submit: Yu Yin <xwafish@gmail.com>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63988}
parent cae9aaeb
......@@ -3853,10 +3853,8 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
}
void TurboAssembler::Jump(const ExternalReference& reference) {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
li(scratch, reference);
Jump(scratch);
li(t9, reference);
Jump(t9);
}
void MacroAssembler::JumpIfIsInRange(Register value, unsigned lower_limit,
......
......@@ -4202,10 +4202,8 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
}
void TurboAssembler::Jump(const ExternalReference& reference) {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
li(scratch, reference);
Jump(scratch);
li(t9, reference);
Jump(t9);
}
// Note: To call gcc-compiled C code on mips, you must call through t9.
......
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