| Index: src/a64/deoptimizer-a64.cc
|
| diff --git a/src/a64/deoptimizer-a64.cc b/src/a64/deoptimizer-a64.cc
|
| index 86fbd7433f04143cc4e3c45b3c5b0bcd11b830db..a17545ce410fca1719beafa03308bc19cb8ca0fc 100644
|
| --- a/src/a64/deoptimizer-a64.cc
|
| +++ b/src/a64/deoptimizer-a64.cc
|
| @@ -80,75 +80,6 @@ void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
| }
|
|
|
|
|
| -// The back edge bookkeeping code matches the pattern:
|
| -//
|
| -// <decrement profiling counter>
|
| -// .. .. .. .. b.pl ok
|
| -// .. .. .. .. ldr x16, pc+<interrupt stub address>
|
| -// .. .. .. .. blr x16
|
| -// ok-label
|
| -//
|
| -// We patch the code to the following form:
|
| -//
|
| -// <decrement profiling counter>
|
| -// .. .. .. .. mov x0, x0 (NOP)
|
| -// .. .. .. .. ldr x16, pc+<on-stack replacement address>
|
| -// .. .. .. .. blr x16
|
| -void Deoptimizer::PatchInterruptCodeAt(Code* unoptimized_code,
|
| - Address pc_after,
|
| - Code* replacement_code) {
|
| - // Turn the jump into a nop.
|
| - Instruction* jump = Instruction::Cast(pc_after)->preceding(3);
|
| - PatchingAssembler patcher(jump, 1);
|
| - patcher.nop(Assembler::INTERRUPT_CODE_NOP);
|
| -
|
| - // Replace the call address.
|
| - Instruction* load = Instruction::Cast(pc_after)->preceding(2);
|
| - Address interrupt_address_pointer =
|
| - reinterpret_cast<Address>(load) + load->ImmPCOffset();
|
| - Memory::uint64_at(interrupt_address_pointer) =
|
| - reinterpret_cast<uint64_t>(replacement_code->entry());
|
| -
|
| - unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch(
|
| - unoptimized_code, pc_after - 2 * kInstructionSize, replacement_code);
|
| -}
|
| -
|
| -
|
| -void Deoptimizer::RevertInterruptCodeAt(Code* unoptimized_code,
|
| - Address pc_after,
|
| - Code* interrupt_code) {
|
| - // Turn the nop into a jump.
|
| - Instruction* jump = Instruction::Cast(pc_after)->preceding(3);
|
| - PatchingAssembler patcher(jump, 1);
|
| - patcher.b(6, pl); // The ok label is 6 instructions later.
|
| -
|
| - // Replace the call address.
|
| - Instruction* load = Instruction::Cast(pc_after)->preceding(2);
|
| - Address interrupt_address_pointer =
|
| - reinterpret_cast<Address>(load) + load->ImmPCOffset();
|
| - Memory::uint64_at(interrupt_address_pointer) =
|
| - reinterpret_cast<uint64_t>(interrupt_code->entry());
|
| -
|
| - interrupt_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch(
|
| - unoptimized_code, pc_after - 2 * kInstructionSize, interrupt_code);
|
| -}
|
| -
|
| -
|
| -#ifdef DEBUG
|
| -Deoptimizer::InterruptPatchState Deoptimizer::GetInterruptPatchState(
|
| - Isolate* isolate,
|
| - Code* unoptimized_code,
|
| - Address pc_after) {
|
| - // TODO(jbramley): There should be some extra assertions here (as in the ARM
|
| - // back-end), but this function is gone in bleeding_edge so it might not
|
| - // matter anyway.
|
| - Instruction* jump_or_nop = Instruction::Cast(pc_after)->preceding(3);
|
| - return jump_or_nop->IsNop(Assembler::INTERRUPT_CODE_NOP) ? PATCHED_FOR_OSR
|
| - : NOT_PATCHED;
|
| -}
|
| -#endif
|
| -
|
| -
|
| void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) {
|
| // Set the register values. The values are not important as there are no
|
| // callee saved registers in JavaScript frames, so all registers are
|
|
|