[PATCH] D131347: Set up basic infrastructure for ELF/i386 backend support in JITLink .

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 21:29:10 PDT 2022


sunho added a comment.

Thanks for the patch! It's really exciting to see i386 backend coming up.



================
Comment at: llvm/include/llvm/ExecutionEngine/JITLink/i386.h:26
+  /// None
+  R_386_NONE = Edge::FirstRelocation,
+
----------------
The enum name here is better to be non platform-specific like in x86_64.h and aarch64.h. The edges are going to be reused across other platforms too. (e.g. COFF/i386)


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp:49
+
+  template <uint8_t Bits> static bool fitsRangeSignedInt(int64_t Value) {
+    return Value >= -(1 << Bits) && Value < (1 << Bits);
----------------
If you were not aware of it, there is isInt<> function in support library.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131347



More information about the llvm-commits mailing list