[PATCH] D22112: Disambiguate a constant with both 0B prefix and H suffix.

Yunzhong Gao via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 11:25:40 PDT 2016


ygao added a comment.

I think what you said makes a lot of sense to me... The practical difficulty
here is that if I actually disabled "0b" prefix under the Intel syntax, I would
be without a way to express binary numbers (sad face). Maybe I can implement
something? The Intel instruction manual talks of using [01]+[bB], but it looks
sufficiently similar to a backward label, and I could not figure out how the
Intel assembler actually tells them apart. For example,

  .text
    1:  add rax, 20
  .data
    .long   1b

In this example, it would appear ambiguous to me whether the "1b" in data
section is a numerical literal "1" or the address of the add instruction.


http://reviews.llvm.org/D22112





More information about the llvm-commits mailing list