aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSudakshina Das <sudi.das@arm.com>2020-04-20 10:58:16 +0100
committerSudakshina Das <sudi.das@arm.com>2020-04-20 10:58:16 +0100
commitc2e5c986b3825c16a578e5bf84aa412eec276dc7 (patch)
treea3164a12168f5db7c0145d75fc0255a4de02bc23 /gas
parent8a6e1d1d7f2fb09245fe42f7b8dc6d53f61df1d1 (diff)
downloadfsf-binutils-gdb-c2e5c986b3825c16a578e5bf84aa412eec276dc7.zip
fsf-binutils-gdb-c2e5c986b3825c16a578e5bf84aa412eec276dc7.tar.gz
fsf-binutils-gdb-c2e5c986b3825c16a578e5bf84aa412eec276dc7.tar.bz2
[AArch64, Binutils] Add missing TSB instruction
This patch implements the TSB instructions: https://developer.arm.com/docs/ddi0596/f/base-instructions-alphabetic-order/ tsb-csync-trace-synchronization-barrier Since TSB and PSB both use the same (and only) argument "CSYNC", this patch reuses it for TSB. However, the same argument would imply different value for CRm:Op2 which are anyway fixed values, so I have diverted the inserter/extracter function to dummy versions instead of the "hint" version. The operand checker part still uses the existing infratructure for AARCH64_OPND_BARRIER_PSB to make sure the operand is parsed correctly. gas/ChangeLog: 2020-04-20 Sudakshina Das <sudi.das@arm.com> * config/tc-aarch64.c (parse_barrier_psb): Update error messages to include TSB. * testsuite/gas/aarch64/system-2.d: Update -march and new tsb tests. * testsuite/gas/aarch64/system-2.s: Add new tsb tests. * testsuite/gas/aarch64/system.d: Update. opcodes/ChangeLog: 2020-04-20 Sudakshina Das <sudi.das@arm.com> * aarch64-asm.c (aarch64_ins_none): New. * aarch64-asm.h (ins_none): New declaration. * aarch64-dis.c (aarch64_ext_none): New. * aarch64-dis.h (ext_none): New declaration. * aarch64-opc.c (aarch64_print_operand): Update case for AARCH64_OPND_BARRIER_PSB. * aarch64-tbl.h (aarch64_opcode_table): Add tsb. (AARCH64_OPERANDS): Update inserter/extracter for AARCH64_OPND_BARRIER_PSB to use new dummy functions. * aarch64-asm-2.c: Regenerated. * aarch64-dis-2.c: Regenerated. * aarch64-opc-2.c: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-aarch64.c4
-rw-r--r--gas/testsuite/gas/aarch64/system-2.d15
-rw-r--r--gas/testsuite/gas/aarch64/system-2.s5
-rw-r--r--gas/testsuite/gas/aarch64/system.d2
5 files changed, 25 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c03a9e6..f821f3d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
2020-04-20 Sudakshina Das <sudi.das@arm.com>
+ * config/tc-aarch64.c (parse_barrier_psb): Update error messages
+ to include TSB.
+ * testsuite/gas/aarch64/system-2.d: Update -march and new tsb tests.
+ * testsuite/gas/aarch64/system-2.s: Add new tsb tests.
+ * testsuite/gas/aarch64/system.d: Update.
+
+2020-04-20 Sudakshina Das <sudi.das@arm.com>
+
* testsuite/gas/aarch64/bti.d: Update -march option.
* testsuite/gas/aarch64/illegal-bti.d: Remove.
* testsuite/gas/aarch64/illegal-bti.l: Remove.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 7af56ba..69ccc59 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -4026,7 +4026,7 @@ parse_barrier_psb (char **str,
if (!o)
{
set_fatal_syntax_error
- ( _("unknown or missing option to PSB"));
+ ( _("unknown or missing option to PSB/TSB"));
return PARSE_FAIL;
}
@@ -4034,7 +4034,7 @@ parse_barrier_psb (char **str,
{
/* PSB only accepts option name 'CSYNC'. */
set_syntax_error
- (_("the specified option is not accepted for PSB"));
+ (_("the specified option is not accepted for PSB/TSB"));
return PARSE_FAIL;
}
diff --git a/gas/testsuite/gas/aarch64/system-2.d b/gas/testsuite/gas/aarch64/system-2.d
index 7896dfb..6e3a61c 100644
--- a/gas/testsuite/gas/aarch64/system-2.d
+++ b/gas/testsuite/gas/aarch64/system-2.d
@@ -1,4 +1,4 @@
-#as: -march=armv8.2-a+profile
+#as: -march=armv8-a
#objdump: -dr
.*: file format .*
@@ -6,8 +6,11 @@
Disassembly of section \.text:
0+ <.*>:
- 0: d503221f esb
- 4: d503221f esb
- 8: d503223f psb csync
- c: d503223f psb csync
- 10: d503223f psb csync
+.*: d503221f esb
+.*: d503221f esb
+.*: d503223f psb csync
+.*: d503223f psb csync
+.*: d503223f psb csync
+.*: d503225f tsb csync
+.*: d503225f tsb csync
+.*: d503225f tsb csync
diff --git a/gas/testsuite/gas/aarch64/system-2.s b/gas/testsuite/gas/aarch64/system-2.s
index d619449..18c8707 100644
--- a/gas/testsuite/gas/aarch64/system-2.s
+++ b/gas/testsuite/gas/aarch64/system-2.s
@@ -9,3 +9,8 @@
psb csync
psb CSYNC
hint #0x11
+
+ /* Trace sync barrier. */
+ tsb csync
+ tsb CSYNC
+ hint #0x12
diff --git a/gas/testsuite/gas/aarch64/system.d b/gas/testsuite/gas/aarch64/system.d
index 291d04d..20d5c20 100644
--- a/gas/testsuite/gas/aarch64/system.d
+++ b/gas/testsuite/gas/aarch64/system.d
@@ -30,7 +30,7 @@ Disassembly of section \.text:
.*: d50321ff hint #0xf
.*: d503221f (hint #0x10|esb)
.*: d503223f (hint #0x11|psb csync)
-.*: d503225f hint #0x12
+.*: d503225f (hint #0x12|tsb csync)
.*: d503227f hint #0x13
.*: d503229f (hint #0x14|csdb)
.*: d50322bf hint #0x15