The patch implements microMIPS32r6 PAUSE, RDHWR, RDPGPR, SDBBP, SIGRIE, SSNOP, SYNC, SYNCI and WAIT instructions.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/Disassembler/MipsDisassembler.cpp | ||
---|---|---|
265–267 ↗ | (On Diff #34015) | Indentation |
1172–1174 ↗ | (On Diff #34015) | Indentation |
lib/Target/Mips/MicroMips32r6InstrFormats.td | ||
127–200 ↗ | (On Diff #34015) | All but one of these need to be renamed to follow the convention of <major-opcode-name>_<string>_FM_MMR6. POOL32A_RDHWR_FM_MMR6 is correct. |
lib/Target/Mips/MicroMips32r6InstrInfo.td | ||
298–308 ↗ | (On Diff #34015) | You don't need separate a *_DESC_BASE class if there's only one subclass. |
299 ↗ | (On Diff #34015) | Indentation |
308 ↗ | (On Diff #34015) | Indentation |
336–365 ↗ | (On Diff #34015) | You don't need a separate *_DESC_BASE class if there's only one subclass. |
351 ↗ | (On Diff #34015) | Is this under 80 cols? |
464 ↗ | (On Diff #34015) | Indentation |
lib/Target/Mips/MicroMipsInstrInfo.td | ||
870 ↗ | (On Diff #34015) | Why is this changed? You don't mention TLBWR in your commit message. |
876 ↗ | (On Diff #34015) | Indentation |
test/MC/Mips/micromips-control-instructions.s | ||
14 ↗ | (On Diff #34015) | Have you fixed the emission of the .set's or have you only removed the checks? |
lib/Target/Mips/MicroMipsInstrInfo.td | ||
---|---|---|
945 ↗ | (On Diff #37561) | I don't know why I changed the TLBWR_MM. This was a mistake. Probably I was trying experimenting with something unrelated. Thank you for pointing this out. |
test/MC/Mips/micromips-control-instructions.s | ||
14 ↗ | (On Diff #37561) | According to https://dmz-portal.mips.com/bugz/show_bug.cgi?id=459, mips32r2 version of RDHWR emits those directives in mips32 mode. I had a disscussion with zoran.jovanovic quite some time ago and we agreed that there is no need for micromips version of RDHWR to emit those instructions. This also helped me to implement the RDHWR for micromips32r6 just by setting NotInMicroMips in AdditionalPredicates for RDHWR definition in lib/Target/Mips/MipsInstrInfo.td. So by setting this I also removed directives that were expected for RDHWR assembler test in test/MC/Mips/micromips-control-instructions.s |
Thanks. Just one small change and it will LGTM
test/MC/Mips/micromips-control-instructions.s | ||
---|---|---|
14 ↗ | (On Diff #37561) |
That's correct. In fact it goes a bit further than that since they aren't really required for any MIPS ISA on Linux (and possibly others). Although the instruction isn't strictly part of the older ISA's the Linux kernel will emulate it. The reason they're there is that the integrated assembler is currently too accurate in the predicates for RDHWR. I see why they aren't emitted in this case now. It's simply that they are added to RDHWR and RDHWR64 in MipsInstPrinter.cpp. The conversion to microMIPS means that it's neither of those. Please add CHECK-NOT's to ensure that they aren't emitted. |