Questions about SPARC's C compiler

I-Chen Wu icw at sam.cs.cmu.edu
Sat Jun 2 13:57:30 AEST 1990


1. When I check some assembly codes, I realize global registers, g0,
   g1,...,etc, are rarely used.  Could I insert, say, asm("move %o5, %g2")
   into the C programs?  Any side effect?  

2. In addition, could I move address of a C variable into a specific
   register?  For example,

	routine() {
		int i;
		asm ("move ADDR(i), %g2"); /* move address of i to g2 */
		....
	}

Thank you in advance.

I-Chen Wu



More information about the Comp.sys.sun mailing list