[PATCH] D89788: [RISCV] Add GHC calling convention

Andreas Schwab via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 10:28:51 PDT 2020


schwab added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1969
+  if (LocVT == MVT::i64) {
+    // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, R5, R6, R7, SpLim
+    static const MCPhysReg GPRList[] = {
----------------
jrtc27 wrote:
> Do you have an explanation somewhere for why you've chosen these X and F registers for the calling convention? It'd also be useful to give their RISC-V ABI names here in the comments as the numbered registers aren't so easy to keep track of mentally.
I have just allocated the caller-saved registers in sequence s1 .. s11, fs0 .. fs11


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

https://reviews.llvm.org/D89788



More information about the llvm-commits mailing list