[PATCH] D45164: [MC] Change AsmParser to leverage Assembler during evaluation

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 08:46:42 PDT 2018


peter.smith added a comment.

If I've understood correctly, this will evaluate the expression if there is something simple and unrelaxable such as (Armv7a)

  .thumb
  start:
  nop
  end:
  .if (end - start == 2)

But not if there may be relaxations involved:

  .thumb
  start:
  ldr r0,=0x12345678 // Relaxable instruction that generates a constant pool.
  end:
  .if (end - start == 2) // expect error message here

If this is the case, please can there be a test that checks for the error message as I think it is important that we don't accidentally allow these expressions to be evaluated early if their result depends on a later layout pass.


Repository:
  rL LLVM

https://reviews.llvm.org/D45164





More information about the llvm-commits mailing list