]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] runtime: use g register in some assembly functions on AMD64
authorCherry Zhang <cherryyz@google.com>
Thu, 4 Feb 2021 17:40:04 +0000 (12:40 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 8 Feb 2021 18:48:12 +0000 (18:48 +0000)
commit7b0dfb177f3ae81641af898bb5479256fb21fd5d
tree2c94455bc060f396fa5d627a1acc83094b4f1950
parent2e60c00f56cdab9bb02e649e089b2ee5761acf26
[dev.regabi] runtime: use g register in some assembly functions on AMD64

Now that we have a g register, just use it.

Note: functions that can be called from ABI0 context (e.g.
morestack) is unchanged. Functions that switch g is also
unchanged, because we need to set the new g in both the register
and TLS.

TODO: other OSes.

Change-Id: I692a82a7caa8417ff620a59676a6275f56747b94
Reviewed-on: https://go-review.googlesource.com/c/go/+/289718
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/asm_amd64.s
src/runtime/race_amd64.s
src/runtime/sys_linux_amd64.s