[PATCH] D143673: [lld][RISCV] Implement GP relaxation for R_RISCV_HI20/R_RISCV_LO12_I/R_RISCV_LO12_S.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 16:43:54 PST 2023


craig.topper added inline comments.


================
Comment at: lld/test/ELF/riscv-relax-hi20-lo12.s:30
+_start:
+  lui a0, %hi(foo)
+  addi a0, a0, %lo(foo)
----------------
MaskRay wrote:
> I usually test at least two symbols so that I can check in-bounds and out-of-bounds in one file. It is useful to test the largest displacement which is still relaxable.
> 
> You may check how riscv-relax-call2.s and x86-64-tlsdesc-ld.s test stuff.
> 
> Also, like riscv-relax-align.s, we'd better test that symbol values after the relaxed location is still correct.
Which part of riscv-relax-align.s tests that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143673



More information about the llvm-commits mailing list