diff options
author | Austin Clements <austin@google.com> | 2015-01-27 18:29:02 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2015-02-02 19:35:56 +0000 |
commit | 20a6ff7261adecc1ba0dc3f3cd6a29054fdf90b7 (patch) | |
tree | e761e716f8d5da8497154c81206ee407551f699a /src/runtime/sys_freebsd_amd64.s | |
parent | 28b51184156e1261bb92e7ec4050a794dd606fa6 (diff) | |
download | go-20a6ff7261adecc1ba0dc3f3cd6a29054fdf90b7.tar.gz go-20a6ff7261adecc1ba0dc3f3cd6a29054fdf90b7.zip |
runtime: eliminate uses of BP on amd64
Any place that clobbers BP in the runtime can potentially interfere
with frame pointer unwinding with GOEXPERIMENT=framepointer. This
change eliminates uses of BP in the runtime to address this problem.
We have spare registers everywhere this occurs, so there's no downside
to eliminating BP. Where possible, this uses the same new register as
the amd64p32 runtime, which doesn't use BP due to restrictions placed
on it by NaCL.
One nice side effect of this is that it will let perf/VTune unwind the
call stack even through a call to systemstack, which will let us get
really good call graphs from the garbage collector.
Change-Id: I0ffa14cb4dd2b613a7049b8ec59df37c52286212
Reviewed-on: https://go-review.googlesource.com/3390
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/sys_freebsd_amd64.s')
-rw-r--r-- | src/runtime/sys_freebsd_amd64.s | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/sys_freebsd_amd64.s b/src/runtime/sys_freebsd_amd64.s index 400c1845be..eac0319d0b 100644 --- a/src/runtime/sys_freebsd_amd64.s +++ b/src/runtime/sys_freebsd_amd64.s @@ -180,9 +180,9 @@ TEXT runtimeĀ·sigtramp(SB),NOSPLIT,$64 MOVQ R10, 40(SP) // g = m->signal - MOVQ g_m(R10), BP - MOVQ m_gsignal(BP), BP - MOVQ BP, g(BX) + MOVQ g_m(R10), AX + MOVQ m_gsignal(AX), AX + MOVQ AX, g(BX) MOVQ DI, 0(SP) MOVQ SI, 8(SP) |