• Cherry Zhang's avatar
    cmd/internal/obj/mips: mark unsafe points · 69dcdbd2
    Cherry Zhang authored
    For async preemption, we will be using REGTMP as a temporary
    register in injected call on MIPS, which will clobber it. So any
    code that uses REGTMP is not safe for async preemption.
    
    In the assembler backend, we expand a Prog to multiple machine
    instructions and use REGTMP as a temporary register if necessary.
    These need to be marked unsafe. In fact, most of the
    multi-instruction Progs use REGTMP, so we mark all of them,
    except ones that are whitelisted.
    
    Change-Id: Ic00ae5589683c2c9525abdaee076d884df6b0d1e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203718
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    69dcdbd2
obj0.go 28.5 KB