[PATCH] D155771: [JITLink][PowerPC] Support R_PPC64_PCREL34

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 13:01:02 PDT 2023


lhames added inline comments.


================
Comment at: llvm/include/llvm/ExecutionEngine/JITLink/ppc64.h:221-233
+template <support::endianness Endianness>
+inline static uint64_t readPrefixedInstruction(const char *Loc) {
+  constexpr bool isLE = Endianness == support::endianness::little;
+  uint64_t Inst = support::endian::read64<Endianness>(Loc);
+  return isLE ? (Inst << 32) | (Inst >> 32) : Inst;
+}
+
----------------
Could you add a comment to these?

It looks like they read/write 64-bits, masking out the high 32-bits iff little-endian?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155771



More information about the llvm-commits mailing list