• Cherry Zhang's avatar
    cmd/internal/obj/arm64: fix encoding of AND MBCON · 0bae9b08
    Cherry Zhang authored
    When a constant is both MOVCON (can fit into a MOV instruction)
    and BITCON (can fit into a logical instruction), the assembler
    chooses to use the MOVCON encoding, which is actually longer for
    logical instructions. We add MBCON rules explicitly to make sure
    it uses the BITCON encoding.
    
    Updates #19857.
    
    Change-Id: Ib9881be363cbc491ac2a0792b36b87e74eff34a8
    Reviewed-on: https://go-review.googlesource.com/39652
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    0bae9b08
asm7.go 97.7 KB