Commit f859193a authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [deoptimizer] Remove non-fixed-size deopts

Port 0a110021

Original Commit Message:

    All architectures have kSupportsFixedDeoptExitSizes = true, so we can
    remove kSupportsFixedDeoptExitSizes entirely and always have fixed-size
    deopts.

R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: If33d936ea59e6add15b835793637fc50f28d07fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557254Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79657}
parent ba70eaec
......@@ -3277,17 +3277,16 @@ void Generate_DeoptimizationEntry(MacroAssembler* masm,
const int kSavedRegistersAreaSize =
(kNumberOfRegisters * kSystemPointerSize) + kDoubleRegsSize;
__ mov(r5, Operand(Deoptimizer::kFixedExitSizeMarker));
// Get the address of the location in the code object (r6) (return
// address for lazy deoptimization) and compute the fp-to-sp delta in
// register r7.
__ mflr(r6);
__ addi(r7, sp, Operand(kSavedRegistersAreaSize));
__ sub(r7, fp, r7);
__ mflr(r5);
__ addi(r6, sp, Operand(kSavedRegistersAreaSize));
__ sub(r6, fp, r6);
// Allocate a new deoptimizer object.
// Pass six arguments in r3 to r8.
__ PrepareCallCFunction(6, r8);
__ PrepareCallCFunction(5, r8);
__ li(r3, Operand::Zero());
Label context_check;
__ LoadU64(r4,
......@@ -3296,14 +3295,13 @@ void Generate_DeoptimizationEntry(MacroAssembler* masm,
__ LoadU64(r3, MemOperand(fp, StandardFrameConstants::kFunctionOffset));
__ bind(&context_check);
__ li(r4, Operand(static_cast<int>(deopt_kind)));
// r5: bailout id already loaded.
// r6: code address or 0 already loaded.
// r7: Fp-to-sp delta.
__ Move(r8, ExternalReference::isolate_address(isolate));
// r5: code address or 0 already loaded.
// r6: Fp-to-sp delta already loaded.
__ Move(r7, ExternalReference::isolate_address(isolate));
// Call Deoptimizer::New().
{
AllowExternalCallThatCantCauseGC scope(masm);
__ CallCFunction(ExternalReference::new_deoptimizer_function(), 6);
__ CallCFunction(ExternalReference::new_deoptimizer_function(), 5);
}
// Preserve "deoptimizer" object in register r3 and get the input
......
......@@ -3654,19 +3654,18 @@ void Generate_DeoptimizationEntry(MacroAssembler* masm,
static constexpr int kSavedRegistersAreaSize =
(kNumberOfRegisters * kSystemPointerSize) + kDoubleRegsSize;
__ mov(r4, Operand(Deoptimizer::kFixedExitSizeMarker));
// Cleanse the Return address for 31-bit
__ CleanseP(r14);
// Get the address of the location in the code object (r5)(return
// address for lazy deoptimization) and compute the fp-to-sp delta in
// register r6.
__ mov(r5, r14);
__ la(r6, MemOperand(sp, kSavedRegistersAreaSize));
__ SubS64(r6, fp, r6);
__ mov(r4, r14);
__ la(r5, MemOperand(sp, kSavedRegistersAreaSize));
__ SubS64(r5, fp, r5);
// Allocate a new deoptimizer object.
// Pass six arguments in r2 to r7.
__ PrepareCallCFunction(6, r7);
__ PrepareCallCFunction(5, r7);
__ mov(r2, Operand::Zero());
Label context_check;
__ LoadU64(r3,
......@@ -3675,18 +3674,17 @@ void Generate_DeoptimizationEntry(MacroAssembler* masm,
__ LoadU64(r2, MemOperand(fp, StandardFrameConstants::kFunctionOffset));
__ bind(&context_check);
__ mov(r3, Operand(static_cast<int>(deopt_kind)));
// r4: bailout id already loaded.
// r5: code address or 0 already loaded.
// r6: Fp-to-sp delta.
// r4: code address or 0 already loaded.
// r5: Fp-to-sp delta already loaded.
// Parm6: isolate is passed on the stack.
__ Move(r7, ExternalReference::isolate_address(isolate));
__ StoreU64(r7,
__ Move(r6, ExternalReference::isolate_address(isolate));
__ StoreU64(r6,
MemOperand(sp, kStackFrameExtraParamSlot * kSystemPointerSize));
// Call Deoptimizer::New().
{
AllowExternalCallThatCantCauseGC scope(masm);
__ CallCFunction(ExternalReference::new_deoptimizer_function(), 6);
__ CallCFunction(ExternalReference::new_deoptimizer_function(), 5);
}
// Preserve "deoptimizer" object in register r2 and get the input
......
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