The patch implements microMIPSr6 JALRC16, JRCADDIUSP and JRC16 instructions.
Details
Diff Detail
Event Timeline
Modified patch according to reviews of accepted patches that also implements microMIPSr6 16-bit instructions.
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
960 | This doesn't sound right. uimm5 is indeed 0-32 but nothing accounts for the Lsl2 part of the name. Shouldn't this be testing for multiples of 4 between 0 and 128? | |
lib/Target/Mips/MicroMipsInstrFormats.td | ||
40–45 ↗ | (On Diff #33677) | All instructions should be inheriting from PredicateControl. There's no reason not to do so and not doing so leaves us with two incompatible ways of managing predicates. If you look at InstSE/MipsR6Inst/etc. (which inherit from PredicateControl) you'll see that all the instruction formats inherit from one of them. It seems microMIPS(R3) (and MIPS16?) still needs to have PredicateControl added to the formats but we should ensure that microMIPSR6 is consistent with the better practice used by everything else. Also, please do this as an adjective (like ISA_MIPS64_NOT_64R6) and put it with the others in MipsInstrInfo.td |
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
960 | Don't you mean 0-31 inclusive? and therefore 0->124 inclusive in multiples of 4? |
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
960 | Yes, sorry for the ambiguity. |
LGTM with a couple nits.
There's also a comment for a later patch.
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
959 | Variables begin with a capital. | |
960 | Thanks for fixing this. I haven't tried this function myself but MathExtras.h provides an isShiftedUInt that should do the same thing as this expression. If that does the job then we should use it, otherwise this is fine. | |
lib/Target/Mips/MicroMipsInstrInfo.td | ||
403 | Thanks. We should move PredicateControl further up the hierarchy in a later patch. |
Variables begin with a capital.