[PATCH] D114172: [ARM] implement support for ALU/LDR PC-relative group relocations

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 22 11:58:10 PST 2021


MaskRay added inline comments.


================
Comment at: lld/ELF/Arch/ARM.cpp:433
+  } while (group--);
+  return std::pair<uint32_t, uint32_t>(rem, lz);
 }
----------------



================
Comment at: lld/ELF/Arch/ARM.cpp:431
+    rem = val;
+    val &= (uint64_t)0xffffffU >> lz;
+  } while (group--);
----------------
MaskRay wrote:
> MaskRay wrote:
> > 
> val is uint32_t. Remove `(uint64_t)`?
Is `(uint64_t)0xffffff >> 32` possible? If lz can be 32, casting to `(uint64_t)` LGTM but it needs a comment. I am not familiar with the encoding and do not know whether lz can be 32.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114172



More information about the llvm-commits mailing list