[PATCH] D55341: [RISCV, WIP] Support assembling TLS add and associated modifiers

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 08:00:49 PST 2018


jrtc27 added a comment.

In D55341#1321157 <https://reviews.llvm.org/D55341#1321157>, @luismarques wrote:

> GCC/binutils allows `add a0, a0, tp, 0`. I've submitted a bug against binutils [1] which attempts to clarify if that should actually be supported or not. Depending on the feedback, this patch's requirement that `%tprel_add` needs to always be present might need to be revised.
>  [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23956


They've clarified in that bug report that it's not intended and should be fixed, so we don't need to support it.



================
Comment at: lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:874
+                                      "operand must be a symbol with "
+                                      "%hi/%tprel_hi() modifier or an integer "
+                                      "in the range");
----------------
For  consistency with `Match_InvalidSImm12` (along with my `%got_pcrel_hi` change and your `Match_InvalidTPRelAddSymbol`) I'd drop the `()` from the error message.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55341





More information about the llvm-commits mailing list