[PATCH] D22112: Disambiguate a constant with both 0B prefix and H suffix.
Yunzhong Gao via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 18:20:36 PDT 2016
ygao added inline comments.
================
Comment at: lib/MC/MCParser/AsmLexer.cpp:336
@@ -291,2 +335,2 @@
// See if we actually have "0b" as part of something like "jmp 0b\n"
if (!isdigit(CurPtr[0])) {
----------------
You are right.
Sigh. I was writing .asm files and testing them with the ml.exe/ml64.exe
executables which are part of Visual Studio 2013.
```
C:\> type test.asm
.code
mov ax, 0x0b00
END
C:\> ml64 /FoMyObj test.asm
test.asm(2) : error A2206:missing operator in expression
```
Apparently, the stand-alone assembler behaves differently than the parser in cl.exe.
I tested inline assembly again with cl.exe and updated the test cases accordingly.
0xNN => accepted
0xNN with U or L suffix => accepted
NNh => accepted
NNh with U or L suffix => accepted
0xNNh => rejected
0bNN => rejected
NNb => accepted
NNb with U or L suffix => accepted
https://reviews.llvm.org/D22112
More information about the llvm-commits
mailing list