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/config/tc-arm.c | |
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/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 30c69fb..59b1f6b 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -506,8 +506,6 @@ enum pred_instruction_type MVE_OUTSIDE_PRED_INSN , /* Instruction to indicate a MVE instruction without a predication code. */ MVE_UNPREDICABLE_INSN, /* MVE instruction that is non-predicable. */ - NEUTRAL_IT_NO_VPT_INSN, /* Instruction that can be either inside or outside - an IT block, but must not be in a VPT block. */ }; /* The maximum number of operands we need. */ @@ -21674,15 +21672,13 @@ cde_handle_coproc (void) static void cxn_handle_predication (bfd_boolean is_accum) { - /* This function essentially checks for a suffix, not whether the instruction - is inside an IT block or not. - The CX* instructions should never have a conditional suffix -- this is not - mentioned in the syntax. */ - if (conditional_insn ()) + if (is_accum && conditional_insn ()) + set_pred_insn_type (INSIDE_IT_INSN); + else if (conditional_insn ()) + /* conditional_insn essentially checks for a suffix, not whether the + instruction is inside an IT block or not. + The non-accumulator versions should not have suffixes. */ inst.error = BAD_SYNTAX; - /* Here we ensure that if the current element */ - else if (is_accum) - set_pred_insn_type (NEUTRAL_IT_NO_VPT_INSN); else set_pred_insn_type (OUTSIDE_PRED_INSN); } @@ -22980,7 +22976,6 @@ handle_pred_state (void) gas_assert (0); case IF_INSIDE_IT_LAST_INSN: case NEUTRAL_IT_INSN: - case NEUTRAL_IT_NO_VPT_INSN: break; case VPT_INSN: @@ -23044,12 +23039,6 @@ handle_pred_state (void) close_automatic_it_block (); break; - case NEUTRAL_IT_NO_VPT_INSN: - if (now_pred.type == VECTOR_PRED) - { - inst.error = BAD_NO_VPT; - break; - } /* Fallthrough. */ case NEUTRAL_IT_INSN: now_pred.block_length++; @@ -23234,13 +23223,6 @@ handle_pred_state (void) } break; - case NEUTRAL_IT_NO_VPT_INSN: - if (now_pred.type == VECTOR_PRED) - { - inst.error = BAD_NO_VPT; - break; - } - /* Fallthrough. */ case NEUTRAL_IT_INSN: /* The BKPT instruction is unconditional even in a IT or VPT block. */ |