aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm/internal
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-11-02 12:03:31 -0400
committerCherry Zhang <cherryyz@google.com>2018-11-03 01:46:55 +0000
commit441cb988b4c63f4232edd7930758eb0e8cc8599b (patch)
tree9d0503319f58f37a5376a98bda12b843d23be50c /src/cmd/asm/internal
parent1645dfa23fbb1d1bab258d1c458f08d9f2741295 (diff)
downloadgo-441cb988b4c63f4232edd7930758eb0e8cc8599b.tar.xz
cmd/internal/obj/arm64: fix encoding of 32-bit negated logical instructions
32-bit negated logical instructions (BICW, ORNW, EONW) with constants were mis-encoded, because they were missing in the cases where we handle 32-bit logical instructions. This CL adds the missing cases. Fixes #28548 Change-Id: I3d6acde7d3b72bb7d3d5d00a9df698a72c806ad5 Reviewed-on: https://go-review.googlesource.com/c/147077 Run-TryBot: Cherry Zhang <cherryyz@google.com> Run-TryBot: Ben Shi <powerman1st@163.com> Reviewed-by: Ben Shi <powerman1st@163.com>
Diffstat (limited to 'src/cmd/asm/internal')
-rw-r--r--src/cmd/asm/internal/asm/testdata/arm64.s7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64.s b/src/cmd/asm/internal/asm/testdata/arm64.s
index 12c7adbd04..b851ba411e 100644
--- a/src/cmd/asm/internal/asm/testdata/arm64.s
+++ b/src/cmd/asm/internal/asm/testdata/arm64.s
@@ -222,6 +222,13 @@ TEXT foo(SB), DUPOK|NOSPLIT, $-8
EOR $(1<<63), R1 // EOR $-9223372036854775808, R1 // 210041d2
EOR $(1<<63-1), R1 // EOR $9223372036854775807, R1 // 21f840d2
+ ANDW $0x3ff00000, R2 // ANDW $1072693248, R2 // 42240c12
+ BICW $0x3ff00000, R2 // BICW $1072693248, R2 // 42540212
+ ORRW $0x3ff00000, R2 // ORRW $1072693248, R2 // 42240c32
+ ORNW $0x3ff00000, R2 // ORNW $1072693248, R2 // 42540232
+ EORW $0x3ff00000, R2 // EORW $1072693248, R2 // 42240c52
+ EONW $0x3ff00000, R2 // EONW $1072693248, R2 // 42540252
+
AND $0x22220000, R3, R4 // AND $572653568, R3, R4 // 5b44a4d264001b8a
ORR $0x22220000, R3, R4 // ORR $572653568, R3, R4 // 5b44a4d264001baa
EOR $0x22220000, R3, R4 // EOR $572653568, R3, R4 // 5b44a4d264001bca