Commit e5e59323 authored by Yahan Lu's avatar Yahan Lu Committed by Commit Bot

[riscv64]Clean call/jump register

Change-Id: I33d7bdfc14af9ad169c79a3efd6af6ba2f2362c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814726
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: 's avatarBrice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74124}
parent 7c5e99c0
......@@ -1727,12 +1727,12 @@ void Generate_ContinueToBuiltinHelper(MacroAssembler* masm,
sp, BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp));
// Load builtin index (stored as a Smi) and use it to get the builtin start
// address from the builtins table.
__ Pop(t0);
__ Pop(t6);
__ Add64(sp, sp,
Operand(BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp));
__ Pop(ra);
__ LoadEntryFromBuiltinIndex(t0);
__ Jump(t0);
__ LoadEntryFromBuiltinIndex(t6);
__ Jump(t6);
}
} // namespace
......@@ -3476,9 +3476,9 @@ void Generate_DeoptimizationEntry(MacroAssembler* masm,
}
}
__ pop(t3); // Get continuation, leave pc on stack.
__ pop(t6); // Get continuation, leave pc on stack.
__ pop(ra);
__ Jump(t3);
__ Jump(t6);
__ stop();
}
......
......@@ -4584,12 +4584,10 @@ void TurboAssembler::ResetSpeculationPoisonRegister() {
void TurboAssembler::CallForDeoptimization(Builtins::Name target, int,
Label* exit, DeoptimizeKind kind,
Label* ret, Label*) {
UseScratchRegisterScope temps(this);
BlockTrampolinePoolScope block_trampoline_pool(this);
Register scratch = temps.Acquire();
Ld(scratch,
Ld(t6,
MemOperand(kRootRegister, IsolateData::builtin_entry_slot_offset(target)));
Call(scratch);
Call(t6);
DCHECK_EQ(SizeOfCodeGeneratedSince(exit),
(kind == DeoptimizeKind::kLazy)
? Deoptimizer::kLazyDeoptExitSize
......
......@@ -337,7 +337,7 @@ constexpr Register kJavaScriptCallTargetRegister = kJSFunctionRegister;
constexpr Register kJavaScriptCallNewTargetRegister = a3;
constexpr Register kJavaScriptCallExtraArg1Register = a2;
constexpr Register kOffHeapTrampolineRegister = t3;
constexpr Register kOffHeapTrampolineRegister = t6;
constexpr Register kRuntimeCallFunctionRegister = a1;
constexpr Register kRuntimeCallArgCountRegister = a0;
constexpr Register kRuntimeCallArgvRegister = a2;
......
......@@ -611,8 +611,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
Address wasm_code = static_cast<Address>(constant.ToInt64());
__ Call(wasm_code, constant.rmode());
} else {
__ Add64(kScratchReg, i.InputRegister(0), 0);
__ Call(kScratchReg);
__ Add64(t6, i.InputRegister(0), 0);
__ Call(t6);
}
RecordCallPosition(instr);
frame_access_state()->ClearSPDelta();
......
......@@ -2557,8 +2557,8 @@ void LiftoffAssembler::CallIndirect(const ValueKindSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
if (target == no_reg) {
pop(kScratchReg);
Call(kScratchReg);
pop(t6);
Call(t6);
} else {
Call(target);
}
......@@ -2566,8 +2566,8 @@ void LiftoffAssembler::CallIndirect(const ValueKindSig* sig,
void LiftoffAssembler::TailCallIndirect(Register target) {
if (target == no_reg) {
Pop(kScratchReg);
Jump(kScratchReg);
Pop(t6);
Jump(t6);
} else {
Jump(target);
}
......
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