This patch implements disassembler support for microMIPS 16-bit instructions.
Details
Diff Detail
Event Timeline
lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
---|---|---|
712 | Align the comment. | |
731 | This comment is not valid anymore. In this patch you don't use readInstruction16 for mips32r2 (so mips32r2: line is unnecessary). You use it to read 16 bits of a microMIPS instruction (either 16-bit or 32-bit instructions). I think the more appropriate place for the comment is the function readInstruction32, and instead of mips32r2 and microMIPS little-endian byte ordering, the comment should specify the big and little-endian byte ordering of a 32-bit microMIPS instruction. For example: Big-endian: 0 | 1 | 2 | 3 It is obvious from the ordering, but you may also mention it explicitly that high 16 bits of a 32-bit microMIPS instruction (where the opcode is) always precede the low 16 bits in the instruction stream (that is, they are placed at lower addresses in the instruction stream). | |
928 | Why not use Mips::GPRMM16RegClassID? |
lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
---|---|---|
928 | Because we are actually using register indexes that doesn't fit into GPRMM16 set. |
Function DecodeGPRMM16RegisterClass is reimplemented to use GPRMM16RegClassID instead of GPR32RegClassID.
Add '.' at the end.