Commit b28af35c authored by Georgia Kouveli's avatar Georgia Kouveli Committed by Commit Bot

[arm64] Pair some pushes and don't use jssp as scratch

Also remove some unused code.

Bug: v8:6644
Change-Id: Id0021b397f366d2f26e990750c4b8c33f0c1cd81
Reviewed-on: https://chromium-review.googlesource.com/806836Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#49868}
parent 7ffc331d
......@@ -462,8 +462,12 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// Retrieve the handler context, SP and FP.
__ Mov(cp, Operand(pending_handler_context_address));
__ Ldr(cp, MemOperand(cp));
__ Mov(jssp, Operand(pending_handler_sp_address));
__ Ldr(jssp, MemOperand(jssp));
{
UseScratchRegisterScope temps(masm);
Register scratch = temps.AcquireX();
__ Mov(scratch, Operand(pending_handler_sp_address));
__ Ldr(jssp, MemOperand(scratch));
}
__ Mov(csp, jssp);
__ Mov(fp, Operand(pending_handler_fp_address));
__ Ldr(fp, MemOperand(fp));
......
......@@ -1140,22 +1140,6 @@ void MacroAssembler::SmiUntagToFloat(VRegister dst, Register src) {
Scvtf(dst, src, kSmiShift);
}
void MacroAssembler::SmiTagAndPush(Register src) {
STATIC_ASSERT((static_cast<unsigned>(kSmiShift) == kWRegSizeInBits) &&
(static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits) &&
(kSmiTag == 0));
Push(src.W(), wzr);
}
void MacroAssembler::SmiTagAndPush(Register src1, Register src2) {
STATIC_ASSERT((static_cast<unsigned>(kSmiShift) == kWRegSizeInBits) &&
(static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits) &&
(kSmiTag == 0));
Push(src1.W(), wzr, src2.W(), wzr);
}
void TurboAssembler::JumpIfSmi(Register value, Label* smi_label,
Label* not_smi_label) {
STATIC_ASSERT((kSmiTagSize == 1) && (kSmiTag == 0));
......
......@@ -2976,11 +2976,9 @@ void TurboAssembler::CallRecordWriteStub(
Register fp_mode_parameter(callable.descriptor().GetRegisterParameter(
RecordWriteDescriptor::kFPMode));
Push(object);
Push(address);
Push(object, address);
Pop(slot_parameter);
Pop(object_parameter);
Pop(slot_parameter, object_parameter);
Mov(isolate_parameter, ExternalReference::isolate_address(isolate()));
Move(remembered_set_parameter, Smi::FromEnum(remembered_set_action));
......
......@@ -1752,10 +1752,6 @@ class MacroAssembler : public TurboAssembler {
inline void SmiUntagToDouble(VRegister dst, Register src);
inline void SmiUntagToFloat(VRegister dst, Register src);
// Tag and push in one step.
inline void SmiTagAndPush(Register src);
inline void SmiTagAndPush(Register src1, Register src2);
inline void JumpIfNotSmi(Register value, Label* not_smi_label);
inline void JumpIfBothSmi(Register value1, Register value2,
Label* both_smi_label,
......
......@@ -336,14 +336,14 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
if (must_save_lr_) {
// We need to save and restore lr if the frame was elided.
__ Push(lr);
__ Push(lr, padreg);
unwinding_info_writer_->MarkLinkRegisterOnTopOfStack(__ pc_offset(),
__ StackPointer());
}
__ CallRecordWriteStub(object_, scratch1_, remembered_set_action,
save_fp_mode);
if (must_save_lr_) {
__ Pop(lr);
__ Pop(padreg, lr);
unwinding_info_writer_->MarkPopLinkRegisterFromTopOfStack(__ pc_offset());
}
}
......
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