[PATCH] D58759: Fixed error: could not find corresponding %pcrel_hi

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 23:11:24 PST 2019


lewis-revill added a comment.

In D58759#1415688 <https://reviews.llvm.org/D58759#1415688>, @efriedma wrote:

> I don't understand why it necessary to ensure the label is attached to the "correct" fragment; it's still pointing to the same address either way. Could you try a little harder in RISCVMCExpr::getPCRelHiFixup() to find the symbol?  (Given an MCFragment, you can call getPrevNode() to get the previous MCFragment.)


I guess the difficulty there is that you wouldn't know which fragment the symbol offset (`AUIPCSymbol->getOffset()`) relates to. So you might end up finding a symbol with a matching offset in the current fragment even though you should be looking in the previous fragment, or vice-versa.


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

https://reviews.llvm.org/D58759





More information about the llvm-commits mailing list