diff options
author | Austin Clements <austin@google.com> | 2021-03-15 16:48:54 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2021-03-18 16:51:27 +0000 |
commit | eaa1ddee84cfdfbd47183b03962744fea52624f0 (patch) | |
tree | af4d26ddbbcba94950f64844141f5a9b04a56b2c /src/runtime/asm_amd64.s | |
parent | c71acbfe8372099877cdc989b546389b05222600 (diff) | |
download | go-eaa1ddee84cfdfbd47183b03962744fea52624f0.tar.gz go-eaa1ddee84cfdfbd47183b03962744fea52624f0.zip |
all: explode GOEXPERIMENT=regabi into 5 sub-experiments
This separates GOEXPERIMENT=regabi into five sub-experiments:
regabiwrappers, regabig, regabireflect, regabidefer, and regabiargs.
Setting GOEXPERIMENT=regabi now implies the working subset of these
(currently, regabiwrappers, regabig, and regabireflect).
This simplifies testing, helps derisk the register ABI project,
and will also help with performance comparisons.
This replaces the -abiwrap flag to the compiler and linker with
the regabiwrappers experiment.
As part of this, regabiargs now enables registers for all calls
in the compiler. Previously, this was statically disabled in
regabiEnabledForAllCompilation, but now that we can control it
independently, this isn't necessary.
For #40724.
Change-Id: I5171e60cda6789031f2ef034cc2e7c5d62459122
Reviewed-on: https://go-review.googlesource.com/c/go/+/302070
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>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/asm_amd64.s')
-rw-r--r-- | src/runtime/asm_amd64.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s index ddd6a5bd5b..ab3f639929 100644 --- a/src/runtime/asm_amd64.s +++ b/src/runtime/asm_amd64.s @@ -442,7 +442,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0 MOVL $0, DX JMP runtime·morestack(SB) -#ifdef GOEXPERIMENT_REGABI +#ifdef GOEXPERIMENT_REGABI_REFLECT // spillArgs stores return values from registers to a *internal/abi.RegArgs in R12. TEXT spillArgs<>(SB),NOSPLIT,$0-0 MOVQ AX, 0(R12) @@ -660,7 +660,7 @@ TEXT runtime·jmpdefer(SB), NOSPLIT, $0-16 // or else unwinding from systemstack_switch is incorrect. // Smashes R9. TEXT gosave_systemstack_switch<>(SB),NOSPLIT,$0 -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R14) MOVQ g(R14), R14 #endif @@ -1461,7 +1461,7 @@ TEXT runtime·addmoduledata(SB),NOSPLIT,$0-0 // signals. It is quite painful to set X15 in the signal context, // so we do it here. TEXT ·sigpanic0<ABIInternal>(SB),NOSPLIT,$0-0 -#ifdef GOEXPERIMENT_REGABI +#ifdef GOEXPERIMENT_REGABI_G get_tls(R14) MOVQ g(R14), R14 XORPS X15, X15 @@ -1483,7 +1483,7 @@ TEXT runtime·gcWriteBarrier<ABIInternal>(SB),NOSPLIT,$112 MOVQ R13, 104(SP) // TODO: Consider passing g.m.p in as an argument so they can be shared // across a sequence of write barriers. -#ifdef GOEXPERIMENT_REGABI +#ifdef GOEXPERIMENT_REGABI_G MOVQ g_m(R14), R13 #else get_tls(R13) |