aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_amd64.s
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-02-17 19:28:33 +0000
committerMichael Knyszek <mknyszek@google.com>2021-03-05 15:34:15 +0000
commitc5a1c2276ee41a65cce93b7e443d333dfa29aba7 (patch)
treedf9f40da1fad8422afdceac4783199cddb122e36 /src/runtime/asm_amd64.s
parent302a400316319501748c0f034464fa70e7815272 (diff)
downloadgo-c5a1c2276ee41a65cce93b7e443d333dfa29aba7.tar.gz
go-c5a1c2276ee41a65cce93b7e443d333dfa29aba7.zip
reflect: use global variables for register count
This change switches reflect to use global variables for ABI-related register counts instead of internal/abi constants. The advantage of doing so is that we can make the internal/abi constants non-zero and enable the runtime register argument spiller/unspiller even if they're not used. It's basically turning two things we need to flip when we switch to the register ABI into one. It also paves the way for testing the reflect register ABI path independently, because now we can switch the global variables at will and run the register-assignment algorithm in tests without having the rest of the runtime be broken. Change-Id: Ie23629a37a5c80aeb24909d4bd9eacbd3f0c06d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/293149 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_amd64.s')
-rw-r--r--src/runtime/asm_amd64.s5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 517c5a9d3e..ddd6a5bd5b 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -442,10 +442,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0
MOVL $0, DX
JMP runtime·morestack(SB)
-// REFLECTCALL_USE_REGABI is not defined. It must be defined in conjunction with the
-// register constants in the internal/abi package.
-
-#ifdef REFLECTCALL_USE_REGABI
+#ifdef GOEXPERIMENT_REGABI
// spillArgs stores return values from registers to a *internal/abi.RegArgs in R12.
TEXT spillArgs<>(SB),NOSPLIT,$0-0
MOVQ AX, 0(R12)