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

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 05:13:49 PST 2018


rogfer01 added inline comments.


================
Comment at: lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1139
 
+OperandMatchResultTy
+RISCVAsmParser::parseTPRelAddSymbol(OperandVector &Operands) {
----------------
I am a bit curious about this function because it looks very similar to `RISCVAsmParser::parseOperandWithModifier(OperandVector &Operands)`, which ends being used when attempting to parse an immediate that starts with `%`.

My understanding is that `isTPRelAddSymbol` should filter wrong cases without the need of a custom parser but I think you wanted a more precise diagnostic (as shown in the relevant testcases below)? Is my understanding correct or I am missing other reasons to need a custom parser here?

Thanks!


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