https://llvm.org/bugs/show_bug.cgi?id=27884
Bug ID: 27884 Summary: Assembler not accepting hex constants that include '0b' or '0B' as first characters in intel syntax Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: MC Assignee: unassignedb...@nondot.org Reporter: douglas_y...@playstation.sony.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider the following assembly code: .intel_syntax add rax, 0A0h add rax, 0a0h add rbx, 0B0h add rbx, 0b0h Both lines are in intel syntax and add a hexadecimal constant to the value in a register. However, when you try to compile this using clang, you get an error: reduced3.asm:4:14: error: unknown token in expression add rbx, 0B0h ^ reduced3.asm:5:14: error: unknown token in expression add rbx, 0b0h ^ (The carat points to just after the 'h' character if it gets mangled). I suspect this is because the function AsmLexer::LexDigit() in AsmLexer.cpp i parsing assuming AT&T syntax and gets confused. Prior to the change in r263802, the compiler was correctly accepting the constant when it was '0B', but after that change, both are causing errors. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs