From 5d7dc53888c3c91ef4122d584a064bc24b6f7540 Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Tue, 2 Feb 2021 18:20:16 -0500 Subject: [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 Run-TryBot: Cherry Zhang TryBot-Result: Go Bot Reviewed-by: Than McIntosh Reviewed-by: David Chase --- src/runtime/sys_linux_amd64.s | 1 + 1 file changed, 1 insertion(+) (limited to 'src/runtime/sys_linux_amd64.s') 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: -- cgit v1.3-5-g9baa