This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

MIPS: why addu/daddu for move?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]