• Cherry Zhang's avatar
    cmd/internal/obj/arm64: support logical instructions targeting RSP · 518e6f08
    Cherry Zhang authored
    Logical instructions can have RSP as its destination. Support it.
    
    Note that the two-operand form, like "AND $1, RSP", which is
    equivalent to the three-operand form "AND $1, RSP, RSP", is
    invalid, because the source register is not allowed to be RSP.
    
    Also note that instructions that set the conditional flags, like
    ANDS, cannot target RSP. Because of this, we split out the optab
    entries of AND et al. and ANDS et al.
    
    Merge the optab entries of BIC et al. to AND et al., because they
    are same.
    
    Fixes #24332.
    
    Change-Id: I3584d6f2e7cea98a659a1ed9fdf67c353e090637
    Reviewed-on: https://go-review.googlesource.com/100217
    
    
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    518e6f08
asm7.go 124 KB