Page MenuHomePhabricator

[mips][FastISel] Implement div instruction.

Authored by vkalintiris on Jan 16 2015, 7:32 PM.

Diff Detail

Event Timeline

rkotler updated this revision to Diff 18332.Jan 16 2015, 7:32 PM
rkotler retitled this revision from to add div to mips fast-isel.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsanders.
rkotler added subscribers: rfuhler, Unknown Object (MLST).
vkalintiris commandeered this revision.Apr 16 2015, 5:47 AM
vkalintiris added a reviewer: rkotler.
dsanders added inline comments.May 12 2015, 7:20 AM

This should be merged with the near-identical selectRem added in D7027 to make a selectDivRem which uses mfhi/mflo depending on whether div/rem is desired.


As mentioned in D6774, we can significantly simplify this using arguments and returns.

As noted there, I don't mind if this is part of the big cleanup.

vkalintiris retitled this revision from add div to mips fast-isel to [mips][FastISel] Implement div instruction..
vkalintiris updated this object.

Cleaned-up tests and merged implementation of selectDiv() with the
implementation of selectRem() under the new name: selectDivRem().

dsanders accepted this revision.Jun 1 2015, 6:28 AM
dsanders edited edge metadata.

LGTM with a couple nits


Nit: Not needed anymore.


Not done.


Nit: Use ternary operator


Not done, but I'm ok with this tidy up being in the cleanup so this is not a problem.

This revision is now accepted and ready to land.Jun 1 2015, 6:28 AM
This revision was automatically updated to reflect the committed changes.