Q: gcc asm constraint for registers on ppc

Ian Lance Taylor ian@zembu.com
Tue Dec 14 07:15:00 GMT 1999


   Date: Tue, 14 Dec 1999 11:50:50 +0100
   From: Daniel Kahlin <tlr@netinsight.se>

   The problem here is that with the "r" constraint, gcc chooses "r0" sometimes
   which does not produce valid powerpc assembly code in this case.

   What asm constraint will make gcc use _any_ general purpose register except
   "r0" (on powerpc)?

Try "b".

I got this by inspecting gcc/config/rs6000/rs6000.h and looking at
REG_CLASS_CONTENTS and REG_CLASS_FROM_LETTER.  As far as I know
process-specific constraint are not documented anywhere.

Ian

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list