This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
ClosedPublic

Authored by zbuljan on May 18 2015, 6:07 AM.

Details

Summary

The patch implements microMIPSr6 LH, LHE, LHU and LHUE instructions.

Diff Detail

Repository
rL LLVM

Event Timeline

zbuljan updated this revision to Diff 25961.May 18 2015, 6:07 AM
zbuljan retitled this revision from to [mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions.
zbuljan updated this object.
zbuljan edited the test plan for this revision. (Show Details)
zbuljan added subscribers: petarj, Unknown Object (MLST).
dsanders edited edge metadata.Sep 4 2015, 2:14 AM

Doesn't D9189 cover most of these?

Patch D9189 implements microMIPS(R3) instructions while this patch implements R6.
These microMIPSR6 instructions LH, LHE, LHU and LHUE are identical to the microMIPS(R3) equivalents (opcodes are the same).
It seems that R6 implementation of these instructions will not be needed (only tests for microMIPS32R6 and microMIPS64R6).

Ok, in that case: The test cases LGTM and are ok to commit but the implementation is unnecessary and shouldn't be committed. Let me know if you find you need implementation changes.

zbuljan updated this revision to Diff 34981.Sep 17 2015, 5:28 AM
zbuljan edited reviewers, added: hvarga; removed: jkolek.

Removed unnecessary implementation.
Added tests for microMIPS64r6.

Unnecessary implementation of LH, LHE, LHU and LHUE instructions is removed.
Implementation of mem_simm16gpr operand with operand check using PredicateMethod is left in patch.
Operands are tested with invalid tests.

Is it ok to commit?

zbuljan updated this revision to Diff 40491.Nov 18 2015, 4:00 AM

Rebased to work with top of the tree.

dsanders accepted this revision.Dec 4 2015, 8:30 AM
dsanders edited edge metadata.

Sorry for not noticing this one. LGTM with a couple nits

test/MC/Mips/micromips32r6/invalid.s
104–115 ↗(On Diff #40491)

Alignment of '# CHECK'

test/MC/Mips/micromips64r6/invalid.s
112–123 ↗(On Diff #40491)

Alignment of '# CHECK'

test/MC/Mips/mips32r6/invalid.s
22–27 ↗(On Diff #40491)

We should check lhe and lhue too. Likewise below

This revision is now accepted and ready to land.Dec 4 2015, 8:30 AM
This revision was automatically updated to reflect the committed changes.