[llvm] [RISCV][MC] Recognise that fcvt.d.s with frm != 0b000 is valid (PR #67555)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 13:03:43 PDT 2023


================
@@ -158,6 +158,16 @@ void RISCVInstPrinter::printFRMArg(const MCInst *MI, unsigned OpNo,
   O << ", " << RISCVFPRndMode::roundingModeToString(FRMArg);
 }
 
+void RISCVInstPrinter::printFRMArgLegacy(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::RNE)
----------------
topperc wrote:

I know people who like to use it with objdump to see compressed instructions with their `c.` prefix or for other reasons.

https://github.com/llvm/llvm-project/pull/67555


More information about the llvm-commits mailing list