runtime/cgo: save and restore X3 (aka GP) for crosscall1 on riscv64
The C code that is calling crosscall1 may depend on the GP register, which Go code will currently clobber. Save and restore both X3 (aka GP) and X4 (aka TP) in this code path (note that the Go code does not currently clobber X4, however there is minimal downside to saving and restoring it here, which then also matches crosscall2). Updates #47100 Change-Id: Icbb706d7889d5dc59de3efb2b510fa6ea2069496 Reviewed-on: https://go-review.googlesource.com/c/go/+/334870 Trust: Joel Sing <joel@sing.id.au> Trust: Meng Zhuo <mzh@golangcn.org> Reviewed-by:Meng Zhuo <mzh@golangcn.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Meng Zhuo <mzh@golangcn.org>
Loading
Please sign in to comment