diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-02-26 14:23:11 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-02-26 14:23:11 +0000 |
commit | cceb53b8849bc76f522931890b585b41e6662fa5 (patch) | |
tree | d6f149710222d87aeaf72620518fd2f44cf9e5ff /gas/testsuite | |
parent | 0dce428051fd2cf07f9d38e9efe2dbb5d8f7fbef (diff) | |
download | gdb-cceb53b8849bc76f522931890b585b41e6662fa5.zip gdb-cceb53b8849bc76f522931890b585b41e6662fa5.tar.gz gdb-cceb53b8849bc76f522931890b585b41e6662fa5.tar.bz2 |
[binutils][arm] Arm CDE CX*A instructions allow condition code
The implementation of the Arm CDE CX*A instructions doesn't allow a
condition code on the instructions but does allow the instruction in an
ITBlock.
The specification has been recently updated, though this is yet to be
published.
The instructions now should allow a suffix, and should behave in the
standard way around ITBlocks.
This patch removes the custom pred_instruction_type and handling for
these instructions, and uses the standard INSIDE_IT_INSN predication
type to describe the new instructions.
gas/ChangeLog:
2020-02-26 Matthew Malcomson <matthew.malcomson@arm.com>
* config/tc-arm.c (enum pred_instruction_type): Remove
NEUTRAL_IT_NO_VPT_INSN predication type.
(cxn_handle_predication): Modify to require condition suffixes.
(handle_pred_state): Remove NEUTRAL_IT_NO_VPT_INSN cases.
* testsuite/gas/arm/cde-scalar.s: Update test.
* testsuite/gas/arm/cde-warnings.l: Update test.
* testsuite/gas/arm/cde-warnings.s: Update test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arm/cde-scalar.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-warnings.l | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/cde-warnings.s | 30 |
3 files changed, 34 insertions, 22 deletions
diff --git a/gas/testsuite/gas/arm/cde-scalar.s b/gas/testsuite/gas/arm/cde-scalar.s index ac188a3..43f6f72 100644 --- a/gas/testsuite/gas/arm/cde-scalar.s +++ b/gas/testsuite/gas/arm/cde-scalar.s @@ -37,7 +37,7 @@ cx1a p0, APSR_nzcv, #0 cx1a p0, r9, #0 it ne -cx1a p0, r0, #0 +cx1ane p0, r0, #0 # cx1d{a} encoding of following form: # 111a111000iiiiiidddd0pppi1iiiiii @@ -65,7 +65,7 @@ cx1da p7, r0, r1, #0 cx1da p0, r10, r11, #0 it ne -cx1da p0, r0, r1, #0 +cx1dane p0, r0, r1, #0 # cx2{a} Has arguments of the following form: @@ -100,7 +100,7 @@ cx2a p0, r0, APSR_nzcv, #0 cx2a p0, r0, r9, #0 it ne -cx2a p0, r0, r0, #0 +cx2ane p0, r0, r0, #0 # cx2d{a} encoding has following form: # 111a111001iinnnndddd0pppi1iiiiii @@ -168,7 +168,7 @@ cx3a p0, r0, r0, APSR_nzcv, #0 cx3a p0, r0, r0, r9, #0 it ne -cx3a p0, r0, r0, r0, #0 +cx3ane p0, r0, r0, r0, #0 # cx3d{a} encoding has following form: # 111a11101iiinnnnmmmm0pppi1iidddd diff --git a/gas/testsuite/gas/arm/cde-warnings.l b/gas/testsuite/gas/arm/cde-warnings.l index d0380d9..5c69850 100644 --- a/gas/testsuite/gas/arm/cde-warnings.l +++ b/gas/testsuite/gas/arm/cde-warnings.l @@ -11,7 +11,8 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx1a p0,r0,#0' +[^ :]+:[0-9]+: Error: incorrect condition in IT block -- `cx1aeq 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' @@ -35,8 +36,9 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx1da 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: incorrect condition in IT block -- `cx1daeq 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' @@ -60,8 +62,9 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx2a 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: incorrect condition in IT block -- `cx2aeq 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' @@ -93,8 +96,9 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx2da 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: incorrect condition in IT block -- `cx2daeq 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' @@ -122,8 +126,9 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx3a 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: incorrect condition in IT block -- `cx3aeq 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' @@ -163,8 +168,9 @@ [^ :]+:[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: instruction not allowed in IT block -- `cx3da 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: incorrect condition in IT block -- `cx3daeq 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' diff --git a/gas/testsuite/gas/arm/cde-warnings.s b/gas/testsuite/gas/arm/cde-warnings.s index 34b923f..d1d9840 100644 --- a/gas/testsuite/gas/arm/cde-warnings.s +++ b/gas/testsuite/gas/arm/cde-warnings.s @@ -23,10 +23,11 @@ cx1a p0, r16, #0 cx1 p0, r13, #0 cx1a p0, r13, #0 -ittt ne +itttt ne cx1 p0, r0, #0 cx1ne p0, r0, #0 -cx1ane p0, r0, #0 +cx1a p0, r0, #0 +cx1aeq p0, r0, #0 cx1 p1, r0, #0 cx1a p1, r0, #0 @@ -73,10 +74,11 @@ cx1da p0, r9, r10, #0 cx1d p0, r13, r14, #0 cx1da p0, r13, r14, #0 -ittt ne +itttt ne cx1d p0, r0, r1, #0 +cx1da p0, r0, r1, #0 cx1dne p0, r0, r1, #0 -cx1dane p0, r0, r1, #0 +cx1daeq p0, r0, r1, #0 cx1d p1, r0, r1, #0 cx1da p1, r0, r1, #0 @@ -122,10 +124,11 @@ cx2a p0, r13, r0, #0 cx2 p0, r0, r13, #0 cx2a p0, r0, r13, #0 -ittt ne +itttt ne cx2 p0, r0, r0, #0 +cx2a p0, r0, r0, #0 cx2ne p0, r0, r0, #0 -cx2ane p0, r0, r0, #0 +cx2aeq p0, r0, r0, #0 cx2 p1, r0, r0, #0 cx2a p1, r0, r0, #0 @@ -184,10 +187,11 @@ cx2da p0, r0, r1, r13, #0 cx2d p0, r0, r1, r15, #0 cx2da p0, r0, r1, r15, #0 -ittt ne +itttt ne cx2d p0, r0, r1, r0, #0 +cx2da p0, r0, r1, r0, #0 cx2dne p0, r0, r1, r0, #0 -cx2dane p0, r0, r1, r0, #0 +cx2daeq p0, r0, r1, r0, #0 cx2d p1, r0, r1, r0, #0 cx2da p1, r0, r1, r0, #0 @@ -240,10 +244,11 @@ cx3a p0, r0, r13, r0, #0 cx3 p0, r0, r0, r13, #0 cx3a p0, r0, r0, r13, #0 -ittt ne +itttt ne cx3 p0, r0, r0, r0, #0 +cx3a p0, r0, r0, r0, #0 cx3ne p0, r0, r0, r0, #0 -cx3ane p0, r0, r0, r0, #0 +cx3aeq p0, r0, r0, r0, #0 cx3 p1, r0, r0, r0, #0 cx3a p1, r0, r0, r0, #0 @@ -317,10 +322,11 @@ cx3da p0, r0, r1, r15, r0, #0 cx3d p0, r0, r1, r0, r15, #0 cx3da p0, r0, r1, r0, r15, #0 -ittt ne +itttt ne cx3d p0, r0, r1, r0, r0, #0 +cx3da p0, r0, r1, r0, r0, #0 cx3dne p0, r0, r1, r0, r0, #0 -cx3dane p0, r0, r1, r0, r0, #0 +cx3daeq p0, r0, r1, r0, r0, #0 cx3d p1, r0, r1, r0, r0, #0 cx3da p1, r0, r1, r0, r0, #0 |