aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSudakshina Das <sudi.das@arm.com>2018-09-26 10:47:40 +0100
committerRichard Earnshaw <Richard.Earnshaw@arm.com>2018-10-09 15:11:27 +0100
commit68dfbb92ef5f013a315d652c88ede2082c16a88e (patch)
tree185bdc259751e0288215a6a0452537b6b1b0049a /gas
parent13c60ad7e1211ee1dfbf6bfb5e35110a33e4eed5 (diff)
downloadgdb-68dfbb92ef5f013a315d652c88ede2082c16a88e.zip
gdb-68dfbb92ef5f013a315d652c88ede2082c16a88e.tar.gz
gdb-68dfbb92ef5f013a315d652c88ede2082c16a88e.tar.bz2
[PATCH, BINUTILS, AARCH64, 3/9] Add instruction SB for ARMv8.5-A
This patch is part of the patch series to add support for ARMv8.5-A extensions. (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/docs/ddi0596/a/a64-base-instructions-alphabetic-order) This instruction is retrospectively made optional for all versions of the architecture from ARMv8.0 to ARMv8.4 and is mandatory from ARMv8.5. Hence a new command line option of "+sb" is added for older architectures. *** include/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * opcode/aarch64.h (AARCH64_FEATURE_SB): New. (AARCH64_ARCH_V8_5): Add AARCH64_FEATURE_SB by default. *** opcodes/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * aarch64-tbl.h (aarch64_feature_sb): New. (SB, SB_INSN): New. (aarch64_opcode_table): Add entry for sb. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. *** gas/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * config/tc-aarch64.c (aarch64_features): Add new "sb" option for older architectures. * doc/c-aarch64.texi: Document the same. * testsuite/gas/aarch64/sb.s: New. * testsuite/gas/aarch64/sb.d: New.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-aarch64.c2
-rw-r--r--gas/doc/c-aarch64.texi2
-rw-r--r--gas/testsuite/gas/aarch64/sb.s6
-rw-r--r--gas/testsuite/gas/aarch64/sb1.d11
-rw-r--r--gas/testsuite/gas/aarch64/sb2.d11
6 files changed, 40 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index aed6395..9a83fad 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
2018-10-09 Sudakshina Das <sudi.das@arm.com>
+ * config/tc-aarch64.c (aarch64_features): Add new "sb" option
+ for older architectures.
+ * doc/c-aarch64.texi: Document the same.
+ * testsuite/gas/aarch64/sb.s: New.
+ * testsuite/gas/aarch64/sb.d: New.
+
+2018-10-09 Sudakshina Das <sudi.das@arm.com>
+
* testsuite/gas/aarch64/armv8_5-a-dp.s: New.
* testsuite/gas/aarch64/armv8_5-a-dp.d: New.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 9ae05e0..045ad52 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -8747,6 +8747,8 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
AARCH64_ARCH_NONE},
{"sha2", AARCH64_FEATURE (AARCH64_FEATURE_SHA2, 0),
AARCH64_ARCH_NONE},
+ {"sb", AARCH64_FEATURE (AARCH64_FEATURE_SB, 0),
+ AARCH64_ARCH_NONE},
{"aes", AARCH64_FEATURE (AARCH64_FEATURE_AES, 0),
AARCH64_ARCH_NONE},
{"sm4", AARCH64_FEATURE (AARCH64_FEATURE_SM4, 0),
diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi
index bac0f77..8a116a4 100644
--- a/gas/doc/c-aarch64.texi
+++ b/gas/doc/c-aarch64.texi
@@ -181,6 +181,8 @@ automatically cause those extensions to be disabled.
@item @code{fp16fml} @tab ARMv8.2-A @tab ARMv8.4-A or later
@tab Enable ARMv8.2 16-bit floating-point multiplication variant support.
This implies @code{fp16}.
+@item @code{sb} @tab ARMv8-A @tab ARMv8.5-A or later
+ @tab Enable the speculation barrier instruction sb.
@end multitable
@node AArch64 Syntax
diff --git a/gas/testsuite/gas/aarch64/sb.s b/gas/testsuite/gas/aarch64/sb.s
new file mode 100644
index 0000000..f3971f7
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sb.s
@@ -0,0 +1,6 @@
+// Test file for AArch64 sb.
+
+ .text
+
+ sb
+ SB
diff --git a/gas/testsuite/gas/aarch64/sb1.d b/gas/testsuite/gas/aarch64/sb1.d
new file mode 100644
index 0000000..116144e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sb1.d
@@ -0,0 +1,11 @@
+#source: sb.s
+#as: -march=armv8.5-a
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+.*: d50330ff sb
+.*: d50330ff sb
diff --git a/gas/testsuite/gas/aarch64/sb2.d b/gas/testsuite/gas/aarch64/sb2.d
new file mode 100644
index 0000000..5b7304b
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sb2.d
@@ -0,0 +1,11 @@
+#source: sb.s
+#as: -march=armv8-a+sb
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+.*: d50330ff sb
+.*: d50330ff sb