The listed instructions were missing dedicated decoder methods in MipsDisassembler.cpp to properly decode immediate operands. These methods are added together with corresponding tests.
Details
Diff Detail
Event Timeline
| lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
|---|---|---|
| 313 | Align the parameters. | |
| 316 | Same here. | |
| 319 | Same here (and few more cases below). | |
| 1459 | For the following instructions the immediate is wrongly disassembled: addiusp 1024 if they are assembled with llvm-mc (or gcc) and then disassembled with llvm-objdump, the result is addiusp 0 Please include these instructions in both assemble and disassemble tests. | |
| lib/Target/Mips/MicroMipsInstrInfo.td | ||
| 11–12 | Add one more 'm' in method name: DecodeUImm5lsl2 | |
Bug in DecodeSimm9SP code fixed, style remarks applied. Test cases for specific values added for both assembler and disassembler.
LGTM, with two changes.
| lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
|---|---|---|
| 319 | This line is unaligned. | |
| 1464 | For 0, 1, 510 and 511, you can just use unshifted decoded values. For example, case 0: DecodedValue = 256; break; case 1: DecodedValue = 257; break; case 510: DecodedValue = -258; break; case 511: DecodedValue = -257; break; | |
Align the parameters.