Don't use auto inc/dec addresses in asm operands
Richard Sandiford
rdsandiford@googlemail.com
Sun Jul 12 18:47:00 GMT 2009
Andreas Schwab <schwab@linux-m68k.org> writes:
> Richard Sandiford <richards@transitive.com> writes:
>> This patch fixes a case in which an AIX compiler would use a
>> PRE_INC address inside an asm "m" operand. We can't rely on
>> asm operands to do increments and decrements like this,
>> because the asm can legitimately write to the memory more
>> than once or (as here) not write to it at all.
>
> Shouldn't you use "o" for that? The "m" constraint has always generated
> auto inc/dec on targets that support it.
"o" would be too restrictive. reg+reg addresses aren't offsettable on ppc,
but they're still perfectly OK for general use in asms.
Richard
More information about the Gcc-patches
mailing list