[llvm] r204797 - [mips] Add tests for t0-t3 for N32/N64

Daniel Sanders Daniel.Sanders at imgtec.com
Wed Mar 26 06:52:53 PDT 2014


The SGI MIPSpro N32 ABI Handbook uses t4-t7 for $12-$15. Whether that needs supporting is a bit debatable though. I've got no evidence that this definition has actually been used in real assembly files and the fact that GAS doesn't accept t4-t7 suggests that it isn't. At the moment, my main reason for supporting it is that the code to do it is already there (it was committed ~1 year ago).

I'll see if anyone else in MIPS can think of a reason to keep it. If not, then I think it would be best to only support t0-t3 like GAS does.

Thanks for pointing that out.

> -----Original Message-----
> From: Richard Sandiford [mailto:rsandifo at linux.vnet.ibm.com]
> Sent: 26 March 2014 13:02
> To: Daniel Sanders
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm] r204797 - [mips] Add tests for t0-t3 for N32/N64
> 
> Daniel Sanders <daniel.sanders at imgtec.com> writes:
> > Author: dsanders
> > Date: Wed Mar 26 06:46:34 2014
> > New Revision: 204797
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=204797&view=rev
> > Log:
> > [mips] Add tests for t0-t3 for N32/N64
> >
> > These are aliases of t4-t7 and are provided for compatibility with
> > both the original ABI documentation (using t4-t7) and GNU As (using
> > t0-t3)
> 
> Not sure this is a good idea.  As far as GAS is concerned, $t0-$t7 on o32 are
> $8-$15.  $t0-$t3 on n32 and n64 are $12-$15 and $t4-$t7 don't exist.
> I think this is consistent with SGI.  So there's no overlap with pure $tNs.
> 
> Code that wants to use register names compatible with all three ABIs can use
> $t0-$t3 for temporaries that don't overlap the arguments and $ta0-$ta3 for
> (separate) temporaries that might overlap the arguments.
> 
> Which is why it's much easier just to use numerical registers really. :-)
> Obviously you need to support named registers too, just saying...
> 
> Thanks,
> Richard





More information about the llvm-commits mailing list