[PATCH] D52298: [RISCV][MC] Add support for evaluating constant symbols as immediates

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 3 06:25:03 PST 2019


asb updated this revision to Diff 180051.
asb edited the summary of this revision.
asb added a comment.

As suggested my Shiva, this patch has been updated to allow AsmParser::parseExpression to do the work when parsing an identifier.

I mentioned previously that I encountered an issue when trying to switch to this approach, but I'm not longer able to reproduce (so it was probably a mistake on my part).

Note that constant symbols can't be used with CSR operations. That would require changes toparseCSRSystemRegister. Same for parseBareSymbol (used in e.g. the call pseudoinstruction). Given that this patch is an incremental improvement that makes sense on its own, I'd prefer to follow up with separate patches for the other cases.

Does this look good to you?


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

https://reviews.llvm.org/D52298

Files:
  lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
  test/MC/RISCV/rv32i-aliases-valid.s
  test/MC/RISCV/rv32i-valid.s
  test/MC/RISCV/rv64i-aliases-valid.s
  test/MC/RISCV/rv64i-valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52298.180051.patch
Type: text/x-patch
Size: 6479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/c0578cc7/attachment.bin>


More information about the llvm-commits mailing list