summaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/x86
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-04-02 13:32:08 -0400
committerAustin Clements <austin@google.com>2021-04-02 21:59:37 +0000
commit2ebe77a2fda1ee9ff6fd9a3e08933ad1ebaea039 (patch)
tree41ff593b733ac5ae0e2798747892b6bee45960a4 /src/cmd/internal/obj/x86
parentf25d78f8e216f5558885ffd2cea39b3ff1a3ff43 (diff)
downloadgo-git-2ebe77a2fda1ee9ff6fd9a3e08933ad1ebaea039.tar.gz
cmd/internal/obj: use REGENTRYTMP* in a few more places
There are a few remaining places in obj6 where we hard-code safe-on-entry registers. Fix those to use the consts. For #40724. Change-Id: Ie640521aa67d6c99bc057553dc122160049c6edc Reviewed-on: https://go-review.googlesource.com/c/go/+/307009 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/internal/obj/x86')
-rw-r--r--src/cmd/internal/obj/x86/obj6.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
index a314583e49..785e6f5bd3 100644
--- a/src/cmd/internal/obj/x86/obj6.go
+++ b/src/cmd/internal/obj/x86/obj6.go
@@ -1046,7 +1046,7 @@ func stacksplit(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog, newprog obj.ProgA
tmp := int16(REG_AX) // use AX for 32-bit
if ctxt.Arch.Family == sys.AMD64 {
// for 64-bit, stay away from register ABI parameter registers, even w/o GOEXPERIMENT=regabi
- tmp = int16(REG_R13)
+ tmp = int16(REGENTRYTMP0)
}
// large stack: SP-framesize <= stackguard-StackSmall
// LEAQ -xxx(SP), tmp
@@ -1076,8 +1076,8 @@ func stacksplit(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog, newprog obj.ProgA
tmp1 := int16(REG_SI)
tmp2 := int16(REG_AX)
if ctxt.Arch.Family == sys.AMD64 {
- tmp1 = int16(REG_R13) // register ABI uses REG_SI and REG_AX for parameters.
- tmp2 = int16(REG_R12)
+ tmp1 = int16(REGENTRYTMP0) // register ABI uses REG_SI and REG_AX for parameters.
+ tmp2 = int16(REGENTRYTMP1)
}
// Such a large stack we need to protect against wraparound.
// If SP is close to zero: