MIPS: why addu/daddu for move?

Chris G. Demetriou cgd@sibyte.com
Tue Sep 26 13:22:00 GMT 2000


I've noticed that the MIPS binutils seems to prefer addu/daddu for
'move' over 'or'.

I note that, for instance, See MIPS Run indicates that 'move' "will be
implemented as 'or' by most MIPS assemblers.

Additionally, the MIPS assembler seems to encode 'move' as 'or'
(regardless of ISA, though I'll admit i wasn't exhaustive.)


Any reason for the GNU tools' encoding?

'or' has the benefit -- or drawback -- that it doesn't sign extend,
i.e. it preserves the upper register contents on machines with 64-bit
GPRs...

I could imagine that things might expect that if you're using a 64-bit
GPR machine but -mips1/-mips2 in the compiler/assembler, that 'move'
will extend bit 31 into 32:64... but that seems like a bad assumption
to make (and is at odds with the practices used/encouraged by other
assemblers and MIPS texts 8-).



chris


More information about the Binutils mailing list