diff options
author | Chressie Himpel <chressie@google.com> | 2022-04-27 20:09:28 +0200 |
---|---|---|
committer | Chressie Himpel <chressie@google.com> | 2022-04-27 20:09:28 +0200 |
commit | ec7f5165ddc680efbac18dc15b4905844d9e8db9 (patch) | |
tree | eacc43345e3d6f0adfda16bfcf66e7e5096a85b9 /src/runtime/sys_openbsd_amd64.s | |
parent | ca6fd39cf6498d4507fc7cdaced55620c283a503 (diff) | |
parent | f0ee7fda636408b4f04ca3f3b11788f662c90610 (diff) | |
download | go-ec7f5165ddc680efbac18dc15b4905844d9e8db9.tar.gz go-ec7f5165ddc680efbac18dc15b4905844d9e8db9.zip |
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: Ic5f71c04f08c03319c043f35be501875adb0a3b0
Diffstat (limited to 'src/runtime/sys_openbsd_amd64.s')
-rw-r--r-- | src/runtime/sys_openbsd_amd64.s | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/runtime/sys_openbsd_amd64.s b/src/runtime/sys_openbsd_amd64.s index fc6d5dc387d..f71f5ccead6 100644 --- a/src/runtime/sys_openbsd_amd64.s +++ b/src/runtime/sys_openbsd_amd64.s @@ -62,16 +62,24 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$0 // Transition from C ABI to Go ABI. PUSH_REGS_HOST_TO_ABI0() - // Call into the Go signal handler + // Set up ABIInternal environment: g in R14, cleared X15. + get_tls(R12) + MOVQ g(R12), R14 + PXOR X15, X15 + + // Reserve space for spill slots. NOP SP // disable vet stack checking - ADJSP $24 - MOVQ DI, 0(SP) // sig - MOVQ SI, 8(SP) // info - MOVQ DX, 16(SP) // ctx - CALL ·sigtrampgo(SB) + ADJSP $24 + + // Call into the Go signal handler + MOVQ DI, AX // sig + MOVQ SI, BX // info + MOVQ DX, CX // ctx + CALL ·sigtrampgo<ABIInternal>(SB) + ADJSP $-24 - POP_REGS_HOST_TO_ABI0() + POP_REGS_HOST_TO_ABI0() RET // |