aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/arm.h
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2020-02-10 16:38:00 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2020-02-10 16:50:14 +0000
commit4934a27c8c1d5c8623366f5dbafae8af60b96bc0 (patch)
tree158a8b56e97476a4a068001bf7c3d90f72a2f162 /include/opcode/arm.h
parent4b5aaf5f6992319c2c72e080a1a55842640b8732 (diff)
downloadgdb-4934a27c8c1d5c8623366f5dbafae8af60b96bc0.zip
gdb-4934a27c8c1d5c8623366f5dbafae8af60b96bc0.tar.gz
gdb-4934a27c8c1d5c8623366f5dbafae8af60b96bc0.tar.bz2
[binutils][arm] arm support for ARMv8.m Custom Datapath Extension
This patch is part of a series that adds support for the Armv8.m ARMv8.m Custom Datapath Extension to binutils. This patch introduces the Custom Instructions Class 1/2/3 (Single/ Dual, Accumulator/Non-accumulator varianats) to the arm backend. The following Custom Instructions are added: cx1, cx1a, cx1d, cx1da, cx2, cx2a, cx2d, cx2da, cx3, cx3a, cx3d, cx3da. Specification can be found at https://developer.arm.com/docs/ddi0607/latest This patch distinguishes between enabling CDE for different coprocessor numbers by defining multiple architecture flags. This means that the parsing of the architecture extension flags is kept entirely in the existing code path. We introduce a new IT block state to indicate the behaviour of these instructions. This new state allows being used in an IT block or outside an IT block, but does not allow the instruction to be used inside a VPT block. We need this since the CX*A instruction versions can be used in IT blocks, but they aren't to have the conditional suffixes on them. Hence we need to mark an instruction as allowed in either position. We also need a new flag to objdump, in order to determine whether to disassemble an instruction as CDE related or not. Successfully regression tested on arm-none-eabi, and arm-wince-pe. gas/ChangeLog: 2020-02-10 Stam Markianos-Wright <stam.markianos-wright@arm.com> Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-arm.c (arm_ext_cde*): New feature sets for each CDE coprocessor that can be enabled. (enum pred_instruction_type): New pred type. (BAD_NO_VPT): New error message. (BAD_CDE): New error message. (BAD_CDE_COPROC): New error message. (enum operand_parse_code): Add new immediate operands. (parse_operands): Account for new immediate operands. (check_cde_operand): New. (cde_coproc_enabled): New. (cde_coproc_pos): New. (cde_handle_coproc): New. (cxn_handle_predication): New. (do_custom_instruction_1): New. (do_custom_instruction_2): New. (do_custom_instruction_3): New. (do_cx1): New. (do_cx1a): New. (do_cx1d): New. (do_cx1da): New. (do_cx2): New. (do_cx2a): New. (do_cx2d): New. (do_cx2da): New. (do_cx3): New. (do_cx3a): New. (do_cx3d): New. (do_cx3da): New. (handle_pred_state): Define new IT block behaviour. (insns): Add newn CX*{,d}{,a} instructions. (CDE_EXTENSIONS,armv8m_main_ext_table,armv8_1m_main_ext_table): Define new cdecp extension strings. * doc/c-arm.texi: Document new cdecp extension arguments. * testsuite/gas/arm/cde-scalar.d: New test. * testsuite/gas/arm/cde-scalar.s: New test. * testsuite/gas/arm/cde-warnings.d: New test. * testsuite/gas/arm/cde-warnings.l: New test. * testsuite/gas/arm/cde-warnings.s: New test. * testsuite/gas/arm/cde.d: New test. * testsuite/gas/arm/cde.s: New test. include/ChangeLog: 2020-02-10 Stam Markianos-Wright <stam.markianos-wright@arm.com> Matthew Malcomson <matthew.malcomson@arm.com> * opcode/arm.h (ARM_EXT2_CDE): New extension macro. (ARM_EXT2_CDE0): New extension macro. (ARM_EXT2_CDE1): New extension macro. (ARM_EXT2_CDE2): New extension macro. (ARM_EXT2_CDE3): New extension macro. (ARM_EXT2_CDE4): New extension macro. (ARM_EXT2_CDE5): New extension macro. (ARM_EXT2_CDE6): New extension macro. (ARM_EXT2_CDE7): New extension macro. opcodes/ChangeLog: 2020-02-10 Stam Markianos-Wright <stam.markianos-wright@arm.com> Matthew Malcomson <matthew.malcomson@arm.com> * arm-dis.c (struct cdeopcode32): New. (CDE_OPCODE): New macro. (cde_opcodes): New disassembly table. (regnames): New option to table. (cde_coprocs): New global variable. (print_insn_cde): New (print_insn_thumb32): Use print_insn_cde. (parse_arm_disassembler_options): Parse coprocN args.
Diffstat (limited to 'include/opcode/arm.h')
-rw-r--r--include/opcode/arm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 6d8c3d0..979bd20 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -79,6 +79,15 @@
#define ARM_EXT2_CRC 0x00080000 /* ARMv8 CRC32 */
#define ARM_EXT2_MVE 0x00100000 /* MVE Integer extension. */
#define ARM_EXT2_MVE_FP 0x00200000 /* MVE Floating Point extension. */
+#define ARM_EXT2_CDE 0x00400000 /* Custom Datapath Extension. */
+#define ARM_EXT2_CDE0 0x00800000 /* Using CDE coproc 0. */
+#define ARM_EXT2_CDE1 0x01000000 /* Using CDE coproc 1. */
+#define ARM_EXT2_CDE2 0x02000000 /* Using CDE coproc 2. */
+#define ARM_EXT2_CDE3 0x04000000 /* Using CDE coproc 3. */
+#define ARM_EXT2_CDE4 0x08000000 /* Using CDE coproc 4. */
+#define ARM_EXT2_CDE5 0x10000000 /* Using CDE coproc 5. */
+#define ARM_EXT2_CDE6 0x20000000 /* Using CDE coproc 6. */
+#define ARM_EXT2_CDE7 0x40000000 /* Using CDE coproc 7. */
/* Co-processor space extensions. */
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */