MS/CW-style inline assembly for GCC

Mike Stump mrs@apple.com
Wed May 5 01:59:00 GMT 2004


> Oh, really?
> 	int x, y;
> 	asm {
> 	  addi x, y, 3
> 	};

I find the above easier on my brain and easier to remember than gcc's 
current syntax.  This is the main reason that I don't think adding 
support for this style inline asm would be a bad thing.

Currently, whenever I want to write any inline asm, I have to go find a 
snippet to cut and paste, and then I have to puzzle out what constraint 
to use, which order the arguments go in, how to get the syntax just 
right...  It just seems way harder than it should be.

I'd rather gcc `know' how to get the details right.

Hey, Stan, did you tell them about the code that transforms SSE2 
instructions in inline assembly into altivec instructions on the fly?



More information about the Gcc mailing list