From d89cd2485784a4b458cc5ac12aba11994fd379c7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 18 Aug 2014 21:06:42 -0400 Subject: [PATCH] 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 --- src/pkg/runtime/race_amd64.s | 6 ++++-- 1 file 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 -- 2.48.1