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/race_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/race_amd64.s')
-rw-r--r-- | src/runtime/race_amd64.s | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/race_amd64.s b/src/runtime/race_amd64.s index 287bb9fc0a..5f6b86a1fe 100644 --- a/src/runtime/race_amd64.s +++ b/src/runtime/race_amd64.s @@ -146,7 +146,7 @@ TEXT runtime·racewriterangepc1(SB), NOSPLIT, $0-24 // If addr (RARG1) is out of range, do nothing. // Otherwise, setup goroutine context and invoke racecall. Other arguments already set. TEXT racecalladdr<>(SB), NOSPLIT, $0-0 -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif @@ -177,7 +177,7 @@ TEXT runtime·racefuncenter(SB), NOSPLIT, $0-8 // R11 = caller's return address TEXT racefuncenter<>(SB), NOSPLIT, $0-0 MOVQ DX, BX // save function entry context (for closures) -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif @@ -193,7 +193,7 @@ TEXT racefuncenter<>(SB), NOSPLIT, $0-0 // func runtime·racefuncexit() // Called from instrumented code. TEXT runtime·racefuncexit(SB), NOSPLIT, $0-0 -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif @@ -355,7 +355,7 @@ racecallatomic_data: JAE racecallatomic_ignore racecallatomic_ok: // Addr is within the good range, call the atomic function. -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif @@ -370,7 +370,7 @@ racecallatomic_ignore: // An attempt to synchronize on the address would cause crash. MOVQ AX, BX // remember the original function MOVQ $__tsan_go_ignore_sync_begin(SB), AX -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif @@ -401,7 +401,7 @@ TEXT runtime·racecall(SB), NOSPLIT, $0-0 // Switches SP to g0 stack and calls (AX). Arguments already set. TEXT racecall<>(SB), NOSPLIT, $0-0 -#ifndef GOEXPERIMENT_REGABI +#ifndef GOEXPERIMENT_REGABI_G get_tls(R12) MOVQ g(R12), R14 #endif |