]> Cypherpunks repositories - gostls13.git/commit
cmd/9g: don't use R13
authorAustin Clements <austin@google.com>
Tue, 16 Dec 2014 18:52:09 +0000 (13:52 -0500)
committerAustin Clements <austin@google.com>
Wed, 7 Jan 2015 20:36:08 +0000 (20:36 +0000)
commitbbd2127909c6040cd8bb75108a5ecc82eddfb405
tree8a332e3afdea983060cc6a1015dc6e5a81abe5cb
parentdb923390a01d4c992116161bed1328bd5bb32a24
cmd/9g: don't use R13

R13 is the C TLS pointer.  Once we're calling to and from C code, if
we clobber R13 in our code, sigtramp won't know whether to get the
current g from REGG or from C TLS.  The simplest solution is for Go
code to preserve the C TLS pointer.  This is equivalent to what other
platforms do, except that on other platforms the TLS pointer is in a
special register.

Change-Id: I076e9cb83fd78843eb68cb07c748c4705c9a4c82
Reviewed-on: https://go-review.googlesource.com/2007
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/9g/gsubr.c
src/cmd/9g/reg.c
src/cmd/9l/9.out.h