• Cherry Zhang's avatar
    runtime: add async preemption support on MIPS and MIPS64 · a930fede
    Cherry Zhang authored
    This CL adds support of call injection and async preemption on
    MIPS and MIPS64.
    
    Like ARM64, we need to clobber one register (REGTMP) for
    returning from the injected call. Previous CLs have marked code
    sequences that use REGTMP async-nonpreemtible.
    
    It seems on MIPS/MIPS64, a CALL instruction is not "atomic" (!).
    If a signal is delivered right at the CALL instruction, we may
    see an updated LR with a not-yet-updated PC. In some cases this
    may lead to failed stack unwinding. Don't preempt in this case.
    
    Change-Id: I99437b2d05869ded5c0c8cb55265dbfc933aedab
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203720Reviewed-by: default avatarKeith Randall <khr@golang.org>
    a930fede
signal_mips64x.go 3.16 KB