[PATCH] D47545: [MC][X86] Allow assembler variable assignment to register name.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 12:20:32 PDT 2018


niravd added a comment.

In https://reviews.llvm.org/D47545#1116590, @rnk wrote:

> This breaks the invariant that an MCSymbol is always a relocatable symbol. I wonder if the better way to do this would be to pretend what we actually saw was a macro definition when the RHS of an assignment doesn't parse as an MCExpr, which is basically a language for relocatable expressions.


That's part of why these symbols are inlined and assignments are elided in the assembly output. I agree it'd better to other variable layers, but neither the C++ processor or assembler macro work. For the former case because of order of evaluation compared to assembler functions; for the latter because assembler macro handling assumes instantiated macros are complete assembly statements.


Repository:
  rL LLVM

https://reviews.llvm.org/D47545





More information about the llvm-commits mailing list