[PATCH] D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 04:28:10 PDT 2023


nemanjai added inline comments.


================
Comment at: lld/ELF/Arch/PPC64.cpp:846
+// DS-Form instructions.
+unsigned elf::getPPCDSFormOp(unsigned secondaryOp) {
+  switch (secondaryOp) {
----------------
I understand the motivation to return both the primary opcode and the last two bits here to differentiate `LWA` from `LD/STD`. However, I am not a fan of the different interface of these very similar and related functions.

Do any users of `getPPCDFormOp()` need the primary opcode to be in the least significant bits? Could we change the interface to return the instruction with the primary opcode in the most significant bits regardless of whether it is `D-Form/DS-Form` or even (in the future) `DQ-Form`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158197



More information about the llvm-commits mailing list