CRC and GINV ASE require revision 6, Virtualization requires revision 5.
Print a warning when revision is older than required.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with one minor note.
| lib/Target/Mips/MipsSubtarget.cpp | ||
|---|---|---|
| 202 ↗ | (On Diff #153758) | Looks good. But maybe the code below is a bit shorter? StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32";
if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) {
  errs() << "warning: the 'msa' ASE requires " << ArchName
         << " revision 5 or greater\n";
  MSAWarningPrinted = true;
}
if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) {
  errs() << "warning: the 'virt' ASE requires " << ArchName
         << " revision 5 or greater\n";
  VirtWarningPrinted = true;
}
if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) {
  errs() << "warning: the 'crc' ASE requires " << ArchName
         << " revision 6 or greater\n";
  CRCWarningPrinted = true;
}
if (hasMips32r6() && hasGINV() && !GINVWarningPrinted) {
  errs() << "warning: the 'ginv' ASE requires " << ArchName
         << " revision 6 or greater\n";
  GINVWarningPrinted = true;
} | 
| lib/Target/Mips/MipsSubtarget.cpp | ||
|---|---|---|
| 202 ↗ | (On Diff #153758) | Yes, this one's better, thanks. |