Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/a64/deoptimizer-a64.cc

Issue 146213004: A64: Synchronize with r16849. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/cpu-a64.cc ('k') | src/a64/full-codegen-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/a64/cpu-a64.cc ('k') | src/a64/full-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698