This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-4.3.0/ppc32 inline assembly produces bad code


Daniel Jacobowitz <drow@false.org> writes:

> On Mon, Mar 31, 2008 at 03:06:24PM +0200, Andreas Schwab wrote:
>> The side effect is carried out by using %U0, which expands to u for a
>> PRE_{INC,DEC,MODIFY} operand.  There is no way to encode that in the
>> insn operand itself, unlike m68k, for example.  The ia64 target has a
>> similar issue.
>
> OK, so it's possible to get that right.  Still - how many people
> writing inline assembly do we think will do so?
>
> This is back to something the S/390 maintainers were working on a few
> months ago; in short the useful definition of "m" to GCC is not the
> useful one for users, I don't think.  Especially when it changes.

There are many pitfalls when you use inline asm.  Another example is the
difference between "r" and "b" on powerpc, where you can silently get
bad code if you use "r" when "b" would be needed (in some insns 0 means
constant 0 instead of register 0).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]