MS/CW-style inline assembly for GCC

Stan Shebs shebs@apple.com
Fri May 7 00:20:00 GMT 2004


Richard Guenther wrote:

> Stan Shebs wrote:
>
>> A purely syntactic extension would be kind of pointless - what this
>> syntax does is to simplify and automate the parts of GCC assembly
>> syntax that are known to be extremely difficult for users to get right,
>> which also happens to facilitate porting code that could previously
>> only be handled by a proprietary compiler. So it does require a small
>> amount of platform support, namely to compute the arcana that has been
>> exposed to the poor users.
>
>
> Ugh. I guess people writing more than three lines of assembly should 
> use an assembler and not the compiler to do their work! For the 
> unusual short asm sequences gcc inline assembly is easy enough to 
> understand.

Too bad I can't show you the QuickTime sources, you'd understand
the scope of the problem better; .s files don't work right for
inlining functions with asm sequences into C functions for instance,
not to mention other kinds of visibility, and we're talking about
thousands of lines of asm. MacMAME sources are open though, you can
look at those to see what serious inline asm usage looks like.

Stan



More information about the Gcc mailing list