aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_amd64.s
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-02-02 18:20:16 -0500
committerCherry Zhang <cherryyz@google.com>2021-02-08 16:30:07 +0000
commit5d7dc53888c3c91ef4122d584a064bc24b6f7540 (patch)
treea5b39dc4d83aa2fb9c72762968b0d0fc0bb65aea /src/runtime/sys_linux_amd64.s
parenta21de9ec73b8a433cafd336448dc8111a4e4571e (diff)
downloadgo-5d7dc53888c3c91ef4122d584a064bc24b6f7540.tar.xz
[dev.regabi] cmd/compile, runtime: reserve R14 as g registers on AMD64
This is a proof-of-concept change for using the g register on AMD64. getg is now lowered to R14 in the new ABI. The g register is not yet used in all places where it can be used (e.g. stack bounds check, runtime assembly code). Change-Id: I10123ddf38e31782cf58bafcdff170aee0ff0d1b Reviewed-on: https://go-review.googlesource.com/c/go/+/289196 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/sys_linux_amd64.s')
-rw-r--r--src/runtime/sys_linux_amd64.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s
index 37cb8dad03..b0a201fc6f 100644
--- a/src/runtime/sys_linux_amd64.s
+++ b/src/runtime/sys_linux_amd64.s
@@ -632,6 +632,7 @@ nog1:
get_tls(CX)
MOVQ R13, g_m(R9)
MOVQ R9, g(CX)
+ MOVQ R9, R14 // set g register
CALL runtime·stackcheck(SB)
nog2: