[PATCH] D100835: [WIP][LLD][RISCV] Linker Relaxation

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 07:11:30 PDT 2022


luismarques added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:144
 template <RelExpr... Exprs> bool oneof(RelExpr expr) {
-  assert(0 <= expr && (int)expr < 64 &&
-         "RelExpr is too large for 64-bit mask!");
-  return (uint64_t(1) << expr) & RelExprMaskBuilder<Exprs...>::build();
+  assert(0 <= expr && (int)expr < 128 &&
+         "RelExpr is too large for 128-bit mask!");
----------------
PkmX wrote:
> arichardson wrote:
> > This change should be a separate review. I would very much like support for > 64 RelExpr values to land upstream since we also had to make that change that for our CHERI LLD.
> That's okay for me. I will split this out into a new patch.
>> we also had to make that change that for our CHERI LLD.
> That's okay for me. I will split this out into a new patch.

I ran into the same problem in another context. It would be good to have some guidance about what's the best way forward to address this for the long term (e.g. two 64-bit masks?). @ruiu?

@PkmX Are you still planning to submit your separate patch for this mask issue? And, more broadly, to update this LLD RISC-V relaxation patch?


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

https://reviews.llvm.org/D100835



More information about the llvm-commits mailing list