diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-02-10 16:38:00 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-02-10 16:50:14 +0000 |
commit | 4934a27c8c1d5c8623366f5dbafae8af60b96bc0 (patch) | |
tree | 158a8b56e97476a4a068001bf7c3d90f72a2f162 /gas/testsuite | |
parent | 4b5aaf5f6992319c2c72e080a1a55842640b8732 (diff) | |
download | gdb-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 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arm/cde-scalar.d | 117 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-scalar.s | 206 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-warnings.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-warnings.l | 175 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-warnings.s | 335 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde.d | 119 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde.s | 3 |
7 files changed, 960 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arm/cde-scalar.d b/gas/testsuite/gas/arm/cde-scalar.d new file mode 100644 index 0000000..3626012 --- /dev/null +++ b/gas/testsuite/gas/arm/cde-scalar.d @@ -0,0 +1,117 @@ +#name: Custom Datapath Extension Scalar bits (CDE) +#source: cde-scalar.s +#as: -mno-warn-deprecated -march=armv8-m.main+cdecp0+cdecp7 -I$srcdir/$subdir +#as: -mno-warn-deprecated -march=armv8-m.main+cdecp0+cdecp1+cdecp2+cdecp3+cdecp4+cdecp5+cdecp6+cdecp7 -I$srcdir/$subdir +#objdump: -M force-thumb -dr --show-raw-insn -marmv8-m.main -M coproc0=cde -M coproc7=cde +#... +00000000 <\.text>: + *[0-9a-f]+: ee00 0000 cx1 p0, r0, #0 + *[0-9a-f]+: ee3f 0000 cx1 p0, r0, #8064 + *[0-9a-f]+: ee00 0080 cx1 p0, r0, #64 + *[0-9a-f]+: ee00 003f cx1 p0, r0, #63 + *[0-9a-f]+: ee00 0700 cx1 p7, r0, #0 + *[0-9a-f]+: ee00 f000 cx1 p0, APSR_nzcv, #0 + *[0-9a-f]+: ee00 9000 cx1 p0, r9, #0 + *[0-9a-f]+: fe00 0000 cx1a p0, r0, #0 + *[0-9a-f]+: fe3f 0000 cx1a p0, r0, #8064 + *[0-9a-f]+: fe00 0080 cx1a p0, r0, #64 + *[0-9a-f]+: fe00 003f cx1a p0, r0, #63 + *[0-9a-f]+: fe00 0700 cx1a p7, r0, #0 + *[0-9a-f]+: fe00 f000 cx1a p0, APSR_nzcv, #0 + *[0-9a-f]+: fe00 9000 cx1a p0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe00 0000 cx1a p0, r0, #0 + *[0-9a-f]+: ee00 0040 cx1d p0, r0, r1, #0 + *[0-9a-f]+: ee3f 0040 cx1d p0, r0, r1, #8064 + *[0-9a-f]+: ee00 00c0 cx1d p0, r0, r1, #64 + *[0-9a-f]+: ee00 007f cx1d p0, r0, r1, #63 + *[0-9a-f]+: ee00 0740 cx1d p7, r0, r1, #0 + *[0-9a-f]+: ee00 a040 cx1d p0, sl, fp, #0 + *[0-9a-f]+: fe00 0040 cx1da p0, r0, r1, #0 + *[0-9a-f]+: fe3f 0040 cx1da p0, r0, r1, #8064 + *[0-9a-f]+: fe00 00c0 cx1da p0, r0, r1, #64 + *[0-9a-f]+: fe00 007f cx1da p0, r0, r1, #63 + *[0-9a-f]+: fe00 0740 cx1da p7, r0, r1, #0 + *[0-9a-f]+: fe00 a040 cx1da p0, sl, fp, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe00 0040 cx1da p0, r0, r1, #0 + *[0-9a-f]+: ee40 0000 cx2 p0, r0, r0, #0 + *[0-9a-f]+: ee70 0000 cx2 p0, r0, r0, #384 + *[0-9a-f]+: ee40 0080 cx2 p0, r0, r0, #64 + *[0-9a-f]+: ee40 003f cx2 p0, r0, r0, #63 + *[0-9a-f]+: ee40 0700 cx2 p7, r0, r0, #0 + *[0-9a-f]+: ee40 f000 cx2 p0, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee40 9000 cx2 p0, r9, r0, #0 + *[0-9a-f]+: ee4f 0000 cx2 p0, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee49 0000 cx2 p0, r0, r9, #0 + *[0-9a-f]+: fe40 0000 cx2a p0, r0, r0, #0 + *[0-9a-f]+: fe70 0000 cx2a p0, r0, r0, #384 + *[0-9a-f]+: fe40 0080 cx2a p0, r0, r0, #64 + *[0-9a-f]+: fe40 003f cx2a p0, r0, r0, #63 + *[0-9a-f]+: fe40 0700 cx2a p7, r0, r0, #0 + *[0-9a-f]+: fe40 f000 cx2a p0, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe40 9000 cx2a p0, r9, r0, #0 + *[0-9a-f]+: fe4f 0000 cx2a p0, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe49 0000 cx2a p0, r0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe40 0000 cx2a p0, r0, r0, #0 + *[0-9a-f]+: ee40 0040 cx2d p0, r0, r1, r0, #0 + *[0-9a-f]+: ee70 0040 cx2d p0, r0, r1, r0, #384 + *[0-9a-f]+: ee40 00c0 cx2d p0, r0, r1, r0, #64 + *[0-9a-f]+: ee40 007f cx2d p0, r0, r1, r0, #63 + *[0-9a-f]+: ee40 0740 cx2d p7, r0, r1, r0, #0 + *[0-9a-f]+: ee40 a040 cx2d p0, sl, fp, r0, #0 + *[0-9a-f]+: ee4f 0040 cx2d p0, r0, r1, APSR_nzcv, #0 + *[0-9a-f]+: ee49 0040 cx2d p0, r0, r1, r9, #0 + *[0-9a-f]+: fe40 0040 cx2da p0, r0, r1, r0, #0 + *[0-9a-f]+: fe70 0040 cx2da p0, r0, r1, r0, #384 + *[0-9a-f]+: fe40 00c0 cx2da p0, r0, r1, r0, #64 + *[0-9a-f]+: fe40 007f cx2da p0, r0, r1, r0, #63 + *[0-9a-f]+: fe40 0740 cx2da p7, r0, r1, r0, #0 + *[0-9a-f]+: fe40 a040 cx2da p0, sl, fp, r0, #0 + *[0-9a-f]+: fe4f 0040 cx2da p0, r0, r1, APSR_nzcv, #0 + *[0-9a-f]+: fe49 0040 cx2da p0, r0, r1, r9, #0 + *[0-9a-f]+: ee80 0000 cx3 p0, r0, r0, r0, #0 + *[0-9a-f]+: eef0 0000 cx3 p0, r0, r0, r0, #56 + *[0-9a-f]+: ee80 0080 cx3 p0, r0, r0, r0, #4 + *[0-9a-f]+: ee80 0030 cx3 p0, r0, r0, r0, #3 + *[0-9a-f]+: ee80 0700 cx3 p7, r0, r0, r0, #0 + *[0-9a-f]+: ee80 000f cx3 p0, APSR_nzcv, r0, r0, #0 + *[0-9a-f]+: ee80 0009 cx3 p0, r9, r0, r0, #0 + *[0-9a-f]+: ee8f 0000 cx3 p0, r0, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee89 0000 cx3 p0, r0, r9, r0, #0 + *[0-9a-f]+: ee80 f000 cx3 p0, r0, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee80 9000 cx3 p0, r0, r0, r9, #0 + *[0-9a-f]+: fe80 0000 cx3a p0, r0, r0, r0, #0 + *[0-9a-f]+: fef0 0000 cx3a p0, r0, r0, r0, #56 + *[0-9a-f]+: fe80 0080 cx3a p0, r0, r0, r0, #4 + *[0-9a-f]+: fe80 0030 cx3a p0, r0, r0, r0, #3 + *[0-9a-f]+: fe80 0700 cx3a p7, r0, r0, r0, #0 + *[0-9a-f]+: fe80 000f cx3a p0, APSR_nzcv, r0, r0, #0 + *[0-9a-f]+: fe80 0009 cx3a p0, r9, r0, r0, #0 + *[0-9a-f]+: fe8f 0000 cx3a p0, r0, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe89 0000 cx3a p0, r0, r9, r0, #0 + *[0-9a-f]+: fe80 f000 cx3a p0, r0, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe80 9000 cx3a p0, r0, r0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe80 0000 cx3a p0, r0, r0, r0, #0 + *[0-9a-f]+: ee80 0040 cx3d p0, r0, r1, r0, r0, #0 + *[0-9a-f]+: eef0 0040 cx3d p0, r0, r1, r0, r0, #56 + *[0-9a-f]+: ee80 00c0 cx3d p0, r0, r1, r0, r0, #4 + *[0-9a-f]+: ee80 0070 cx3d p0, r0, r1, r0, r0, #3 + *[0-9a-f]+: ee80 0740 cx3d p7, r0, r1, r0, r0, #0 + *[0-9a-f]+: ee80 004a cx3d p0, sl, fp, r0, r0, #0 + *[0-9a-f]+: ee8f 0040 cx3d p0, r0, r1, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee89 0040 cx3d p0, r0, r1, r9, r0, #0 + *[0-9a-f]+: ee80 f040 cx3d p0, r0, r1, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee80 9040 cx3d p0, r0, r1, r0, r9, #0 + *[0-9a-f]+: fe80 0040 cx3da p0, r0, r1, r0, r0, #0 + *[0-9a-f]+: fef0 0040 cx3da p0, r0, r1, r0, r0, #56 + *[0-9a-f]+: fe80 00c0 cx3da p0, r0, r1, r0, r0, #4 + *[0-9a-f]+: fe80 0070 cx3da p0, r0, r1, r0, r0, #3 + *[0-9a-f]+: fe80 0740 cx3da p7, r0, r1, r0, r0, #0 + *[0-9a-f]+: fe80 004a cx3da p0, sl, fp, r0, r0, #0 + *[0-9a-f]+: fe8f 0040 cx3da p0, r0, r1, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe89 0040 cx3da p0, r0, r1, r9, r0, #0 + *[0-9a-f]+: fe80 f040 cx3da p0, r0, r1, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe80 9040 cx3da p0, r0, r1, r0, r9, #0 diff --git a/gas/testsuite/gas/arm/cde-scalar.s b/gas/testsuite/gas/arm/cde-scalar.s new file mode 100644 index 0000000..ac188a3 --- /dev/null +++ b/gas/testsuite/gas/arm/cde-scalar.s @@ -0,0 +1,206 @@ +.syntax unified +# Extra tests everywhere: +# Ensure that setting the register to something in r[1-12] works. + +# cx1{a} Has arguments in the following form +# 111a111000iiiiiidddd0pppi0iiiiii +# +# Variants to test: +# - Base (everything we can set to zero) +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Each register 9 (0b1001), APSR_nzcv, or all zeros +# - Coprocessor num set to 7 +# - Everything again with the `a` version (to double check parsing). +# - Accumulator versions without optional argument (to check parsing) +# +# IT blocks: +# Non-accumulator versions are UNPREDICTABLE in IT blocks. +# Accumulator versions are allowed in IT blocks. + +# cx1{a} extra tests. +# Arm conditional +cx1 p0, r0, #0 +cx1 p0, r0, #8064 +cx1 p0, r0, #64 +cx1 p0, r0, #63 +cx1 p7, r0, #0 +cx1 p0, APSR_nzcv, #0 +cx1 p0, r9, #0 +cx1a p0, r0, #0 +cx1a p0, r0, #8064 +cx1a p0, r0, #64 +cx1a p0, r0, #63 +cx1a p7, r0, #0 +cx1a p0, APSR_nzcv, #0 +cx1a p0, r9, #0 + +it ne +cx1a p0, r0, #0 + +# cx1d{a} encoding of following form: +# 111a111000iiiiiidddd0pppi1iiiiii +# +# Variants to test: +# - Base (everything we can set to zero) +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Destination register 10 (0b1010) or all zeros +# - Coprocessor num set to 7 +# - Everything again with the `a` version (to double check parsing). +# - Accumulator versions without optional argument (to check parsing) +cx1d p0, r0, r1, #0 +cx1d p0, r0, r1, #8064 +cx1d p0, r0, r1, #64 +cx1d p0, r0, r1, #63 +cx1d p7, r0, r1, #0 +cx1d p0, r10, r11, #0 +cx1da p0, r0, r1, #0 +cx1da p0, r0, r1, #8064 +cx1da p0, r0, r1, #64 +cx1da p0, r0, r1, #63 +cx1da p7, r0, r1, #0 +cx1da p0, r10, r11, #0 + +it ne +cx1da p0, r0, r1, #0 + + +# cx2{a} Has arguments of the following form: +# 111a111001iinnnndddd0pppi0iiiiii +# +# Variants to test: +# - Base (everything we can set to zero) +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Each register 9 (0b1001), APSR_nzcv, or all zeros +# - Coprocessor num set to 7 +# - Everything again with the `a` version (to double check parsing). +# - Accumulator versions without optional argument (to check parsing) +cx2 p0, r0, r0, #0 +cx2 p0, r0, r0, #384 +cx2 p0, r0, r0, #64 +cx2 p0, r0, r0, #63 +cx2 p7, r0, r0, #0 +cx2 p0, APSR_nzcv, r0, #0 +cx2 p0, r9, r0, #0 +cx2 p0, r0, APSR_nzcv, #0 +cx2 p0, r0, r9, #0 +cx2a p0, r0, r0, #0 +cx2a p0, r0, r0, #384 +cx2a p0, r0, r0, #64 +cx2a p0, r0, r0, #63 +cx2a p7, r0, r0, #0 +cx2a p0, APSR_nzcv, r0, #0 +cx2a p0, r9, r0, #0 +cx2a p0, r0, APSR_nzcv, #0 +cx2a p0, r0, r9, #0 + +it ne +cx2a p0, r0, r0, #0 + +# cx2d{a} encoding has following form: +# 111a111001iinnnndddd0pppi1iiiiii +# +# - Base (everything we can set to zero) +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Destination register 10 (0b1010) or all zeros +# - Coprocessor num set to 7 +# - Everything again with the `a` version (to double check parsing). +# - Accumulator versions without optional argument (to check parsing) +cx2d p0, r0, r1, r0, #0 +cx2d p0, r0, r1, r0, #384 +cx2d p0, r0, r1, r0, #64 +cx2d p0, r0, r1, r0, #63 +cx2d p7, r0, r1, r0, #0 +cx2d p0, r10, r11, r0, #0 +cx2d p0, r0, r1, APSR_nzcv, #0 +cx2d p0, r0, r1, r9, #0 +cx2da p0, r0, r1, r0, #0 +cx2da p0, r0, r1, r0, #384 +cx2da p0, r0, r1, r0, #64 +cx2da p0, r0, r1, r0, #63 +cx2da p7, r0, r1, r0, #0 +cx2da p0, r10, r11, r0, #0 +cx2da p0, r0, r1, APSR_nzcv, #0 +cx2da p0, r0, r1, r9, #0 + +# cx3{a} Has arguments in the following form: +# 111a11101iiinnnnmmmm0pppi0iidddd +# +# Variants to test: +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# - Base (everything we can set to zero) +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Each register 9 (0b1001), APSR_nzcv, or all zeros +# - Coprocessor num set to 7 +# - Everything again with the `a` version (to double check parsing). +# - Accumulator versions without optional argument (to check parsing) +cx3 p0, r0, r0, r0, #0 +cx3 p0, r0, r0, r0, #56 +cx3 p0, r0, r0, r0, #4 +cx3 p0, r0, r0, r0, #3 +cx3 p7, r0, r0, r0, #0 +cx3 p0, APSR_nzcv, r0, r0, #0 +cx3 p0, r9, r0, r0, #0 +cx3 p0, r0, APSR_nzcv, r0, #0 +cx3 p0, r0, r9, r0, #0 +cx3 p0, r0, r0, APSR_nzcv, #0 +cx3 p0, r0, r0, r9, #0 +cx3a p0, r0, r0, r0, #0 +cx3a p0, r0, r0, r0, #56 +cx3a p0, r0, r0, r0, #4 +cx3a p0, r0, r0, r0, #3 +cx3a p7, r0, r0, r0, #0 +cx3a p0, APSR_nzcv, r0, r0, #0 +cx3a p0, r9, r0, r0, #0 +cx3a p0, r0, APSR_nzcv, r0, #0 +cx3a p0, r0, r9, r0, #0 +cx3a p0, r0, r0, APSR_nzcv, #0 +cx3a p0, r0, r0, r9, #0 + +it ne +cx3a p0, r0, r0, r0, #0 + +# cx3d{a} encoding has following form: +# 111a11101iiinnnnmmmm0pppi1iidddd +# +# Variants to test: +# - Toggle 'a' +# - immediates that set each set of `i` to ones in turn. +# (imm = op1:op2:op3 , which is each group of `i` from left to write +# concatenated) +# - Destination register 10 (0b1010) or all zeros +# - Source register 9 (0b1001), APSR_nzcv, or all zeros + +# No longer allows APSR_nzcv in destination register +cx3d p0, r0, r1, r0, r0, #0 +cx3d p0, r0, r1, r0, r0, #56 +cx3d p0, r0, r1, r0, r0, #4 +cx3d p0, r0, r1, r0, r0, #3 +cx3d p7, r0, r1, r0, r0, #0 +cx3d p0, r10, r11, r0, r0, #0 +cx3d p0, r0, r1, APSR_nzcv, r0, #0 +cx3d p0, r0, r1, r9, r0, #0 +cx3d p0, r0, r1, r0, APSR_nzcv, #0 +cx3d p0, r0, r1, r0, r9, #0 +cx3da p0, r0, r1, r0, r0, #0 +cx3da p0, r0, r1, r0, r0, #56 +cx3da p0, r0, r1, r0, r0, #4 +cx3da p0, r0, r1, r0, r0, #3 +cx3da p7, r0, r1, r0, r0, #0 +cx3da p0, r10, r11, r0, r0, #0 +cx3da p0, r0, r1, APSR_nzcv, r0, #0 +cx3da p0, r0, r1, r9, r0, #0 +cx3da p0, r0, r1, r0, APSR_nzcv, #0 +cx3da p0, r0, r1, r0, r9, #0 + + diff --git a/gas/testsuite/gas/arm/cde-warnings.d b/gas/testsuite/gas/arm/cde-warnings.d new file mode 100644 index 0000000..1421b99 --- /dev/null +++ b/gas/testsuite/gas/arm/cde-warnings.d @@ -0,0 +1,5 @@ +#name: Custom Datapath Extension (CDE) Warnings +#source: cde-warnings.s +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+mve -I$srcdir/$subdir +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+cdecp2+cdecp3+cdecp4+cdecp5+cdecp6+cdecp7+mve -I$srcdir/$subdir +#error_output: cde-warnings.l diff --git a/gas/testsuite/gas/arm/cde-warnings.l b/gas/testsuite/gas/arm/cde-warnings.l new file mode 100644 index 0000000..abbd10a --- /dev/null +++ b/gas/testsuite/gas/arm/cde-warnings.l @@ -0,0 +1,175 @@ +[^ :]+: Assembler messages: +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1 p0,r0,#8192' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1a p0,r0,#8192' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1 p0,r0,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1a p0,r0,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx1 p8,r0,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx1a p8,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1 p0,r16,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1a p0,r16,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx1 p0,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx1a p0,r13,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx1 p0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1ne p0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1ane p0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx1 p1,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx1a p1,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx1 p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx1a p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1 p0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1a p0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx1 p0,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx1a p0,r15,#0' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1d p0,r0,r1,#8192' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1da p0,r0,r1,#8192' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1d p0,r0,r1,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx1da p0,r0,r1,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx1d p8,r0,r1,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx1da p8,r0,r1,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx1d p0,r16,r17,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx1da p0,r16,r17,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx1d p0,APSR_nzcv,r15,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx1da p0,APSR_nzcv,r15,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx1d p0,r9,r10,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx1da p0,r9,r10,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx1d p0,r13,r14,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx1da p0,r13,r14,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx1d p0,r0,r1,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1dne p0,r0,r1,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1dane p0,r0,r1,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx1d p1,r0,r1,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx1da p1,r0,r1,#0' +[^ :]+:[0-9]+: Error: cx1d requires consecutive destination registers\. -- `cx1d p0,r0,r2,#0' +[^ :]+:[0-9]+: Error: cx1d requires consecutive destination registers\. -- `cx1da p0,r0,r2,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx1d p0,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx1da p0,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1d p0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx1da p0,r0,#0' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2 p0,r0,r0,#512' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2a p0,r0,r0,#512' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2 p0,r0,r0,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2a p0,r0,r0,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx2 p8,r0,r0,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx2a p8,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2 p0,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2a p0,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2 p0,r0,r16,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2a p0,r0,r16,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2 p0,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2a p0,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2 p0,r0,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2a p0,r0,r13,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx2 p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2ne p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2ane p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx2 p1,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx2a p1,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx2 p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx2a p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2 p0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2a p0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2 p0,r0,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2a p0,r0,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2 p0,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2a p0,r15,r0,#0' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2d p0,r0,r1,r0,#512' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2da p0,r0,r1,r0,#512' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2d p0,r0,r1,r0,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx2da p0,r0,r1,r0,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx2d p8,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx2da p8,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx2d p0,r16,r17,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx2da p0,r16,r17,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2d p0,r0,r1,r16,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2da p0,r0,r1,r16,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx2d p0,APSR_nzcv,r15,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx2da p0,APSR_nzcv,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx2d p0,r9,r10,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx2da p0,r9,r10,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx2d p0,r12,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx2da p0,r12,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2d p0,r0,r1,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2da p0,r0,r1,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2d p0,r0,r1,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx2da p0,r0,r1,r15,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx2d p0,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2dne p0,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2dane p0,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx2d p1,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx2da p1,r0,r1,r0,#0' +[^ :]+:[0-9]+: Error: cx2d requires consecutive destination registers\. -- `cx2d p0,r0,r2,r0,#0' +[^ :]+:[0-9]+: Error: cx2d requires consecutive destination registers\. -- `cx2da p0,r0,r2,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx2d p0,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx2da p0,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2d p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx2da p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3 p0,r0,r0,r0,#64' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3a p0,r0,r0,r0,#64' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3 p0,r0,r0,r0,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3a p0,r0,r0,r0,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx3 p8,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx3a p8,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3 p0,r16,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3a p0,r16,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3 p0,r0,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3a p0,r0,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3 p0,r0,r0,r16,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3a p0,r0,r0,r16,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r13,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r13,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r0,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r0,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r0,r0,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r0,r0,r13,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx3 p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3ne p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3ane p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx3 p1,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx3a p1,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx3 p0,r0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx3a p0,r0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3 p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3a p0,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r15,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r15,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r0,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r0,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3 p0,r0,r0,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3a p0,r0,r0,r15,#0' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3d p0,r0,r1,r0,r0,#64' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3da p0,r0,r1,r0,r0,#64' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3d p0,r0,r1,r0,r0,#-1' +[^ :]+:[0-9]+: Error: immediate value out of range -- `cx3da p0,r0,r1,r0,r0,#-1' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx3d p8,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: CDE Coprocessor must be in range 0-7 -- `cx3da p8,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx3d p0,r16,r17,r0,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx3da p0,r16,r17,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3d p0,r0,r1,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3da p0,r0,r1,r16,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3d p0,r0,r1,r0,r16,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3da p0,r0,r1,r0,r16,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx3d p0,APSR_nzcv,r15,r0,r0,#0' +[^ :]+:[0-9]+: Error: ARM register expected -- `cx3da p0,APSR_nzcv,r15,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx3d p0,r9,r10,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx3da p0,r9,r10,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx3d p0,r12,r13,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be an even register between r0-r10\. -- `cx3da p0,r12,r13,r0,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3d p0,r0,r1,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3da p0,r0,r1,r13,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3d p0,r0,r1,r0,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3da p0,r0,r1,r0,r13,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3d p0,r0,r1,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3da p0,r0,r1,r15,r0,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3d p0,r0,r1,r0,r15,#0' +[^ :]+:[0-9]+: Error: Register must be r0-r14 except r13, or APSR_nzcv\. -- `cx3da p0,r0,r1,r0,r15,#0' +[^ :]+:[0-9]+: Error: instruction not allowed in IT block -- `cx3d p0,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3dne p0,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3dane p0,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx3d p1,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: coprocessor for insn is not enabled for cde -- `cx3da p1,r0,r1,r0,r0,#0' +[^ :]+:[0-9]+: Error: cx3d requires consecutive destination registers\. -- `cx3d p0,r0,r2,r0,r0,#0' +[^ :]+:[0-9]+: Error: cx3d requires consecutive destination registers\. -- `cx3da p0,r0,r2,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx3d p0,r0,r1,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: constant expression required -- `cx3da p0,r0,r1,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3d p0,r0,r0,r0,#0' +[^ :]+:[0-9]+: Error: syntax error -- `cx3da p0,r0,r0,r0,#0' diff --git a/gas/testsuite/gas/arm/cde-warnings.s b/gas/testsuite/gas/arm/cde-warnings.s new file mode 100644 index 0000000..8e5759a --- /dev/null +++ b/gas/testsuite/gas/arm/cde-warnings.s @@ -0,0 +1,335 @@ +.syntax unified +# cx1{a} +# Immediate out of range. +# Each register out of range. +# r13 => constrained unpredictable +# itblock => constrained unpredictable +# Error given when using coprocessor number not enabled on command line. +# Too many arguments +# Too little arguments +# r15 instead of APSR_nzcv + +cx1 p0, r0, #8192 +cx1a p0, r0, #8192 +cx1 p0, r0, #-1 +cx1a p0, r0, #-1 + +cx1 p8, r0, #0 +cx1a p8, r0, #0 + +cx1 p0, r16, #0 +cx1a p0, r16, #0 + +cx1 p0, r13, #0 +cx1a p0, r13, #0 + +ittt ne +cx1 p0, r0, #0 +cx1ne p0, r0, #0 +cx1ane p0, r0, #0 + +cx1 p1, r0, #0 +cx1a p1, r0, #0 + +cx1 p0, r0, r0, #0 +cx1a p0, r0, r0, #0 + +cx1 p0, #0 +cx1a p0, #0 + +cx1 p0, r15, #0 +cx1a p0, r15, #0 + +# cx1d{a} +# Immediate out of range. +# Each register out of range. +# APSR_nzcv disallowed as destination register. +# rd<odd> => constrained unpredictable +# r< N > 10 > => constrained unpredictable +# IT block => constrained unpredictable +# +# Error given when using coprocessor number not enabled on command line. +# Disallow non-incrementing values in destination. +# Too many arguments +# Too little arguments + +cx1d p0, r0, r1, #8192 +cx1da p0, r0, r1, #8192 +cx1d p0, r0, r1, #-1 +cx1da p0, r0, r1, #-1 + +cx1d p8, r0, r1, #0 +cx1da p8, r0, r1, #0 + +cx1d p0, r16, r17, #0 +cx1da p0, r16, r17, #0 + +cx1d p0, APSR_nzcv, r15, #0 +cx1da p0, APSR_nzcv, r15, #0 + +cx1d p0, r9, r10, #0 +cx1da p0, r9, r10, #0 + +cx1d p0, r13, r14, #0 +cx1da p0, r13, r14, #0 + +ittt ne +cx1d p0, r0, r1, #0 +cx1dne p0, r0, r1, #0 +cx1dane p0, r0, r1, #0 + +cx1d p1, r0, r1, #0 +cx1da p1, r0, r1, #0 + +cx1d p0, r0, r2, #0 +cx1da p0, r0, r2, #0 + +cx1d p0, r0, r1, r0, #0 +cx1da p0, r0, r1, r0, #0 + +cx1d p0, r0, #0 +cx1da p0, r0, #0 + +# cx2{a} +# Immediate out of range. +# Each register out of range. +# rd13 => constrained unpredictable +# rn13 => constrained unpredictable +# IT block => constrained unpredictable +# +# Error given when using coprocessor number not enabled on command line. +# Too many arguments +# Too little arguments. +# r15 instead of APSR_nzcv + +cx2 p0, r0, r0, #512 +cx2a p0, r0, r0, #512 +cx2 p0, r0, r0, #-1 +cx2a p0, r0, r0, #-1 + +cx2 p8, r0, r0, #0 +cx2a p8, r0, r0, #0 + +cx2 p0, r16, r0, #0 +cx2a p0, r16, r0, #0 + +cx2 p0, r0, r16, #0 +cx2a p0, r0, r16, #0 + +cx2 p0, r13, r0, #0 +cx2a p0, r13, r0, #0 + +cx2 p0, r0, r13, #0 +cx2a p0, r0, r13, #0 + +ittt ne +cx2 p0, r0, r0, #0 +cx2ne p0, r0, r0, #0 +cx2ane p0, r0, r0, #0 + +cx2 p1, r0, r0, #0 +cx2a p1, r0, r0, #0 + +cx2 p0, r0, r0, r0, #0 +cx2a p0, r0, r0, r0, #0 + +cx2 p0, r0, #0 +cx2a p0, r0, #0 + +cx2 p0, r0, r15, #0 +cx2a p0, r0, r15, #0 + +cx2 p0, r15, r0, #0 +cx2a p0, r15, r0, #0 + +# cx2d{a} +# Immediate out of range. +# Each register out of range. +# APSR_nzcv disallowed as destination register. +# rd<odd> => constrained unpredictable +# rd< N > 10 > => constrained unpredictable +# rn13 => constrained unpredictable +# IT block => constrained unpredictable +# +# Error given when using coprocessor number not enabled on command line. +# Disallow non-incrementing values in destination. +# Too many arguments +# Too little arguments +cx2d p0, r0, r1, r0, #512 +cx2da p0, r0, r1, r0, #512 +cx2d p0, r0, r1, r0, #-1 +cx2da p0, r0, r1, r0, #-1 + +cx2d p8, r0, r1, r0, #0 +cx2da p8, r0, r1, r0, #0 + +cx2d p0, r16, r17, r0, #0 +cx2da p0, r16, r17, r0, #0 + +cx2d p0, r0, r1, r16, #0 +cx2da p0, r0, r1, r16, #0 + +cx2d p0, APSR_nzcv, r15, r0, #0 +cx2da p0, APSR_nzcv, r15, r0, #0 + +cx2d p0, r9, r10, r0, #0 +cx2da p0, r9, r10, r0, #0 + +cx2d p0, r12, r13, r0, #0 +cx2da p0, r12, r13, r0, #0 + +cx2d p0, r0, r1, r13, #0 +cx2da p0, r0, r1, r13, #0 + +cx2d p0, r0, r1, r15, #0 +cx2da p0, r0, r1, r15, #0 + +ittt ne +cx2d p0, r0, r1, r0, #0 +cx2dne p0, r0, r1, r0, #0 +cx2dane p0, r0, r1, r0, #0 + +cx2d p1, r0, r1, r0, #0 +cx2da p1, r0, r1, r0, #0 + +cx2d p0, r0, r2, r0, #0 +cx2da p0, r0, r2, r0, #0 + +cx2d p0, r0, r1, r0, r0, #0 +cx2da p0, r0, r1, r0, r0, #0 + +cx2d p0, r0, r0, #0 +cx2da p0, r0, r0, #0 + +# cx2{a} +# Immediate out of range. +# Each register out of range. +# rd13 => constrained unpredictable +# rn13 => constrained unpredictable +# rm13 => constrained unpredictable +# IT block => constrained unpredictable +# +# Error given when using coprocessor number not enabled on command line. +# Too many arguments +# Too little arguments. +# r15 instead of APSR_nzcv + +cx3 p0, r0, r0, r0, #64 +cx3a p0, r0, r0, r0, #64 +cx3 p0, r0, r0, r0, #-1 +cx3a p0, r0, r0, r0, #-1 + +cx3 p8, r0, r0, r0, #0 +cx3a p8, r0, r0, r0, #0 + +cx3 p0, r16, r0, r0, #0 +cx3a p0, r16, r0, r0, #0 + +cx3 p0, r0, r16, r0, #0 +cx3a p0, r0, r16, r0, #0 + +cx3 p0, r0, r0, r16, #0 +cx3a p0, r0, r0, r16, #0 + +cx3 p0, r13, r0, r0, #0 +cx3a p0, r13, r0, r0, #0 + +cx3 p0, r0, r13, r0, #0 +cx3a p0, r0, r13, r0, #0 + +cx3 p0, r0, r0, r13, #0 +cx3a p0, r0, r0, r13, #0 + +ittt ne +cx3 p0, r0, r0, r0, #0 +cx3ne p0, r0, r0, r0, #0 +cx3ane p0, r0, r0, r0, #0 + +cx3 p1, r0, r0, r0, #0 +cx3a p1, r0, r0, r0, #0 + +cx3 p0, r0, r0, r0, r0, #0 +cx3a p0, r0, r0, r0, r0, #0 + +cx3 p0, r0, r0, #0 +cx3a p0, r0, r0, #0 + +cx3 p0, r15, r0, r0, #0 +cx3a p0, r15, r0, r0, #0 + +cx3 p0, r0, r15, r0, #0 +cx3a p0, r0, r15, r0, #0 + +cx3 p0, r0, r0, r15, #0 +cx3a p0, r0, r0, r15, #0 + +# cx3d{a} +# Immediate out of range. +# Each register out of range. +# APSR_nzcv disallowed as destination register. +# rd<odd> => constrained unpredictable +# rd< N > 10 > => constrained unpredictable +# rn13 => constrained unpredictable +# rm13 => constrained unpredictable +# rn15 disallowed (pattern matches APSR_nzcv) +# rm15 disallowed (pattern matches APSR_nzcv) +# IT block => constrained unpredictable +# +# Error given when using coprocessor number not enabled on command line. +# Disallow non-incrementing values in destination. +# Too many arguments +# Too little arguments +cx3d p0, r0, r1, r0, r0, #64 +cx3da p0, r0, r1, r0, r0, #64 +cx3d p0, r0, r1, r0, r0, #-1 +cx3da p0, r0, r1, r0, r0, #-1 + +cx3d p8, r0, r1, r0, r0, #0 +cx3da p8, r0, r1, r0, r0, #0 + +cx3d p0, r16, r17, r0, r0, #0 +cx3da p0, r16, r17, r0, r0, #0 + +cx3d p0, r0, r1, r16, r0, #0 +cx3da p0, r0, r1, r16, r0, #0 + +cx3d p0, r0, r1, r0, r16, #0 +cx3da p0, r0, r1, r0, r16, #0 + +cx3d p0, APSR_nzcv, r15, r0, r0, #0 +cx3da p0, APSR_nzcv, r15, r0, r0, #0 + +cx3d p0, r9, r10, r0, r0, #0 +cx3da p0, r9, r10, r0, r0, #0 + +cx3d p0, r12, r13, r0, r0, #0 +cx3da p0, r12, r13, r0, r0, #0 + +cx3d p0, r0, r1, r13, r0, #0 +cx3da p0, r0, r1, r13, r0, #0 + +cx3d p0, r0, r1, r0, r13, #0 +cx3da p0, r0, r1, r0, r13, #0 + +cx3d p0, r0, r1, r15, r0, #0 +cx3da p0, r0, r1, r15, r0, #0 + +cx3d p0, r0, r1, r0, r15, #0 +cx3da p0, r0, r1, r0, r15, #0 + +ittt ne +cx3d p0, r0, r1, r0, r0, #0 +cx3dne p0, r0, r1, r0, r0, #0 +cx3dane p0, r0, r1, r0, r0, #0 + +cx3d p1, r0, r1, r0, r0, #0 +cx3da p1, r0, r1, r0, r0, #0 + +cx3d p0, r0, r2, r0, r0, #0 +cx3da p0, r0, r2, r0, r0, #0 + +cx3d p0, r0, r1, r0, r0, r0, #0 +cx3da p0, r0, r1, r0, r0, r0, #0 + +cx3d p0, r0, r0, r0, #0 +cx3da p0, r0, r0, r0, #0 diff --git a/gas/testsuite/gas/arm/cde.d b/gas/testsuite/gas/arm/cde.d new file mode 100644 index 0000000..34de201 --- /dev/null +++ b/gas/testsuite/gas/arm/cde.d @@ -0,0 +1,119 @@ +#name: Custom Datapath Extension (CDE) +#source: cde.s +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+cdecp7+mve.fp -I$srcdir/$subdir +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+cdecp7+mve -I$srcdir/$subdir +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+cdecp1+cdecp2+cdecp3+cdecp4+cdecp5+cdecp6+cdecp7+mve.fp -I$srcdir/$subdir +#as: -mno-warn-deprecated -march=armv8.1-m.main+cdecp0+cdecp1+cdecp2+cdecp3+cdecp4+cdecp5+cdecp6+cdecp7+mve -I$srcdir/$subdir +#objdump: -M force-thumb -dr --show-raw-insn -marmv8.1-m.main -M coproc0=cde -M coproc7=cde +#... +00000000 <\.text>: + *[0-9a-f]+: ee00 0000 cx1 p0, r0, #0 + *[0-9a-f]+: ee3f 0000 cx1 p0, r0, #8064 + *[0-9a-f]+: ee00 0080 cx1 p0, r0, #64 + *[0-9a-f]+: ee00 003f cx1 p0, r0, #63 + *[0-9a-f]+: ee00 0700 cx1 p7, r0, #0 + *[0-9a-f]+: ee00 f000 cx1 p0, APSR_nzcv, #0 + *[0-9a-f]+: ee00 9000 cx1 p0, r9, #0 + *[0-9a-f]+: fe00 0000 cx1a p0, r0, #0 + *[0-9a-f]+: fe3f 0000 cx1a p0, r0, #8064 + *[0-9a-f]+: fe00 0080 cx1a p0, r0, #64 + *[0-9a-f]+: fe00 003f cx1a p0, r0, #63 + *[0-9a-f]+: fe00 0700 cx1a p7, r0, #0 + *[0-9a-f]+: fe00 f000 cx1a p0, APSR_nzcv, #0 + *[0-9a-f]+: fe00 9000 cx1a p0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe00 0000 cx1a p0, r0, #0 + *[0-9a-f]+: ee00 0040 cx1d p0, r0, r1, #0 + *[0-9a-f]+: ee3f 0040 cx1d p0, r0, r1, #8064 + *[0-9a-f]+: ee00 00c0 cx1d p0, r0, r1, #64 + *[0-9a-f]+: ee00 007f cx1d p0, r0, r1, #63 + *[0-9a-f]+: ee00 0740 cx1d p7, r0, r1, #0 + *[0-9a-f]+: ee00 a040 cx1d p0, sl, fp, #0 + *[0-9a-f]+: fe00 0040 cx1da p0, r0, r1, #0 + *[0-9a-f]+: fe3f 0040 cx1da p0, r0, r1, #8064 + *[0-9a-f]+: fe00 00c0 cx1da p0, r0, r1, #64 + *[0-9a-f]+: fe00 007f cx1da p0, r0, r1, #63 + *[0-9a-f]+: fe00 0740 cx1da p7, r0, r1, #0 + *[0-9a-f]+: fe00 a040 cx1da p0, sl, fp, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe00 0040 cx1da p0, r0, r1, #0 + *[0-9a-f]+: ee40 0000 cx2 p0, r0, r0, #0 + *[0-9a-f]+: ee70 0000 cx2 p0, r0, r0, #384 + *[0-9a-f]+: ee40 0080 cx2 p0, r0, r0, #64 + *[0-9a-f]+: ee40 003f cx2 p0, r0, r0, #63 + *[0-9a-f]+: ee40 0700 cx2 p7, r0, r0, #0 + *[0-9a-f]+: ee40 f000 cx2 p0, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee40 9000 cx2 p0, r9, r0, #0 + *[0-9a-f]+: ee4f 0000 cx2 p0, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee49 0000 cx2 p0, r0, r9, #0 + *[0-9a-f]+: fe40 0000 cx2a p0, r0, r0, #0 + *[0-9a-f]+: fe70 0000 cx2a p0, r0, r0, #384 + *[0-9a-f]+: fe40 0080 cx2a p0, r0, r0, #64 + *[0-9a-f]+: fe40 003f cx2a p0, r0, r0, #63 + *[0-9a-f]+: fe40 0700 cx2a p7, r0, r0, #0 + *[0-9a-f]+: fe40 f000 cx2a p0, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe40 9000 cx2a p0, r9, r0, #0 + *[0-9a-f]+: fe4f 0000 cx2a p0, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe49 0000 cx2a p0, r0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe40 0000 cx2a p0, r0, r0, #0 + *[0-9a-f]+: ee40 0040 cx2d p0, r0, r1, r0, #0 + *[0-9a-f]+: ee70 0040 cx2d p0, r0, r1, r0, #384 + *[0-9a-f]+: ee40 00c0 cx2d p0, r0, r1, r0, #64 + *[0-9a-f]+: ee40 007f cx2d p0, r0, r1, r0, #63 + *[0-9a-f]+: ee40 0740 cx2d p7, r0, r1, r0, #0 + *[0-9a-f]+: ee40 a040 cx2d p0, sl, fp, r0, #0 + *[0-9a-f]+: ee4f 0040 cx2d p0, r0, r1, APSR_nzcv, #0 + *[0-9a-f]+: ee49 0040 cx2d p0, r0, r1, r9, #0 + *[0-9a-f]+: fe40 0040 cx2da p0, r0, r1, r0, #0 + *[0-9a-f]+: fe70 0040 cx2da p0, r0, r1, r0, #384 + *[0-9a-f]+: fe40 00c0 cx2da p0, r0, r1, r0, #64 + *[0-9a-f]+: fe40 007f cx2da p0, r0, r1, r0, #63 + *[0-9a-f]+: fe40 0740 cx2da p7, r0, r1, r0, #0 + *[0-9a-f]+: fe40 a040 cx2da p0, sl, fp, r0, #0 + *[0-9a-f]+: fe4f 0040 cx2da p0, r0, r1, APSR_nzcv, #0 + *[0-9a-f]+: fe49 0040 cx2da p0, r0, r1, r9, #0 + *[0-9a-f]+: ee80 0000 cx3 p0, r0, r0, r0, #0 + *[0-9a-f]+: eef0 0000 cx3 p0, r0, r0, r0, #56 + *[0-9a-f]+: ee80 0080 cx3 p0, r0, r0, r0, #4 + *[0-9a-f]+: ee80 0030 cx3 p0, r0, r0, r0, #3 + *[0-9a-f]+: ee80 0700 cx3 p7, r0, r0, r0, #0 + *[0-9a-f]+: ee80 000f cx3 p0, APSR_nzcv, r0, r0, #0 + *[0-9a-f]+: ee80 0009 cx3 p0, r9, r0, r0, #0 + *[0-9a-f]+: ee8f 0000 cx3 p0, r0, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee89 0000 cx3 p0, r0, r9, r0, #0 + *[0-9a-f]+: ee80 f000 cx3 p0, r0, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee80 9000 cx3 p0, r0, r0, r9, #0 + *[0-9a-f]+: fe80 0000 cx3a p0, r0, r0, r0, #0 + *[0-9a-f]+: fef0 0000 cx3a p0, r0, r0, r0, #56 + *[0-9a-f]+: fe80 0080 cx3a p0, r0, r0, r0, #4 + *[0-9a-f]+: fe80 0030 cx3a p0, r0, r0, r0, #3 + *[0-9a-f]+: fe80 0700 cx3a p7, r0, r0, r0, #0 + *[0-9a-f]+: fe80 000f cx3a p0, APSR_nzcv, r0, r0, #0 + *[0-9a-f]+: fe80 0009 cx3a p0, r9, r0, r0, #0 + *[0-9a-f]+: fe8f 0000 cx3a p0, r0, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe89 0000 cx3a p0, r0, r9, r0, #0 + *[0-9a-f]+: fe80 f000 cx3a p0, r0, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe80 9000 cx3a p0, r0, r0, r9, #0 + *[0-9a-f]+: bf18 it ne + *[0-9a-f]+: fe80 0000 cx3a p0, r0, r0, r0, #0 + *[0-9a-f]+: ee80 0040 cx3d p0, r0, r1, r0, r0, #0 + *[0-9a-f]+: eef0 0040 cx3d p0, r0, r1, r0, r0, #56 + *[0-9a-f]+: ee80 00c0 cx3d p0, r0, r1, r0, r0, #4 + *[0-9a-f]+: ee80 0070 cx3d p0, r0, r1, r0, r0, #3 + *[0-9a-f]+: ee80 0740 cx3d p7, r0, r1, r0, r0, #0 + *[0-9a-f]+: ee80 004a cx3d p0, sl, fp, r0, r0, #0 + *[0-9a-f]+: ee8f 0040 cx3d p0, r0, r1, APSR_nzcv, r0, #0 + *[0-9a-f]+: ee89 0040 cx3d p0, r0, r1, r9, r0, #0 + *[0-9a-f]+: ee80 f040 cx3d p0, r0, r1, r0, APSR_nzcv, #0 + *[0-9a-f]+: ee80 9040 cx3d p0, r0, r1, r0, r9, #0 + *[0-9a-f]+: fe80 0040 cx3da p0, r0, r1, r0, r0, #0 + *[0-9a-f]+: fef0 0040 cx3da p0, r0, r1, r0, r0, #56 + *[0-9a-f]+: fe80 00c0 cx3da p0, r0, r1, r0, r0, #4 + *[0-9a-f]+: fe80 0070 cx3da p0, r0, r1, r0, r0, #3 + *[0-9a-f]+: fe80 0740 cx3da p7, r0, r1, r0, r0, #0 + *[0-9a-f]+: fe80 004a cx3da p0, sl, fp, r0, r0, #0 + *[0-9a-f]+: fe8f 0040 cx3da p0, r0, r1, APSR_nzcv, r0, #0 + *[0-9a-f]+: fe89 0040 cx3da p0, r0, r1, r9, r0, #0 + *[0-9a-f]+: fe80 f040 cx3da p0, r0, r1, r0, APSR_nzcv, #0 + *[0-9a-f]+: fe80 9040 cx3da p0, r0, r1, r0, r9, #0 diff --git a/gas/testsuite/gas/arm/cde.s b/gas/testsuite/gas/arm/cde.s new file mode 100644 index 0000000..1ee1870 --- /dev/null +++ b/gas/testsuite/gas/arm/cde.s @@ -0,0 +1,3 @@ +.syntax unified + +.include "cde-scalar.s" |