• Austin Clements's avatar
    cmd/9g: don't use R13 · bbd21279
    Austin Clements authored
    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/2007Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    bbd21279
reg.c 27.7 KB