gcc assembler register names

Peter Naulls peter at chocky.org
Tue Oct 1 08:27:09 PDT 2002



'as' has the -gcc flag to allow register names to be defined - a1, a2,
r0, r1 and all the rest.

The problem is that GCC doesn't actually pass the flag (and anyway uses
its own register names), and without these register names being defined
(which you need to do manully if you're writing assembler), it's simply
a bit useless.  It can also cause problems with inline assembler.

So, I suggest that 'as' always has the register name defined.  In
addition, if GCC wishes to stay with its __r0 format, perhaps when the
-gcc flag is passed, those could be defined too.  Or, (radical, I know),
gcc dumps the __ bit.

Peter



-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
------------------------------------------------------------------------
 



More information about the gcc mailing list