The patch implements microMIPS32r6 LB, LBE, LBU and LBUE instructions.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
---|---|---|
249–258 ↗ | (On Diff #37240) | Indentation |
1167–1169 ↗ | (On Diff #37240) | Indentation |
1177–1180 ↗ | (On Diff #37240) | I don't think this block is correct. LBE_MMR6 and LBUE_MMR6 have one output (Reg) and two inputs (Base and Offset). This code adds one output (Reg) and three inputs (Reg, Base, and Offset). There's also no need for the condition since only LBE_MMR6+LBUE_MMR6 will call this decoder. If it is correct, then there's some formatting issues here (redundant braces, and space between ')' and '{'). |
1190–1192 ↗ | (On Diff #37240) | Indentation |
1200–1202 ↗ | (On Diff #37240) | I don't think this block is correct. LB_MMR6 and LBU_MMR6 have one output (Reg) and two inputs (Base and Offset). This code adds one output (Reg) and three inputs (Reg, Base, and Offset). There's also no need for the condition since only LB_MMR6+LBU_MMR6 will call this decoder. If it is correct, then there's some formatting issues here (redundant braces, and space between ')' and '{'). |
lib/Target/Mips/MicroMips32r6InstrFormats.td | ||
136 ↗ | (On Diff #37240) | Naming convention: This is a bit trickier than usual since LB is in LB32 and LBU is in LBU32 so we don't have a single major opcode to use as a prefix. I think we should have: class LB32_FM_MMR6 : MipsR6Inst { ... let Inst{31-26} = 0b000111 ... } class LBU32_FM_MMR6 : LB32_FM_MMR6 { let Inst{31-26} = 0b000101 } |
148 ↗ | (On Diff #37240) | Naming convention: LBE/LBUE are in POOL32C so this should be POOL32C_LB_LBU_FM_MMR6 |
lib/Target/Mips/MicroMips32r6InstrInfo.td | ||
287 ↗ | (On Diff #37240) | Indentation |
289 ↗ | (On Diff #37240) | Why three inputs? (mem_mm_16 has two operands inside it) These instructions don't read the result register. I think you need to remove $rt from here and update AsmString, Constraints, and the decoder accordingly. |
299 ↗ | (On Diff #37240) | Indentation and 80 cols |
test/MC/Mips/micromips32r6/valid.s | ||
205 ↗ | (On Diff #37240) | Blank line at EOF |