aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-08-18 21:06:42 -0400
committerRuss Cox <rsc@golang.org>2014-08-18 21:06:42 -0400
commitd89cd2485784a4b458cc5ac12aba11994fd379c7 (patch)
tree655c8b1c85154f27a23e6f55720434f2adcfc196 /src
parentafb6221bf79d7ed59e4a859f147bbed2ea2c3617 (diff)
downloadgo-d89cd2485784a4b458cc5ac12aba11994fd379c7.tar.xz
runtime: avoid $sym(SB) as constant
The change to pc-relative addressing will make this illegal. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://golang.org/cl/129890043
Diffstat (limited to 'src')
-rw-r--r--src/pkg/runtime/race_amd64.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/runtime/race_amd64.s b/src/pkg/runtime/race_amd64.s
index 210f5d4ad7..30281d224b 100644
--- a/src/pkg/runtime/race_amd64.s
+++ b/src/pkg/runtime/race_amd64.s
@@ -144,9 +144,11 @@ TEXT racecalladdr<>(SB), NOSPLIT, $0-0
CMPQ RARG1, runtime·racearenaend(SB)
JB racecalladdr_call
racecalladdr_data:
- CMPQ RARG1, $noptrdata(SB)
+ MOVQ $noptrdata(SB), R13
+ CMPQ RARG1, R13
JB racecalladdr_ret
- CMPQ RARG1, $enoptrbss(SB)
+ MOVQ $enoptrbss(SB), R13
+ CMPQ RARG1, R13
JAE racecalladdr_ret
racecalladdr_call:
MOVQ AX, AX // w/o this 6a miscompiles this function