diff options
Diffstat (limited to 'src/runtime/sys_netbsd_amd64.s')
-rw-r--r-- | src/runtime/sys_netbsd_amd64.s | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/runtime/sys_netbsd_amd64.s b/src/runtime/sys_netbsd_amd64.s index 2c50adb123..7c7771bcba 100644 --- a/src/runtime/sys_netbsd_amd64.s +++ b/src/runtime/sys_netbsd_amd64.s @@ -250,13 +250,28 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-32 POPQ BP RET -TEXT runtime·sigtramp(SB),NOSPLIT,$32 - MOVQ DI, 0(SP) // signum - MOVQ SI, 8(SP) // info - MOVQ DX, 16(SP) // ctx - MOVQ R15, 24(SP) // for sigreturn +TEXT runtime·sigtramp(SB),NOSPLIT,$72 + // Save callee-saved C registers, since the caller may be a C signal handler. + MOVQ BX, bx-8(SP) + MOVQ BP, bp-16(SP) // save in case GOEXPERIMENT=noframepointer is set + MOVQ R12, r12-24(SP) + MOVQ R13, r13-32(SP) + MOVQ R14, r14-40(SP) + MOVQ R15, r15-48(SP) + // We don't save mxcsr or the x87 control word because sigtrampgo doesn't + // modify them. + + MOVQ DX, ctx-56(SP) + MOVQ SI, info-64(SP) + MOVQ DI, signum-72(SP) CALL runtime·sigtrampgo(SB) - MOVQ 24(SP), R15 + + MOVQ r15-48(SP), R15 + MOVQ r14-40(SP), R14 + MOVQ r13-32(SP), R13 + MOVQ r12-24(SP), R12 + MOVQ bp-16(SP), BP + MOVQ bx-8(SP), BX RET TEXT runtime·mmap(SB),NOSPLIT,$0 |