MS/CW-style inline assembly for GCC

Andrew Pinski pinskia@physics.uc.edu
Fri May 7 04:23:00 GMT 2004


On May 6, 2004, at 23:14, Peter Barada wrote:
>> The GCC syntax was a cheap quickie hack thrown in nearly twenty
>> years ago and hardly improved since then, even though empirically
>> it's one of the leading causes of bugs and problems with using GCC.
>> It may suit you just fine, but most users only put up with it
>> because they have no alternative.
>
> Extremely few users of gcc actually *write* asm code so your claim of 
> it
> being a 'leading cause of bugs' is a gross exaggeration.

I am going to agree with Peter here, looking at the number of inline-asm
bugs that are open, 6, I would say that there is a small number of bugs
in inline-asm.  One is due to x86 being so register starved at -O0.
Another is a reload bug in which it forgets there is a clobber on the 
asm
(this is the most serious one of them all).  Another is weird 
interaction
between asm variables and divide on alpha.  Another is an ICE on invalid
code when trying to put a struct into a register which is greater than 
the
size of the registers (it will be BLKMode).

Yes every once in a while we get invalid bugs due to wrong constraints, 
I
look up them in the manual just fine to see what they are and close the
bugs as invalid if need be (I just closed one today which was opened for
a long time because no one noticed it was an invalid constraint for
the testcase).


Thanks,
Andrew Pinski
a bug master



More information about the Gcc mailing list