[PATCH] ARM: Closing in on unified assembly syntax
Zack Weinberg
zack@codesourcery.com
Mon May 2 18:58:00 GMT 2005
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
More information about the Binutils
mailing list