MS/CW-style inline assembly for GCC

Stan Shebs shebs@apple.com
Tue May 4 19:01:00 GMT 2004


Michael Matz wrote:

>Hi,
>
>On Tue, 4 May 2004, Paul Koning wrote:
>
>
>>Yes, the constraints are very poorly documented.
>>
>
>Ehm, have any people claiming this actually read the documentation?  Not 
>the gccint info file, but the gcc one under
>  C Extensions / Extended Asm / Constraints
>?  Because, well, I find them documented quite well.  First a general 
>overview about the technique, then simple general constraints (quite 
>detailed) plus modifiers, then machine constraints (not as detailed).
>
>That's not to say there might not be something to improve, but it's 
>certainly not as bad as some make it sound.
>
That's why I said "were" poorly documented - it's much better than
it used to be.

It's still kind of mysterious to developers though; for instance in
the PowerPC case, sometimes you have to use "b" and other times "r"
for a register, because r0 is not a "base register" and can't be used
in all the same contexts. Worse, the mistaken choice of "r" may not
bite immediately, depending on how the phase of the moon is affecting
register allocation, then manifests itself as a assembler complaint
about a register not mentioned in the source code. After a couple
experiences like that, developers spew all over us about GCC's
lameness and go back to CodeWarrior. :-)

Stan



More information about the Gcc mailing list