This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips $12-$15 are named $t4-$t7
On Apr 8, 2003, Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de> wrote:
>> Anyway, we do have a very serious problem now. GCC does map t0..t3 to
>> $8..$11 regardless of the ABI, and changing this mapping now may break
>> code that declares register variables using the mnemonic name.
> I guess nothing in gcc uses the memnonic names.
Not in GCC, but if you compile with -mabi=n32 something like:
int i;
int main() {
register int j asm ("t0");
asm ("ld $12, %1" : "=r" (j) : "m" (i));
return j;
}
you lose. Admittedly, this should have used %0 instead of $12, but
one could conceive of more complex scenarios, such as passing
additional arguments to assembly functions by setting register
variables defined using the mnemonic names, that would indeed break.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer