| Index: src/a64/deoptimizer-a64.cc
|
| diff --git a/src/a64/deoptimizer-a64.cc b/src/a64/deoptimizer-a64.cc
|
| index 1356f3090277eacacf997c1ec1d61cc3ca61933a..be57f21cd0ba37076de13a1749fb90f3f66d4046 100644
|
| --- a/src/a64/deoptimizer-a64.cc
|
| +++ b/src/a64/deoptimizer-a64.cc
|
| @@ -433,29 +433,14 @@ void Deoptimizer::EntryGenerator::Generate() {
|
| Register bailout_id = x2;
|
| __ Peek(bailout_id, kSavedRegistersAreaSize);
|
|
|
| - // Get the address of the location in the code object if possible
|
| - // and compute the fp-to-sp delta.
|
| Register code_object = x3;
|
| Register fp_to_sp = x4;
|
| - if ((type() == EAGER) || (type() == SOFT)) {
|
| - __ Mov(code_object, 0);
|
| - // Correct one word for bailout id.
|
| - __ Add(fp_to_sp,
|
| - masm()->StackPointer(),
|
| - kSavedRegistersAreaSize + (1 * kPointerSize));
|
| - } else if (type() == OSR) {
|
| - __ Mov(code_object, lr);
|
| - // Correct one word for bailout id.
|
| - __ Add(fp_to_sp,
|
| - masm()->StackPointer(),
|
| - kSavedRegistersAreaSize + (1 * kPointerSize));
|
| - } else {
|
| - __ Mov(code_object, lr);
|
| - // Correct two words for bailout id and return address.
|
| - __ Add(fp_to_sp,
|
| - masm()->StackPointer(),
|
| - kSavedRegistersAreaSize + (2 * kPointerSize));
|
| - }
|
| + // Get the address of the location in the code object. This is the return
|
| + // address for lazy deoptimization.
|
| + __ Mov(code_object, lr);
|
| + // Compute the fp-to-sp delta, and correct one word for bailout id.
|
| + __ Add(fp_to_sp, masm()->StackPointer(),
|
| + kSavedRegistersAreaSize + (1 * kPointerSize));
|
| __ Sub(fp_to_sp, fp, fp_to_sp);
|
|
|
| // Allocate a new deoptimizer object.
|
| @@ -500,14 +485,8 @@ void Deoptimizer::EntryGenerator::Generate() {
|
| __ Str(x2, MemOperand(x1, dst_offset));
|
| }
|
|
|
| - // Remove the bailout id, eventually return address, and the saved registers
|
| - // from the stack.
|
| - if ((type() == EAGER) || (type() == SOFT) || (type() == OSR)) {
|
| - __ Drop(1 + (kSavedRegistersAreaSize / kXRegSizeInBytes));
|
| - } else {
|
| - // Also remove return address for lazy deopt.
|
| - __ Drop(2 + (kSavedRegistersAreaSize / kXRegSizeInBytes));
|
| - }
|
| + // Remove the bailout id and the saved registers from the stack.
|
| + __ Drop(1 + (kSavedRegistersAreaSize / kXRegSizeInBytes));
|
|
|
| // Compute a pointer to the unwinding limit in register x2; that is
|
| // the first stack slot not part of the input frame.
|
| @@ -611,12 +590,12 @@ void Deoptimizer::EntryGenerator::Generate() {
|
|
|
| // Size of an entry of the second level deopt table.
|
| // This is the code size generated by GeneratePrologue for one entry.
|
| -const int Deoptimizer::table_entry_size_ = 4 * kInstructionSize;
|
| +const int Deoptimizer::table_entry_size_ = 2 * kInstructionSize;
|
|
|
|
|
| void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
|
| // Create a sequence of deoptimization entries.
|
| - // Note that any registers may be still live.
|
| + // Note that registers are still live when jumping to an entry.
|
| Label done;
|
| {
|
| InstructionAccurateScope scope(masm());
|
| @@ -629,18 +608,6 @@ void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
|
| for (int i = 0; i < count(); i++) {
|
| int start = masm()->pc_offset();
|
| USE(start);
|
| - if ((type() == EAGER) || (type() == SOFT)) {
|
| - // These nops are fillers; all entries must be the same size.
|
| - __ nop();
|
| - __ nop();
|
| - } else {
|
| - // Push lr on the stack.
|
| - // We cannot use Push from the MacroAssembler here since we are in an
|
| - // instruction accurate scope.
|
| - __ sub(csp, jssp, kPointerSize);
|
| - __ str(lr, MemOperand(jssp, -kPointerSize, PreIndex));
|
| - }
|
| -
|
| __ movz(masm()->Tmp0(), i);
|
| __ b(&done);
|
| ASSERT(masm()->pc_offset() - start == table_entry_size_);
|
|
|