Page MenuHomePhabricator

[mips][microMIPS] Implement SWM16 and LWM16 instructions
ClosedPublic

Authored by zoran.jovanovic on Oct 2 2014, 6:18 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

zoran.jovanovic retitled this revision from to [mips][microMIPS] Implement SWM16 and LWM16 instructions.
zoran.jovanovic updated this object.
zoran.jovanovic edited the test plan for this revision. (Show Details)

Rebased.
Error handling changed.
Offset shift fixed.

sstankovic added inline comments.Nov 10 2014, 9:56 AM
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
792 ↗(On Diff #14938)

This method is never called. I think the problem is that you use parseRegisterList for parsing RegList16 operands. At the end of parseRegisterList, operand of k_RegList is created, which means that isRegList() will be called instead of isRegList16().

lib/Target/Mips/MicroMipsInstrInfo.td
215 ↗(On Diff #14938)

You probably need RegListAsmOperand here.

Patch rebased and some unnecessary code removed.

sstankovic edited edge metadata.Nov 18 2014, 4:39 AM

For the following illegal instructions the error is not reported:

lwm16 $16, 8($sp)
lwm16 $16, $17, 8($sp)
lwm16 $16-$20, 8($sp)

Please include these instructions in the tests, to make sure the error is reported.

lib/Target/Mips/Disassembler/MipsDisassembler.cpp
348 ↗(On Diff #16289)

You can put "unsigned Insn" on the previous line - it fits in 80 columns.

1422 ↗(On Diff #16289)

Same here.

zoran.jovanovic edited edge metadata.

PredicateMethod added to check whether reglistoperand16 is valid.

LGTM, with two changes.

lib/Target/Mips/MicroMipsInstrInfo.td
374 ↗(On Diff #16652)

This line is unaligned.

381 ↗(On Diff #16652)

Same here.

sstankovic accepted this revision.Nov 27 2014, 6:28 AM
sstankovic edited edge metadata.
This revision is now accepted and ready to land.Nov 27 2014, 6:28 AM
Diffusion closed this revision.Nov 27 2014, 10:29 AM
Diffusion updated this revision to Diff 16702.

Closed by commit rL222901 (authored by zjovanovic).