[PATCH] D140460: [RISCV][MC] Add support for experimental zfa extension

Jun Sha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 20:31:10 PST 2023


joshua-arch1 added a comment.

In D140460#4050322 <https://reviews.llvm.org/D140460#4050322>, @craig.topper wrote:

> I think according to the spec, we need to support parsing "Minimum positive normal" in decimal form. The exact value for is different for fli.h, fli.s, and fli.d.

I think there will be some difficulties in expressing 'minimum positive normal' in decimal form. For single-presicion minimum positive normal, the value is 1.1754943508222875079687365372222456778186655567720875215087517062784172594547271728515625E-38.  For double-precison, the value will need to be expressed in a much larger precision even if we use toString().



================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp:166
+  else
+    O << bit_cast<float>(RISCVLoadFPImm::getFPImm(MO.getImm()));
+}
----------------
craig.topper wrote:
> I think we should use APFloat::toString here to print with full precision.
What formatprecision should I choose for the second parameter in toString()?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140460/new/

https://reviews.llvm.org/D140460



More information about the llvm-commits mailing list