aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-02-16 20:15:13 +0000
committerMichael Knyszek <mknyszek@google.com>2021-02-16 20:42:26 +0000
commitc2358a1ae77d7bd09fb8b728d25641b5757a7a58 (patch)
tree168e2ea4ef67da832e89143fdb7b5533903941f3
parent8cfbf34dd956125524ea63469342cf8a319b5bd1 (diff)
downloadgo-c2358a1ae77d7bd09fb8b728d25641b5757a7a58.tar.gz
go-c2358a1ae77d7bd09fb8b728d25641b5757a7a58.zip
[dev.regabi] runtime: stub out spillArgs and unspillArgs
Currently these two functions assume that constants in internal/abi are set correctly, but we actually just made them zero if GOEXPERIMENT_REGABI is set. This means reflectcall is broken. Fix it by stubbing out these routines even if GOEXPERIMENT_REGABI is set. Change-Id: I4c8df6d6af28562c5bb7b85f48c03d37daa9ee0d Reviewed-on: https://go-review.googlesource.com/c/go/+/292650 Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com>
-rw-r--r--src/runtime/asm_amd64.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 5e1ed9b2ad..05422c9699 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -445,7 +445,10 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0
MOVL $0, DX
JMP runtime·morestack(SB)
-#ifdef GOEXPERIMENT_REGABI
+// 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
// spillArgs stores return values from registers to a *internal/abi.RegArgs in R12.
TEXT spillArgs<>(SB),NOSPLIT,$0-0
MOVQ AX, 0(R12)