]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: avoid $sym(SB) as constant
authorRuss Cox <rsc@golang.org>
Tue, 19 Aug 2014 01:06:42 +0000 (21:06 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 19 Aug 2014 01:06:42 +0000 (21:06 -0400)
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

src/pkg/runtime/race_amd64.s

index 210f5d4ad7b62d361211f3310b8923e81c116c92..30281d224b4bfd508e3f21ee82cfa2e94e1f25fe 100644 (file)
@@ -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