[PATCH] D105429: [JITLink][RISCV] Initial Support RISCV64 in JITLink

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 18 01:33:22 PDT 2021


StephenFan marked 5 inline comments as done.
StephenFan added inline comments.


================
Comment at: llvm/include/llvm/ExecutionEngine/JITLink/ELF_riscv64.h:23-33
+namespace ELF_riscv64_Edges {
+enum ELFRISCVRelocationKind : Edge::Kind {
+  R_RISCV_32 = Edge::FirstRelocation,
+  R_RISCV_64,
+  R_RISCV_HI20,
+  R_RISCV_LO12_I,
+  R_RISCV_CALL,
----------------
lhames wrote:
> Could you please move these edge kinds into their own file (e.g. 'RISCV.h') following the convention established in `llvm/include/llvm/ExecutionEngine/JITLink/x86_64.h`?
> 
> I don't mind if the initial edge set very closely mirrors the ELF relocation set, but the idea is to try to capture the generic fixups that the architecture requires. This simplifies the implementation of new linker backends for the architecture, and allows Plugins to remain as format-agnostic as possible.
> 
> Sadly ELF_x86_64 hasn't been moved to the generic kinds in x86_64.h yet, so it's not an ideal example here. The MachO_x86_64 backend is probably a better example.
Currently, the edge set is the mirror of the ELF relocation set. After a while, I will capture the generic fixups and replace the edge set with generic edge set.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105429



More information about the llvm-commits mailing list