[maglev][arm64] Fix InterruptBudget IRs

Use a temporary for feedback cell, since if the `amount` is big enough,
the macro instructions Add/Sub might need a temporary register
as well.

Bug: v8:7700
Change-Id: I2930f525ab3bf7d92fc1a47d9c483577c6186400
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4135889
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85096}
This commit is contained in:
Victor Gomes 2023-01-04 16:06:23 +01:00 committed by V8 LUCI CQ
parent d201f32e50
commit 203d9c8cb6

View File

@ -1679,11 +1679,13 @@ void GeneratorStore::GenerateCode(MaglevAssembler* masm,
FieldMemOperand(generator, JSGeneratorObject::kInputOrDebugPosOffset)); FieldMemOperand(generator, JSGeneratorObject::kInputOrDebugPosOffset));
} }
void IncreaseInterruptBudget::SetValueLocationConstraints() {} void IncreaseInterruptBudget::SetValueLocationConstraints() {
set_temporaries_needed(1);
}
void IncreaseInterruptBudget::GenerateCode(MaglevAssembler* masm, void IncreaseInterruptBudget::GenerateCode(MaglevAssembler* masm,
const ProcessingState& state) { const ProcessingState& state) {
UseScratchRegisterScope temps(masm); UseScratchRegisterScope temps(masm);
Register feedback_cell = temps.AcquireX(); Register feedback_cell = general_temporaries().PopFirst();
Register budget = temps.AcquireW(); Register budget = temps.AcquireW();
__ Ldr(feedback_cell, __ Ldr(feedback_cell,
MemOperand(fp, StandardFrameConstants::kFunctionOffset)); MemOperand(fp, StandardFrameConstants::kFunctionOffset));
@ -1698,12 +1700,14 @@ void IncreaseInterruptBudget::GenerateCode(MaglevAssembler* masm,
} }
int ReduceInterruptBudget::MaxCallStackArgs() const { return 1; } int ReduceInterruptBudget::MaxCallStackArgs() const { return 1; }
void ReduceInterruptBudget::SetValueLocationConstraints() {} void ReduceInterruptBudget::SetValueLocationConstraints() {
set_temporaries_needed(1);
}
void ReduceInterruptBudget::GenerateCode(MaglevAssembler* masm, void ReduceInterruptBudget::GenerateCode(MaglevAssembler* masm,
const ProcessingState& state) { const ProcessingState& state) {
{ {
UseScratchRegisterScope temps(masm); UseScratchRegisterScope temps(masm);
Register feedback_cell = temps.AcquireX(); Register feedback_cell = general_temporaries().PopFirst();
Register budget = temps.AcquireW(); Register budget = temps.AcquireW();
__ Ldr(feedback_cell, __ Ldr(feedback_cell,
MemOperand(fp, StandardFrameConstants::kFunctionOffset)); MemOperand(fp, StandardFrameConstants::kFunctionOffset));