aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMatthew Wahab <matthew.wahab@arm.com>2015-11-27 15:25:08 +0000
committerMatthew Wahab <matthew.wahab@arm.com>2015-11-27 15:28:42 +0000
commitd685192a58d4c198633bd0e69cfe0a114576e98a (patch)
tree8b57e30467eb5a4d74ddf557c3822dd8f1016070 /gas/testsuite
parente19616610d7327664f99215a69cb326682742dc3 (diff)
downloadgdb-d685192a58d4c198633bd0e69cfe0a114576e98a.zip
gdb-d685192a58d4c198633bd0e69cfe0a114576e98a.tar.gz
gdb-d685192a58d4c198633bd0e69cfe0a114576e98a.tar.bz2
[AArch64] Add ARMv8.2 instructions BFC and REV64.
ARMv8.2 adds two new instructions: BFC as an alias for BFM and REV64 as an alias for REV. This patch set adds support for these to binutils, enabled when the -march=armv8.2-a is given. It depends on the support for an instruction being its preferred form which was added in an earlier patch. This patch adds the alias BFC <Rd>, #<imm>, #<width> as the preferred form for BFM when the source is a zero register and the conditions for using the BFI form are met (in other words, BFC is the preferred form for BFI <Rd>, <Rs>, #<imm>, #<width> when the <Rs> is a zero register). gas/testsuite/ 2015-11-27 Matthew Wahab <matthew.wahab@arm.com> * gas/aarch64/alias-2.d: New. * gas/aarch64/alias-2.s: New. include/opcode/ 2015-11-27 Matthew Wahab <matthew.wahab@arm.com> * aarch64.h (aarch64_op): Add OP_BFC. opcodes/ 2015-11-27 Matthew Wahab <matthew.wahab@arm.com> * aarch64-asm-2.c: Regenerate. * aarch64-asm.c (convert_bfc_to_bfm): New. (convert_to_real): Add case for OP_BFC. * aarch64-dis-2.c: Regenerate. * aarch64-dis.c: (convert_bfm_to_bfc): New. (convert_to_alias): Add case for OP_BFC. * aarch64-opc-2.c: Regenerate. * aarch64-opc.c (operand_general_constraint_met_p): Weaken assert to allow width operand in three-operand instructions. * aarch64-tbl.h (QL_BF1): New. (aarch64_feature_v8_2): New. (ARMV8_2): New. (aarch64_opcode_table): Add "bfc". Change-Id: I6efe318b2538ba11f0caece7c6d70957441c872b
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/aarch64/alias-2.d98
-rw-r--r--gas/testsuite/gas/aarch64/alias-2.s31
3 files changed, 134 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index faf5282..29e501a 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2015-11-27 Matthew Wahab <matthew.wahab@arm.com>
+ * gas/aarch64/alias-2.d: New.
+ * gas/aarch64/alias-2.s: New.
+
+2015-11-27 Matthew Wahab <matthew.wahab@arm.com>
+
* gas/aarch64/sysreg-2.d: New.
* gas/aarch64/sysreg-2.s: New.
diff --git a/gas/testsuite/gas/aarch64/alias-2.d b/gas/testsuite/gas/aarch64/alias-2.d
new file mode 100644
index 0000000..92ed58f
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/alias-2.d
@@ -0,0 +1,98 @@
+#objdump: -dr
+#as: -march=armv8.2-a
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ [0-9a-f]+: b34107e0 bfxil x0, xzr, #1, #1
+ [0-9a-f]+: b3410420 bfxil x0, x1, #1, #1
+ [0-9a-f]+: b341043f bfxil xzr, x1, #1, #1
+ [0-9a-f]+: b34107ff bfxil xzr, xzr, #1, #1
+ [0-9a-f]+: b34123e0 bfxil x0, xzr, #1, #8
+ [0-9a-f]+: b3412020 bfxil x0, x1, #1, #8
+ [0-9a-f]+: b341203f bfxil xzr, x1, #1, #8
+ [0-9a-f]+: b34123ff bfxil xzr, xzr, #1, #8
+ [0-9a-f]+: b3413fe0 bfxil x0, xzr, #1, #15
+ [0-9a-f]+: b3413c20 bfxil x0, x1, #1, #15
+ [0-9a-f]+: b3413c3f bfxil xzr, x1, #1, #15
+ [0-9a-f]+: b3413fff bfxil xzr, xzr, #1, #15
+ [0-9a-f]+: b35007e0 bfc x0, #48, #2
+ [0-9a-f]+: b3500420 bfi x0, x1, #48, #2
+ [0-9a-f]+: b350043f bfi xzr, x1, #48, #2
+ [0-9a-f]+: b35007ff bfc xzr, #48, #2
+ [0-9a-f]+: b35023e0 bfc x0, #48, #9
+ [0-9a-f]+: b3502020 bfi x0, x1, #48, #9
+ [0-9a-f]+: b350203f bfi xzr, x1, #48, #9
+ [0-9a-f]+: b35023ff bfc xzr, #48, #9
+ [0-9a-f]+: b3503fe0 bfc x0, #48, #16
+ [0-9a-f]+: b3503c20 bfi x0, x1, #48, #16
+ [0-9a-f]+: b3503c3f bfi xzr, x1, #48, #16
+ [0-9a-f]+: b3503fff bfc xzr, #48, #16
+ [0-9a-f]+: b35f07e0 bfc x0, #33, #2
+ [0-9a-f]+: b35f0420 bfi x0, x1, #33, #2
+ [0-9a-f]+: b35f043f bfi xzr, x1, #33, #2
+ [0-9a-f]+: b35f07ff bfc xzr, #33, #2
+ [0-9a-f]+: b35f23e0 bfc x0, #33, #9
+ [0-9a-f]+: b35f2020 bfi x0, x1, #33, #9
+ [0-9a-f]+: b35f203f bfi xzr, x1, #33, #9
+ [0-9a-f]+: b35f23ff bfc xzr, #33, #9
+ [0-9a-f]+: b35f3fe0 bfc x0, #33, #16
+ [0-9a-f]+: b35f3c20 bfi x0, x1, #33, #16
+ [0-9a-f]+: b35f3c3f bfi xzr, x1, #33, #16
+ [0-9a-f]+: b35f3fff bfc xzr, #33, #16
+ [0-9a-f]+: b37f03e0 bfc x0, #1, #1
+ [0-9a-f]+: b37f0020 bfi x0, x1, #1, #1
+ [0-9a-f]+: b37f003f bfi xzr, x1, #1, #1
+ [0-9a-f]+: b37f03ff bfc xzr, #1, #1
+ [0-9a-f]+: b37f1fe0 bfc x0, #1, #8
+ [0-9a-f]+: b37f1c20 bfi x0, x1, #1, #8
+ [0-9a-f]+: b37f1c3f bfi xzr, x1, #1, #8
+ [0-9a-f]+: b37f1fff bfc xzr, #1, #8
+ [0-9a-f]+: b37f3be0 bfc x0, #1, #15
+ [0-9a-f]+: b37f3820 bfi x0, x1, #1, #15
+ [0-9a-f]+: b37f383f bfi xzr, x1, #1, #15
+ [0-9a-f]+: b37f3bff bfc xzr, #1, #15
+ [0-9a-f]+: b37003e0 bfc x0, #16, #1
+ [0-9a-f]+: b3700020 bfi x0, x1, #16, #1
+ [0-9a-f]+: b370003f bfi xzr, x1, #16, #1
+ [0-9a-f]+: b37003ff bfc xzr, #16, #1
+ [0-9a-f]+: b3701fe0 bfc x0, #16, #8
+ [0-9a-f]+: b3701c20 bfi x0, x1, #16, #8
+ [0-9a-f]+: b3701c3f bfi xzr, x1, #16, #8
+ [0-9a-f]+: b3701fff bfc xzr, #16, #8
+ [0-9a-f]+: b3703be0 bfc x0, #16, #15
+ [0-9a-f]+: b3703820 bfi x0, x1, #16, #15
+ [0-9a-f]+: b370383f bfi xzr, x1, #16, #15
+ [0-9a-f]+: b3703bff bfc xzr, #16, #15
+ [0-9a-f]+: b36103e0 bfc x0, #31, #1
+ [0-9a-f]+: b3610020 bfi x0, x1, #31, #1
+ [0-9a-f]+: b361003f bfi xzr, x1, #31, #1
+ [0-9a-f]+: b36103ff bfc xzr, #31, #1
+ [0-9a-f]+: b3611fe0 bfc x0, #31, #8
+ [0-9a-f]+: b3611c20 bfi x0, x1, #31, #8
+ [0-9a-f]+: b3611c3f bfi xzr, x1, #31, #8
+ [0-9a-f]+: b3611fff bfc xzr, #31, #8
+ [0-9a-f]+: b3613be0 bfc x0, #31, #15
+ [0-9a-f]+: b3613820 bfi x0, x1, #31, #15
+ [0-9a-f]+: b361383f bfi xzr, x1, #31, #15
+ [0-9a-f]+: b3613bff bfc xzr, #31, #15
+ [0-9a-f]+: b34003e0 bfxil x0, xzr, #0, #1
+ [0-9a-f]+: b36103ff bfc xzr, #31, #1
+ [0-9a-f]+: b3401fe0 bfxil x0, xzr, #0, #8
+ [0-9a-f]+: b3611fff bfc xzr, #31, #8
+ [0-9a-f]+: b3403be0 bfxil x0, xzr, #0, #15
+ [0-9a-f]+: b3613bff bfc xzr, #31, #15
+ [0-9a-f]+: b34003e0 bfxil x0, xzr, #0, #1
+ [0-9a-f]+: b36103ff bfc xzr, #31, #1
+ [0-9a-f]+: b3401fe0 bfxil x0, xzr, #0, #8
+ [0-9a-f]+: b3611fff bfc xzr, #31, #8
+ [0-9a-f]+: b3403be0 bfxil x0, xzr, #0, #15
+ [0-9a-f]+: b3613bff bfc xzr, #31, #15
+ [0-9a-f]+: b34003e0 bfxil x0, xzr, #0, #1
+ [0-9a-f]+: b36103ff bfc xzr, #31, #1
+ [0-9a-f]+: b3401fe0 bfxil x0, xzr, #0, #8
+ [0-9a-f]+: b3611fff bfc xzr, #31, #8
+ [0-9a-f]+: b3403be0 bfxil x0, xzr, #0, #15
+ [0-9a-f]+: b3613bff bfc xzr, #31, #15
diff --git a/gas/testsuite/gas/aarch64/alias-2.s b/gas/testsuite/gas/aarch64/alias-2.s
new file mode 100644
index 0000000..d952c97
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/alias-2.s
@@ -0,0 +1,31 @@
+/* alias-2.s Test file for ARMv8.2 AArch64 instructions aliases or disassembly
+ preference. */
+
+ /* <bfm> [Xd|xzr], [xzr|<Xr>], <imm>, <width> */
+ .macro bfm_inst op imm width
+ \op x0, xzr, #\imm, #\width
+ \op x0, x1, #\imm, #\width
+ \op xzr, x1, #\imm, #\width
+ \op xzr, xzr, #\imm, #\width
+ .endm
+
+ /* bfc [Xd|xzr], <imm>, <width> */
+ .macro bfc_inst imm width
+ bfc x0, #\imm, #\width
+ bfc xzr, #\imm, #\width
+ .endm
+
+.text
+ .irp op, bfm, bfi
+ .irp imm, 1, 16, 31
+ .irp width, 1, 8, 15
+ bfm_inst \op, \imm, \width
+ .endr
+ .endr
+ .endr
+
+ .irp imm, 1, 16, 31
+ .irp width, 1, 8, 15
+ bfc_inst \imm, \width
+ .endr
+ .endr