[LoongArch] Add GHC Calling Convention
authorLin Runze <lrzlin@163.com>
Mon, 26 Dec 2022 10:37:09 +0000 (18:37 +0800)
committerWeining Lu <luweining@loongson.cn>
Mon, 26 Dec 2022 11:36:41 +0000 (19:36 +0800)
commit389079c87c826df9c0a089994d0fea50e6613a9f
treed1889cf4c9318379478f8dbd838c7fdb633dd22f
parentdab67c66932b9149842f7c8431e951f952125fc0
[LoongArch] Add GHC Calling Convention

This is modeled after [[ https://reviews.llvm.org/D89788 | the RISCV GHC calling convention]]
and matches [[ https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9292 | the corresponding GHC change ]].

Reviewed By: xen0n, wangleiat

Differential Revision: https://reviews.llvm.org/D137495
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/lib/Target/LoongArch/LoongArchRegisterInfo.cpp
llvm/test/CodeGen/LoongArch/ghc-cc.ll [new file with mode: 0644]