From fff4e5e8ffe23bf0cef135b22abd2cc0a3838613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Thu, 10 Mar 2022 20:40:33 +0100 Subject: [PATCH] runtime: fix breakpoint in ppc64x Currently runtime.Breakpoint generates a SIGSEGV in ppc64. The solution is an unconditional trap similar to what clang and gcc do. It is documented in the section C.6 of the ABI Book 3. Fixes #52101 --- src/runtime/asm_ppc64x.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s index 1d292b4e60..436ab759f5 100644 --- a/src/runtime/asm_ppc64x.s +++ b/src/runtime/asm_ppc64x.s @@ -106,7 +106,7 @@ DATA runtime·mainPC+0(SB)/8,$runtime·main(SB) GLOBL runtime·mainPC(SB),RODATA,$8 TEXT runtime·breakpoint(SB),NOSPLIT|NOFRAME,$0-0 - MOVD R0, 0(R0) // TODO: TD + TW $31, R0, R0 RET TEXT runtime·asminit(SB),NOSPLIT|NOFRAME,$0-0