aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/race_amd64.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-28 21:50:16 -0400
committerRuss Cox <rsc@golang.org>2014-10-28 21:50:16 -0400
commitb55791e2008703b33883e48e72a347ba07a65486 (patch)
tree2dc3ed44dc71a1aa6af2d9fbe331464408104d79 /src/runtime/race_amd64.s
parent87b4149b22feb9d8d52da1730b455e39436a3a8d (diff)
downloadgo-b55791e2008703b33883e48e72a347ba07a65486.tar.gz
go-b55791e2008703b33883e48e72a347ba07a65486.zip
[dev.power64] cmd/5a, cmd/6a, cmd/8a, cmd/9a: make labels function-scoped
I removed support for jumping between functions years ago, as part of doing the instruction layout for each function separately. Given that, it makes sense to treat labels as function-scoped. This lets each function have its own 'loop' label, for example. Makes the assembly much cleaner and removes the last reason anyone would reach for the 123(PC) form instead. Note that this is on the dev.power64 branch, but it changes all the assemblers. The change will ship in Go 1.5 (perhaps after being ported into the new assembler). Came up as part of CL 167730043. LGTM=r R=r CC=austin, dave, golang-codereviews, minux https://golang.org/cl/159670043
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 bdea28c7c0..15b18ff8f8 100644
--- a/src/runtime/race_amd64.s
+++ b/src/runtime/race_amd64.s
@@ -140,20 +140,20 @@ TEXT racecalladdr<>(SB), NOSPLIT, $0-0
MOVQ g_racectx(R14), RARG0 // goroutine context
// Check that addr is within [arenastart, arenaend) or within [noptrdata, enoptrbss).
CMPQ RARG1, runtime·racearenastart(SB)
- JB racecalladdr_data
+ JB data
CMPQ RARG1, runtime·racearenaend(SB)
- JB racecalladdr_call
-racecalladdr_data:
+ JB call
+data:
MOVQ $runtime·noptrdata(SB), R13
CMPQ RARG1, R13
- JB racecalladdr_ret
+ JB ret
MOVQ $runtime·enoptrbss(SB), R13
CMPQ RARG1, R13
- JAE racecalladdr_ret
-racecalladdr_call:
+ JAE ret
+call:
MOVQ AX, AX // w/o this 6a miscompiles this function
JMP racecall<>(SB)
-racecalladdr_ret:
+ret:
RET
// func runtime·racefuncenter(pc uintptr)
@@ -335,9 +335,9 @@ TEXT racecall<>(SB), NOSPLIT, $0-0
MOVQ SP, R12 // callee-saved, preserved across the CALL
MOVQ m_g0(R13), R10
CMPQ R10, R14
- JE racecall_cont // already on g0
+ JE call // already on g0
MOVQ (g_sched+gobuf_sp)(R10), SP
-racecall_cont:
+call:
ANDQ $~15, SP // alignment for gcc ABI
CALL AX
MOVQ R12, SP