inline assembly question

Ficus Kirkpatrick ficus@be.com
Thu Jan 22 02:29:00 GMT 1998


Hello,

I apologize if this is out of the scope of this mailing list, but it was
recommended to me that I ask here.

I am porting some code that uses the Metrowerks CodeWarrior compiler so 
that
it can be compiled with GCC, and I have some inline assembly that I can't 
seem to feed to GCC in the right way.  The code in question is for x86 
processors,
and the Metrowerks format is like this:

asm {
		push	ecx
		mov		ecx, [esp + 0xc]
		call	[esp + 8]
		pop		ecx
		ret
}

I've changed it to use the asm("...") construct, but it still seems to 
choke
on the lines with "[esp + 0xc]", etc.  What does the GNU assembler want in 
place of this?

thanks,

-- ficus



More information about the Gcc mailing list