]> Cypherpunks repositories - gostls13.git/commit
runtime: save/restore callee-saved registers in loong64's sigtramp
authorGuoqi Chen <chenguoqi@loongson.cn>
Fri, 26 Aug 2022 06:05:31 +0000 (14:05 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 29 Mar 2023 02:34:18 +0000 (02:34 +0000)
commit5fa65d8c93f259827b931047a28db70c15f7d0b8
tree994e1aba8bb018faf49eaedcc5f13d5734d676b0
parent579109789fbb03132ae43c501add94f295d1642e
runtime: save/restore callee-saved registers in loong64's sigtramp

Loong64's R22-R31 and F24-F31 are callee saved registers, which
should be saved in the beginning of sigtramp, and restored at
the end.

In reviewing comments about sigtramp in sys_linux_arm64 it was
noted that a previous issue in arm64 due to missing callee save
registers could also be a problem on loong64, so code was added
to save and restore those.

Updates #31827

Change-Id: I3ae58fe8a64ddb052d0a89b63e82c01ad328dd15
Reviewed-on: https://go-review.googlesource.com/c/go/+/426356
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Auto-Submit: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: xiaodong liu <teaofmoli@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/cgo/abi_loong64.h [new file with mode: 0644]
src/runtime/cgo/asm_loong64.s
src/runtime/sys_linux_loong64.s