[PATCH] D138135: [WIP][ELF] Support LoongArch

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 26 00:29:16 PST 2022


xen0n marked an inline comment as done.
xen0n added inline comments.


================
Comment at: lld/ELF/Arch/LoongArch.cpp:487
+  case R_LARCH_TLS_GD_HI20: {
+    // TODO: checkInt(loc, SignExtend64(hi, bits) >> 12, 20, rel);
+    write32le(loc, setJ20(read32le(loc), extractBits(val, 31, 12)));
----------------
xen0n wrote:
> MQ-mengqing wrote:
> > Why so many TODOs here?
> > 
> Because this patch is clearly marked as `[WIP]`? I'm just posting the in-progress work early in order to not overwhelm everyone later in the review cycle.
I've confirmed no relocs other than `R_LARCH_B{16,21,26}` need overflow/alignment checking (because the widest i.e. 64-bit relocs reuse all three lower reloc types, the lower types cannot check for overflow, and the highest type doesn't overflow at all). All such TODOs are now removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138135



More information about the llvm-commits mailing list