DATA runtime·mainPC+0(SB)/8,$runtime·main<ABIInternal>(SB)
GLOBL runtime·mainPC(SB),RODATA,$8
+// Windows ARM64 needs an immediate 0xf000 argument.
+// See go.dev/issues/53837.
+#define BREAK \
+#ifdef GOOS_windows \
+ BRK $0xf000 \
+#else \
+ BRK \
+#endif \
+
+
TEXT runtime·breakpoint(SB),NOSPLIT|NOFRAME,$0-0
- BRK
+ BREAK
RET
TEXT runtime·asminit(SB),NOSPLIT|NOFRAME,$0-0
// Set R20 to 8 and invoke BRK. The debugger should get the
// reason a call can't be injected from SP+8 and resume execution.
MOVD $8, R20
- BRK
+ BREAK
JMP restore
good:
MOVD $20, R0
MOVD R0, 16(RSP) // length of debugCallFrameTooLarge string
MOVD $8, R20
- BRK
+ BREAK
JMP restore
restore:
// Set R20 to 16 and invoke BRK. The debugger should restore
// all registers except for PC and RSP and resume execution.
MOVD $16, R20
- BRK
+ BREAK
// We must not modify flags after this point.
// Restore pointer-containing registers, which may have been
TEXT NAME(SB),WRAPPER,$MAXSIZE-0; \
NO_LOCAL_POINTERS; \
MOVD $0, R20; \
- BRK; \
+ BREAK; \
MOVD $1, R20; \
- BRK; \
+ BREAK; \
RET
DEBUG_CALL_FN(debugCall32<>, 32)
DEBUG_CALL_FN(debugCall64<>, 64)
MOVD val_data+8(FP), R0
MOVD R0, 16(RSP)
MOVD $2, R20
- BRK
+ BREAK
RET
// Note: these functions use a special calling convention to save generated code space.