Instead of having InstAliases without operand. Use the optional
operand infrastructure.
Still use the PrintAliases/NoAlias controls to determine if we
print "dyn" or not.
Paths
| Differential D142959
[RISCV] Handle FRMArg as an optional operand instead of using InstAliases. ClosedPublic Authored by craig.topper on Jan 31 2023, 1:08 AM.
Details Summary Instead of having InstAliases without operand. Use the optional Still use the PrintAliases/NoAlias controls to determine if we
Diff Detail
Event TimelineHerald added subscribers: luke, VincentWu, jeroen.dobbelaere and 25 others. · View Herald Transcript This revision is now accepted and ready to land.Jan 31 2023, 2:06 AM This revision was landed with ongoing or failed builds.Jan 31 2023, 9:08 AM Closed by commit rG6a1b2d042882: [RISCV] Handle FRMArg as an optional operand instead of using InstAliases. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions void RISCVInstPrinter::printFRMArg(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI, raw_ostream &O) { auto FRMArg = static_cast<RISCVFPRndMode::RoundingMode>(MI->getOperand(OpNo).getImm()); if (PrintAliases && !NoAliases && FRMArg == RISCVFPRndMode::RoundingMode::DYN) return; O << ", " << RISCVFPRndMode::roundingModeToString(FRMArg); } In printFRMArg(), there is an extra "," before the FRM output. Why? Comment Actions
Need to remove the comma from the AsmString on the instruction as I did in this patch
Revision Contents
Diff 493643 llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td
|