]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/x86: use ABI scratch registers for WRAPPER prologue
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 19 Mar 2021 20:04:38 +0000 (20:04 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 31 Mar 2021 20:28:39 +0000 (20:28 +0000)
commit87c6fa4f473f178f7d931ddadd10c76444f8dc7b
tree3e5538d8fef20651365d749100a995f39025f9cb
parent5d6581d74796ac748441c94e84eefdaf338d266c
cmd/internal/obj/x86: use ABI scratch registers for WRAPPER prologue

Currently the prologue generated for WRAPPER assembly functions uses BX
and DI, but these are argument registers in the register-based calling
convention. Thus, these end up being clobbered when we want to have an
ABIInternal assembly function.

Define REGENTRYTMP0 and REGENTRYTMP1, aliases for the dedicated function
entry scratch registers R12 and R13, and use those instead.

For #40724.

Change-Id: Ica78c4ccc67a757359900a66b56ef28c83d88b3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/303314
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/internal/obj/x86/a.out.go
src/cmd/internal/obj/x86/obj6.go