User Details
- User Since
- Oct 15 2022, 7:40 AM (15 w, 1 d)
Dec 26 2022
Thanks for the quick fix, sorry for my fault on that.
Delete blank lines as @SixWeining suggest.
Dec 24 2022
Using dso_local in ghc-cc.ll and revert the changes in getAddr() to keep the semantics of dso_preemtable.
Dec 14 2022
Dec 7 2022
Following @xen0n's advice: Fix --mattr and replace pointer types with opaque pointers in ghc-cc.ll, delete TODO in CodeModel:Small and make it fall through to CodeModel:Medium.
Nov 7 2022
@wangleiat
Basically, what GHC calling convention do is mapping the virtual registers of STG Machine (part of the Haskell Runtime System) into real registers, so here in ghc-cc.ll must be pcrel, in short, it isn't a function call, but a simple value load process, using got here will lead to load a symbol twice, which isn't a function symbol, so it will not present in GOT table. More information about this calling convention could find on GHC llvm porting
Also, using -pic or not is determined by GHC itself, and judge by its knowing behavior, isPositionIndependent is needed to avoid generating got patterns while compiling it using llvm backend.
Nov 6 2022
@wangleiat
I have consulted the RISC-V codemodel here, which CodeModel::Small is represented by addi (lui %hi(sym)) %lo(sym), using for accessing the first 2GiB of address space, I think it could be implemented in LoongArch also, or LoongArch have a different codemodel here?
This is used in Implement LoongArch64 LLVM backend support
Fix typos of the register mapping and delete empty lines.