This is an archive of the discontinued LLVM Phabricator instance.

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

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

Diff Detail

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

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

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

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

1422

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

This line is unaligned.

381

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).