[PATCH] D158492: [RISCV] Add CSR RegisterClass and save/restore fcsr in interrupt

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 19:59:33 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:549
+      BuildMI(MBB, I, DL, get(RISCV::CSRRS))
+          .addReg(RISCV::X5, RegState::Define)
+          .addImm(getSysRegEncoding(SrcReg))
----------------
This seems tricky to me to hardcode a GPR in here. This makes the code only work in certain scenarios. Do other targets do anything like this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158492



More information about the llvm-commits mailing list