This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Reject illegal ARM iWMMXt instructions
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: binutils at sources dot redhat dot com
- Date: 17 Oct 2003 15:46:41 -0700
- Subject: Re: Reject illegal ARM iWMMXt instructions
- References: <200310171007.h9HA7X001772@pc960.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
> > 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
> >
>
> There should really be a test-case for this as well. See
> testsuite/gas/arm/armv1-bad.[sl]
OK. I checked in the appended.
Ian
Index: gas/arm/arm.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/arm/arm.exp,v
retrieving revision 1.20
diff -u -r1.20 arm.exp
--- gas/arm/arm.exp 19 Aug 2003 13:05:42 -0000 1.20
+++ gas/arm/arm.exp 17 Oct 2003 22:44:20 -0000
@@ -83,4 +83,5 @@
if [istarget xscale-*] {
run_dump_test "iwmmxt"
+ run_errors_test "iwmmxt-bad" "-mcpu=iwmmxt" "iWMMXt errors"
}
Index: gas/arm/iwmmxt-bad.l
===================================================================
RCS file: gas/arm/iwmmxt-bad.l
diff -N gas/arm/iwmmxt-bad.l
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/arm/iwmmxt-bad.l 17 Oct 2003 22:44:20 -0000
@@ -0,0 +1,9 @@
+[^:]*: Assembler messages:
+[^:]*:1: Error: conditional execution not supported with control register
+[^:]*:2: Error: non-word size not supported with control register
+[^:]*:3: Error: non-word size not supported with control register
+[^:]*:4: Error: non-word size not supported with control register
+[^:]*:5: Error: conditional execution not supported with control register
+[^:]*:6: Error: non-word size not supported with control register
+[^:]*:7: Error: non-word size not supported with control register
+[^:]*:8: Error: non-word size not supported with control register
Index: gas/arm/iwmmxt-bad.s
===================================================================
RCS file: gas/arm/iwmmxt-bad.s
diff -N gas/arm/iwmmxt-bad.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/arm/iwmmxt-bad.s 17 Oct 2003 22:44:20 -0000
@@ -0,0 +1,8 @@
+ wldrwgt wcgr0,[r1]
+ wldrb wcgr0,[r1]
+ wldrh wcgr0,[r1]
+ wldrd wcgr0,[r1]
+ wstrwgt wcgr0,[r1]
+ wstrb wcgr0,[r1]
+ wstrh wcgr0,[r1]
+ wstrd wcgr0,[r1]