This is an archive of the discontinued LLVM Phabricator instance.

[PATCH, Mips] Remap move as or.
ClosedPublic

Authored by sdardis on Aug 6 2015, 2:46 AM.

Details

Summary

This patch remaps the assembly idiom 'move' to 'or' instead of 'daddu' or
'addu'. The use of addu/daddu instead of or as move was highlighted as a
performance issue during the analysis of a recent 64bit design. Originally
move was encoded as 'or' by binutils but was changed for the r10k cpu family
due to their pipeline which had 2 arithmetic units and a single logical unit,
and so could issue multiple (d)addu based moves at the same time but only 1
logical move.

This patch preserves the disassembly behaviour so that disassembling a old style
(d)addu move still appears as move, but assembling move always gives an or

Diff Detail

Event Timeline

sdardis updated this revision to Diff 31434.Aug 6 2015, 2:46 AM
sdardis retitled this revision from to [PATCH, Mips] Remap move as or..
sdardis updated this object.
sdardis added a reviewer: vkalintiris.
sdardis added a subscriber: llvm-commits.
vkalintiris accepted this revision.Aug 7 2015, 1:47 AM
vkalintiris edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 7 2015, 1:47 AM

I'm sorry, I hit the submit button accidentally.

You mention in your commit message the following:

This patch preserves the disassembly behaviour so that disassembling a old style
(d)addu move still appears as move, but assembling move always gives an or

Could you confirm that this is the behaviour that binutils project follows (or will follow) too?

Yes, this is same behaviour as binutils will do.

This revision was automatically updated to reflect the committed changes.