Reject illegal ARM iWMMXt instructions
Ian Lance Taylor
ian@wasabisystems.com
Fri Oct 17 07:04:00 GMT 2003
The ARM assembler in iWMMXt mode currently silently accepts some
instructions which are not actually supported. When the
w{ld,str}{b,h,w,d} instructions are used with a control register,
conditional execution is not permitted, and only the word size is
permitted. The assembler used to silently discard any condition and
force the instruction to word size.
I have checked in this patch to make the assembler give an error in
such cases.
Ian
2003-10-17 Ian Lance Taylor <ian@wasabisystems.com>
* config/tc-arm.c (do_iwmmxt_byte_addr): Reject control
registers.
(do_iwmmxt_word_addr): With a control register, reject conditional
execution and reject a non-word size.
Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.144
diff -u -p -r1.144 tc-arm.c
--- config/tc-arm.c 19 Aug 2003 13:05:42 -0000 1.144
+++ config/tc-arm.c 17 Oct 2003 06:59:50 -0000
@@ -4890,6 +4890,7 @@ do_iwmmxt_byte_addr (str)
if (wc_register (reg))
{
+ as_bad (_("non-word size not supported with control register"));
inst.instruction |= 0xf0000100;
inst.instruction &= ~0x00400000;
}
@@ -5065,6 +5066,10 @@ do_iwmmxt_word_addr (str)
if (wc_register (reg))
{
+ if ((inst.instruction & COND_MASK) != COND_ALWAYS)
+ as_bad (_("conditional execution not supported with control register"));
+ if (op != 2)
+ as_bad (_("non-word size not supported with control register"));
inst.instruction |= 0xf0000100;
inst.instruction &= ~0x00400000;
}
More information about the Binutils
mailing list