MS/CW-style inline assembly for GCC

Mark Mitchell mark@codesourcery.com
Fri May 7 20:11:00 GMT 2004


Matt Austern wrote:

> If you can come up with an assembly syntax that's genuinely better 
> than CW's, and if we can convincingly tell our developers that it's 
> better, then we really will consider telling our developers they 
> should convert their code.

Oh, throwing down the guantlet! :-)

I'm in Palm Springs next week, I'll see if anything springs to mind -- 
but I don't really expect to do better that CW.  I do understand why 
people like that more than GCC's syntax.

To do CW-syntax (in an ideal) world, you'd want the assembler integrated 
into the compiler.  It would then parse the assembly code, emitting 
actual RTL insns into the instruction stream.  Right?  (That, 
presumably, is how CW actually inserts code in and amongst these 
assembly instructions; it just puts them into the instruction stream and 
then happily schedules them along with everything else.)  Whereas 
Apple's current implementation produces one big asm string for GCC, 
annoated with constraints obtained by parsing the assembly code a bit.  
Right?

I'm trying to make sure I fully understand what's going on here. :-)

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc mailing list