This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Add LAPC instruction
ClosedPublic

Authored by mstojanovic on Jul 28 2017, 2:07 AM.

Details

Summary

Implement LAPC instruction for mips32r6, mips64r6 and micromips32r6.

Diff Detail

Event Timeline

mstojanovic created this revision.Jul 28 2017, 2:07 AM
sdardis requested changes to this revision.Aug 9 2017, 8:05 AM

This macro only exists for R6, so it shouldn't be in the generic microMIPS tests.

lib/Target/Mips/MicroMipsInstrInfo.td
1187–1189 ↗(On Diff #108604)

This macro doesn't exist for pre-R6 code, so this and the rest of the associated tests can be removed for pre-R6.

test/MC/Mips/micromips-alu-instructions.s
134–136 ↗(On Diff #108604)

This hunk and it's corresponding check lines should go in micromips32r6/valid.s

test/MC/Mips/micromips-invalid.s
43 ↗(On Diff #108604)

This should go in micromips32r6/invalid-wrong-error.s

test/MC/Mips/micromips/valid.s
181–183 ↗(On Diff #108604)

This should be in test/MC/Mips/micromips32r6/valid.s

This revision now requires changes to proceed.Aug 9 2017, 8:05 AM
mstojanovic edited edge metadata.
mstojanovic edited the summary of this revision. (Show Details)
mstojanovic added a subscriber: llvm-commits.

Marco removed from pre-R6 microMIPS.

sdardis requested changes to this revision.Sep 5 2017, 2:28 AM

I'm seeing some test failures:

LLVM :: MC/Mips/micromips32r6/invalid-wrong-error.s
LLVM :: MC/Mips/micromips32r6/valid.s

I've highlighted the issues in inline comments.

test/MC/Mips/micromips32r6/invalid-wrong-error.s
45–47

Sorry about the confusion, simm19_lsl2 does give the correct error message.

These three should be in test/MC/Mips/micromips32r6/invalid.s and should be: error: expected both 19-bit signed immediate and multiple of 4

Also, test -1048580, 1048576 as they're the next multiple of 4 instead of 16777220 / 16777216.

47

Provide a negative unencodable number as well.

test/MC/Mips/micromips32r6/valid.s
67–68

The limits should be [-1048576, 1048572].

This revision now requires changes to proceed.Sep 5 2017, 2:28 AM
mstojanovic edited edge metadata.

Fixed test ranges and moved tests to appropriate files.

sdardis accepted this revision.Sep 6 2017, 7:12 AM

LGTM with inline nit addressed.

test/MC/Mips/micromips32r6/invalid.s
41–44 ↗(On Diff #113996)

This should be duplicated into test/MC/Mips/mips{32|64}r6/invalid.s .

This revision is now accepted and ready to land.Sep 6 2017, 7:12 AM

Added tests to test/MC/Mips/mips{32|64}r6/invalid.s

This revision was automatically updated to reflect the committed changes.