]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix encoding of AND MBCON
authorCherry Zhang <cherryyz@google.com>
Thu, 6 Apr 2017 14:01:36 +0000 (10:01 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 6 Apr 2017 17:59:39 +0000 (17:59 +0000)
commit0bae9b083bdbf4d15d65fe175eaa98e4a83d22ea
tree5cc3b30c54441aa6b03748bc693313f112bede38
parent257b01f8f47ace2ddd75efe37d8a0353888bce14
cmd/internal/obj/arm64: fix encoding of AND MBCON

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: David Chase <drchase@google.com>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/internal/obj/arm64/a.out.go
src/cmd/internal/obj/arm64/asm7.go