OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } else { | 52 } else { |
53 object_pool_.AddObject(vacant, kNotPatchable); | 53 object_pool_.AddObject(vacant, kNotPatchable); |
54 } | 54 } |
55 | 55 |
56 if (stub_code->CallToRuntime_entry() != NULL) { | 56 if (stub_code->CallToRuntime_entry() != NULL) { |
57 object_pool_.AddExternalLabel( | 57 object_pool_.AddExternalLabel( |
58 &stub_code->CallToRuntimeLabel(), kNotPatchable); | 58 &stub_code->CallToRuntimeLabel(), kNotPatchable); |
59 } else { | 59 } else { |
60 object_pool_.AddObject(vacant, kNotPatchable); | 60 object_pool_.AddObject(vacant, kNotPatchable); |
61 } | 61 } |
62 | |
63 // Create fixed object pool entries for debugger stubs. | |
64 if (stub_code->ICCallBreakpoint_entry() != NULL) { | |
65 intptr_t index = | |
66 object_pool_.AddExternalLabel(&stub_code->ICCallBreakpointLabel(), | |
67 kNotPatchable); | |
68 ASSERT(index == kICCallBreakpointCPIndex); | |
69 } else { | |
70 object_pool_.AddObject(vacant, kNotPatchable); | |
71 } | |
72 if (stub_code->ClosureCallBreakpoint_entry() != NULL) { | |
73 intptr_t index = object_pool_.AddExternalLabel( | |
74 &stub_code->ClosureCallBreakpointLabel(), kNotPatchable); | |
75 ASSERT(index == kClosureCallBreakpointCPIndex); | |
76 } else { | |
77 object_pool_.AddObject(vacant, kNotPatchable); | |
78 } | |
79 if (stub_code->RuntimeCallBreakpoint_entry() != NULL) { | |
80 intptr_t index = object_pool_.AddExternalLabel( | |
81 &stub_code->RuntimeCallBreakpointLabel(), kNotPatchable); | |
82 ASSERT(index == kRuntimeCallBreakpointCPIndex); | |
83 } else { | |
84 object_pool_.AddObject(vacant, kNotPatchable); | |
85 } | |
86 } | 62 } |
87 } | 63 } |
88 | 64 |
89 | 65 |
90 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { | 66 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { |
91 ASSERT(Utils::IsAligned(data, 4)); | 67 ASSERT(Utils::IsAligned(data, 4)); |
92 ASSERT(Utils::IsAligned(length, 4)); | 68 ASSERT(Utils::IsAligned(length, 4)); |
93 const uword end = data + length; | 69 const uword end = data + length; |
94 while (data < end) { | 70 while (data < end) { |
95 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction; | 71 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction; |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 add(base, array, Operand(index, LSL, shift)); | 1462 add(base, array, Operand(index, LSL, shift)); |
1487 } | 1463 } |
1488 const OperandSize size = Address::OperandSizeFor(cid); | 1464 const OperandSize size = Address::OperandSizeFor(cid); |
1489 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); | 1465 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); |
1490 return Address(base, offset, Address::Offset, size); | 1466 return Address(base, offset, Address::Offset, size); |
1491 } | 1467 } |
1492 | 1468 |
1493 } // namespace dart | 1469 } // namespace dart |
1494 | 1470 |
1495 #endif // defined TARGET_ARCH_ARM64 | 1471 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |