MS/CW-style inline assembly for GCC

Richard Henderson rth@redhat.com
Tue May 4 21:35:00 GMT 2004


On Tue, May 04, 2004 at 02:16:53PM -0700, Stan Shebs wrote:
> >I presume you're also parsing the asm opcode to know what register
> >class is needed at a particular point?
>
> Well, no - so far the type of the variable has been sufficient to pick
> a good register class.

Oh, really?  

	int x, y;
	asm {
	  addi x, y, 3
	};

In this case Y must be class 'b', not class 'r'.  Unless you're going
to just use 'b' all the time for integer types, seems to me like you're
going to generate incorrect code.


r~



More information about the Gcc mailing list