30 #if V8_TARGET_ARCH_ARM64
39 #define __ ACCESS_MASM(masm)
42 #ifdef ENABLE_DEBUGGER_SUPPORT
43 bool BreakLocationIterator::IsDebugBreakAtReturn() {
44 return Debug::IsDebugBreakAtReturn(rinfo());
48 void BreakLocationIterator::SetDebugBreakAtReturn() {
68 PatchingAssembler patcher(reinterpret_cast<Instruction*>(rinfo()->
pc()), 5);
70 debug_info_->GetIsolate()->debug()->debug_break_return()->entry();
83 patcher.dc64(reinterpret_cast<int64_t>(entry));
87 void BreakLocationIterator::ClearDebugBreakAtReturn() {
89 rinfo()->PatchCode(original_rinfo()->
pc(),
94 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
95 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
96 return rinfo->IsPatchedReturnSequence();
100 bool BreakLocationIterator::IsDebugBreakAtSlot() {
101 ASSERT(IsDebugBreakSlot());
103 return rinfo()->IsPatchedDebugBreakSlotSequence();
107 void BreakLocationIterator::SetDebugBreakAtSlot() {
127 PatchingAssembler patcher(reinterpret_cast<Instruction*>(rinfo()->
pc()), 4);
129 debug_info_->GetIsolate()->debug()->debug_break_slot()->entry();
141 patcher.dc64(reinterpret_cast<int64_t>(entry));
145 void BreakLocationIterator::ClearDebugBreakAtSlot() {
146 ASSERT(IsDebugBreakSlot());
147 rinfo()->PatchCode(original_rinfo()->
pc(),
151 const bool Debug::FramePaddingLayout::kIsSupported =
false;
153 static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
175 ASSERT((object_regs & non_object_regs) == 0);
176 ASSERT((scratch.Bit() & object_regs) == 0);
177 ASSERT((scratch.Bit() & non_object_regs) == 0);
178 ASSERT((masm->TmpList()->list() & (object_regs | non_object_regs)) == 0);
181 CPURegList non_object_list =
183 while (!non_object_list.IsEmpty()) {
185 Register reg = Register(non_object_list.PopLowestIndex());
188 __ Push(reg.W(), wzr);
197 if (object_regs != 0) {
198 __ PushXRegList(object_regs);
202 __ RecordComment(
"// Calling from debug break to runtime - come in - over");
205 __ Mov(x1, ExternalReference::debug_break(masm->isolate()));
211 if (object_regs != 0) {
212 __ PopXRegList(object_regs);
217 while (!non_object_list.IsEmpty()) {
224 Register reg = Register(non_object_list.PopHighestIndex());
225 __ Pop(scratch, reg);
226 __ Bfxil(reg, scratch, 32, 32);
235 ExternalReference after_break_target(Debug_Address::AfterBreakTarget(),
237 __ Mov(scratch, after_break_target);
243 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
253 Generate_DebugBreakCallHelper(masm, x0.Bit() | x2.Bit(), 0, x10);
257 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
267 Generate_DebugBreakCallHelper(masm, x0.Bit() | x1.Bit() | x2.Bit(), 0, x10);
271 void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
276 Generate_DebugBreakCallHelper(masm, x0.Bit() | x1.Bit(), 0, x10);
280 void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
286 Generate_DebugBreakCallHelper(masm, x0.Bit() | x1.Bit() | x2.Bit(), 0, x10);
290 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
295 Generate_DebugBreakCallHelper(masm, x0.Bit(), 0, x10);
299 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
304 Generate_DebugBreakCallHelper(masm, x2.Bit(), 0, x10);
308 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
312 Generate_DebugBreakCallHelper(masm, x0.Bit(), 0, x10);
316 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
321 Generate_DebugBreakCallHelper(masm, x1.Bit(), 0, x10);
325 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) {
332 Generate_DebugBreakCallHelper(masm, x1.Bit() | x2.Bit() | x3.Bit(), 0, x10);
336 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
342 Generate_DebugBreakCallHelper(masm, x1.Bit(), x0.Bit(), x10);
346 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) {
354 Generate_DebugBreakCallHelper(
355 masm, x1.Bit() | x2.Bit() | x3.Bit(), x0.Bit(), x10);
359 void Debug::GenerateSlot(MacroAssembler* masm) {
364 __ RecordDebugBreakSlot();
371 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
374 Generate_DebugBreakCallHelper(masm, 0, 0, x10);
378 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
379 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnARM64);
383 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
384 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnARM64);
387 const bool Debug::kFrameDropperSupported =
false;
389 #endif // ENABLE_DEBUGGER_SUPPORT
393 #endif // V8_TARGET_ARCH_ARM64
static const int kDebugBreakSlotInstructions
const RegList kCallerSaved
const unsigned kXRegSizeInBits
#define ASSERT(condition)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
const unsigned kInstructionSize
static const int kJSRetSequenceInstructions