This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to proceed on the Thumb-2 assembler patches?
Daniel Jacobowitz <drow@false.org> writes:
>> Um, no, actually, I am in a hurry to merge this to mainline; the
>> larger the patch set gets, the harder it gets to work on outside the
>> tree. If, for instance, someone decided to rip out ARM_OLD_ABI
>> (which, on the merits, should happen) I'd be in a world of hurt.
>
> OK, that makes sense. I would want at least the rejection of invalid
> classic Thumb.
Alright, here it is.
zw
* gas/config/tc-arm.c (md_assemble): In classic syntax, reject
conditional suffixes on Thumb instructions other than branch.
* gas/testsuite/gas/arm/t16-bad.s: Add test for rejection of
conditional suffixes on non-branch instructions.
* gas/testsuite/gas/arm/t16-bad.l: Update to match.
===================================================================
Index: gas/config/tc-arm.c
--- gas/config/tc-arm.c (revision 88)
+++ gas/config/tc-arm.c (working copy)
@@ -7574,6 +7574,12 @@
as_bad (_("selected processor does not support `%s'"), str);
return;
}
+ if (inst.cond != COND_ALWAYS && !unified_syntax
+ && opcode->tencode != do_t_branch)
+ {
+ as_bad (_("Thumb does not support conditional execution"));
+ return;
+ }
mapping_state (MAP_THUMB);
inst.instruction = opcode->tvalue;
===================================================================
Index: gas/testsuite/gas/arm/t16-bad.s
--- gas/testsuite/gas/arm/t16-bad.s (revision 87)
+++ gas/testsuite/gas/arm/t16-bad.s (working copy)
@@ -133,3 +133,6 @@
bkpt #257
cpsie ai,#5
cpsid ai,#5
+
+ @ Conditional suffixes
+ addeq r0,r1,r2
===================================================================
Index: gas/testsuite/gas/arm/t16-bad.l
--- gas/testsuite/gas/arm/t16-bad.l (revision 87)
+++ gas/testsuite/gas/arm/t16-bad.l (working copy)
@@ -183,3 +183,4 @@
[^:]*:133: Error: immediate value out of range -- `bkpt #257'
[^:]*:134: Error: Thumb does not support the 2-argument form of this instruction -- `cpsie ai,#5'
[^:]*:135: Error: Thumb does not support the 2-argument form of this instruction -- `cpsid ai,#5'
+[^:]*:138: Error: Thumb does not support conditional execution