[PATCH] MIPS gas: Cleanup address insn conditionals

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Mon Jun 16 12:11:00 GMT 2003


Eric Christopher wrote:
> 
> >  
> > +#define ADDRESS_ADD_INSN						\
> > +   (HAVE_32BIT_ADDRESSES ? HAVE_NEWABI ? "add" : "addu" : "daddu")
> > +
> > +#define ADDRESS_ADDI_INSN						\
> > +   (HAVE_32BIT_ADDRESSES ? HAVE_NEWABI ? "addi" : "addiu" : "daddiu")
> > +
> 
> Hey, can you add some parens here and maybe some comments explaining the
> abis? :)

I changed it to:

/* Addresses are loaded in different ways, depending on the address
   size in use and the ABI.  N32_ABI uses additions with overflow
   checking, this allows to catch code generation errors which would
   distort the proper sign extension of the 64-bit wide registers.  */
#define ADDRESS_ADD_INSN						\
   (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "add" : "addu") : "daddu")

#define ADDRESS_ADDI_INSN						\
   (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "addi" : "addiu") : "daddiu")

#define ADDRESS_LOAD_INSN						\
   (HAVE_32BIT_ADDRESSES ? "lw" : "ld")

#define ADDRESS_STORE_INSN						\
   (HAVE_32BIT_ADDRESSES ? "sw" : "sd")


Thiemo



More information about the Binutils mailing list