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: MS/CW-style inline assembly for GCC


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


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