This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] ARM: Closing in on unified assembly syntax
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: binutils <binutils at sourceware dot org>, Paul Brook <paul at codesourcery dot com>, Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 02 May 2005 11:58:08 -0700
- Subject: Re: [PATCH] ARM: Closing in on unified assembly syntax
- References: <877jikiv3g.fsf@codesourcery.com><m3ekcp321o.fsf@gossamer.airs.com>
Ian Lance Taylor <ian@airs.com> writes:
> Zack Weinberg <zack@codesourcery.com> writes:
>
>> - Conditional suffixes are accepted, but ignored, on all Thumb
>> instructions.
>
> Maybe you are implementing to some standard that requires this, but it
> looks decidedly odd to me. I would expect that a conditional suffix
> in Thumb mode should cause an error.
It's an intermediate point, useful in itself as it allows correctly
written Thumb-2 code to assemble. The next stage is to validate these
conditional suffixes against preceding IT instructions, which actually
cause conditional execution. Here's an example -
@ if (r0 == r1) r2 = r0; else r2 = r1;
cmp r0, r1
ite eq
moveq r2, r0
movne r2, r1
The validator would detect errors such as
cmp r0, r1
ite eq
movls r2, r0
movgt r2, r1
A further improvement, which is optional (but we may well do it, as I
suspect it'll make the GCC bits easier) is to synthesize and insert IT
instructions when the source contains instructions with conditional
suffixes, but no IT instructions.
zw