aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/race_amd64.s
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-04-06 10:17:28 -0400
committerAustin Clements <austin@google.com>2021-04-08 02:17:15 +0000
commit0c4a08cb74abe026260a224a2b553c1f77a1172a (patch)
tree58c8f2a780273fbf9696d27f8583b5c04fdb42d5 /src/runtime/race_amd64.s
parentaeaa4519b584747b57d780c31134be8f6bb36251 (diff)
downloadgo-0c4a08cb74abe026260a224a2b553c1f77a1172a.tar.gz
go-0c4a08cb74abe026260a224a2b553c1f77a1172a.zip
cmd/asm,runtime: reduce spellings of GOEXPERIMENTs
Currently, the objabi.Experiment fields use Go-standard CamelCase, the GOEXPERIMENT environment variable flags and build tags use all lowercase, and the asm macros use upper-case with underscores. This CL makes asm use the lowercase names for macros so there is one less spelling, e.g., GOEXPERIMENT_regabiargs. This also makes them consistent with the GOOS_* and GOARCH_* macros, which also use lower case. Change-Id: I305cd89af5e8cd1a89cc148746c034bcfd76db3c Reviewed-on: https://go-review.googlesource.com/c/go/+/307816 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/race_amd64.s')
-rw-r--r--src/runtime/race_amd64.s18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/runtime/race_amd64.s b/src/runtime/race_amd64.s
index 426777b8bf..bb3afeb6ee 100644
--- a/src/runtime/race_amd64.s
+++ b/src/runtime/race_amd64.s
@@ -44,7 +44,7 @@
// Defined as ABIInternal so as to avoid introducing a wrapper,
// which would render runtime.getcallerpc ineffective.
TEXT runtime·raceread<ABIInternal>(SB), NOSPLIT, $0-8
-#ifdef GOEXPERIMENT_REGABI_ARGS
+#ifdef GOEXPERIMENT_regabiargs
MOVQ AX, RARG1
#else
MOVQ addr+0(FP), RARG1
@@ -74,7 +74,7 @@ TEXT runtime·racereadpc(SB), NOSPLIT, $0-24
// Defined as ABIInternal so as to avoid introducing a wrapper,
// which would render runtime.getcallerpc ineffective.
TEXT runtime·racewrite<ABIInternal>(SB), NOSPLIT, $0-8
-#ifdef GOEXPERIMENT_REGABI_ARGS
+#ifdef GOEXPERIMENT_regabiargs
MOVQ AX, RARG1
#else
MOVQ addr+0(FP), RARG1
@@ -129,7 +129,7 @@ TEXT runtime·racereadrangepc1(SB), NOSPLIT, $0-24
// Defined as ABIInternal so as to avoid introducing a wrapper,
// which would render runtime.getcallerpc ineffective.
TEXT runtime·racewriterange<ABIInternal>(SB), NOSPLIT, $0-16
-#ifdef GOEXPERIMENT_REGABI_ARGS
+#ifdef GOEXPERIMENT_regabiargs
MOVQ AX, RARG1
MOVQ BX, RARG2
#else
@@ -159,7 +159,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_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif
@@ -190,7 +190,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_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif
@@ -206,7 +206,7 @@ TEXT racefuncenter<>(SB), NOSPLIT, $0-0
// func runtime·racefuncexit()
// Called from instrumented code.
TEXT runtime·racefuncexit(SB), NOSPLIT, $0-0
-#ifndef GOEXPERIMENT_REGABI_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif
@@ -368,7 +368,7 @@ racecallatomic_data:
JAE racecallatomic_ignore
racecallatomic_ok:
// Addr is within the good range, call the atomic function.
-#ifndef GOEXPERIMENT_REGABI_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif
@@ -383,7 +383,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_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif
@@ -414,7 +414,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_G
+#ifndef GOEXPERIMENT_regabig
get_tls(R12)
MOVQ g(R12), R14
#endif