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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 09:16:01 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h:385
+
+  static std::map<std::pair<int, int>, int> LoadFPImmMap = {
+      {{0b00000001, 0b000}, 1},  {{0b01101111, 0b000}, 2},
----------------
All of the values are in order. Can we use a constexpr array of std::pair<uint8_t, uint8_t> and look it up with std::lower_bound? Once we have the iterator we can use std::distance+1 to convert to 1-31.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td:106
+
+let Predicates = [HasStdExtZfa, HasStdExtZfh ] in {
+def FLI_H : FPUnaryOp_imm<0b1111010, 0b00001, 0b000, OPC_OP_FP, (outs FPR16:$rd),
----------------
Extra space after Zfh


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

https://reviews.llvm.org/D140460



More information about the llvm-commits mailing list