]> Cypherpunks repositories - gostls13.git/commit
math/big: fix incorrect register allocation for mipsx/mips64x
authorJulian Zhu <jz531210@gmail.com>
Fri, 25 Apr 2025 12:59:13 +0000 (20:59 +0800)
committerKeith Randall <khr@golang.org>
Thu, 1 May 2025 12:04:39 +0000 (05:04 -0700)
commit6109185cf9641ea401812c63ba3538742b872952
treebba5b02dfdbe5221279d2c8c6c7af68ba880fe4d
parentb48e52b4282631ecda45ac985d398e19eca1e745
math/big: fix incorrect register allocation for mipsx/mips64x

According to the MIPS ABI, R26/R27 are reserved for OS kernel, and may be clobbered by it. They must not be used by user mode.

See Figure 3-18 of MIPS ELF ABI specification: https://refspecs.linuxfoundation.org/elf/mipsabi.pdf

Fixes #73472

Change-Id: Ifda692a803176bfaab2c70d6623636c5d135f42e
Reviewed-on: https://go-review.googlesource.com/c/go/+/667816
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/math/big/arith_mips64x.s
src/math/big/arith_mipsx.s
src/math/big/internal/asmgen/mips.go
src/math/big/internal/asmgen/mips64.go