Implement disassembler support for microMIPS 16-bit instructions LBU16, LHU16, LW16, SB16, SH16 and SW16.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
---|---|---|
1127 ↗ | (On Diff #16614) | lbu16 is wrongly disassembled when encoded immediate is 0xf. The decoded immediate should be -1 in that case. For the following instruction lbu16 $3, -1($16) if it is assembled with llvm-mc (or gcc) and then disassembled with llvm-objdump, the result is lbu16 $3, 15($16) Please include this instruction in both assemble and disassemble tests. |
1134 ↗ | (On Diff #16614) | It's not clear whether you need SignExtend here. Instruction reference document says that offset is sign-extended. But gcc treats the offset as zero-extended, and will only assemble lw16 if offset is [0, 4, ..., 60]. |
Comment Actions
Corrected LBU16 offset, if offset its encoding is 0xF then disassembled value will be -1.
LW16 is corrected according to GCC.