]> Cypherpunks repositories - gostls13.git/commit
syscall: call ABI0 exitsyscall on Plan 9/AMD64
authorCherry Mui <cherryyz@google.com>
Wed, 16 Mar 2022 23:21:49 +0000 (19:21 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 17 Mar 2022 01:29:17 +0000 (01:29 +0000)
commit66865363f017a8d4cb0b07d84a3a6117fcf1cd30
tree85339add5d23206316f1b720b21e18a9d838f020
parent1cfe1007cdf17ee381443cd0d8ae31962805f96e
syscall: call ABI0 exitsyscall on Plan 9/AMD64

CL 376356 changes syscall.Syscall to call ABIInternal entersyscall
and exitsyscall. As mentioned in the CL description, it is
important to call entersyscall without ABI wrapper, but it is not
important to call exitsyscall this way. In fact, it is actually
problematic -- on Plan 9, syscall may clobber our fixed G register,
and we did not restore it. This CL changes it back to ABI0
exitsyscall, which will restore the G register through the wrapper.

Should fix Plan 9/AMD64 build.

Change-Id: I1f03d553f03e7b9f36d64686f20f2b2df0a0bf79
Reviewed-on: https://go-review.googlesource.com/c/go/+/393494
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/syscall/asm_plan9_amd64.s