| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4908 | 4908 |
| 4909 #undef __ | 4909 #undef __ |
| 4910 | 4910 |
| 4911 | 4911 |
| 4912 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 4912 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
| 4913 Address pc, | 4913 Address pc, |
| 4914 BackEdgeState target_state, | 4914 BackEdgeState target_state, |
| 4915 Code* replacement_code) { | 4915 Code* replacement_code) { |
| 4916 // Turn the jump into a nop. | 4916 // Turn the jump into a nop. |
| 4917 Address branch_address = pc - 3 * kInstructionSize; | 4917 Address branch_address = pc - 3 * kInstructionSize; |
| 4918 PatchingAssembler patcher(branch_address, 1); | 4918 PatchingAssembler patcher(unoptimized_code->GetIsolate(), branch_address, 1); |
| 4919 | 4919 |
| 4920 DCHECK(Instruction::Cast(branch_address) | 4920 DCHECK(Instruction::Cast(branch_address) |
| 4921 ->IsNop(Assembler::INTERRUPT_CODE_NOP) || | 4921 ->IsNop(Assembler::INTERRUPT_CODE_NOP) || |
| 4922 (Instruction::Cast(branch_address)->IsCondBranchImm() && | 4922 (Instruction::Cast(branch_address)->IsCondBranchImm() && |
| 4923 Instruction::Cast(branch_address)->ImmPCOffset() == | 4923 Instruction::Cast(branch_address)->ImmPCOffset() == |
| 4924 6 * kInstructionSize)); | 4924 6 * kInstructionSize)); |
| 4925 | 4925 |
| 4926 switch (target_state) { | 4926 switch (target_state) { |
| 4927 case INTERRUPT: | 4927 case INTERRUPT: |
| 4928 // <decrement profiling counter> | 4928 // <decrement profiling counter> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5001 } | 5001 } |
| 5002 | 5002 |
| 5003 return INTERRUPT; | 5003 return INTERRUPT; |
| 5004 } | 5004 } |
| 5005 | 5005 |
| 5006 | 5006 |
| 5007 } // namespace internal | 5007 } // namespace internal |
| 5008 } // namespace v8 | 5008 } // namespace v8 |
| 5009 | 5009 |
| 5010 #endif // V8_TARGET_ARCH_ARM64 | 5010 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |