Differential Revision: http://reviews.llvm.org/D14781
llvm-svn: 263802
return intToken(Result, Value);
}
- if (*CurPtr == 'b') {
+ if ((*CurPtr == 'b') || (*CurPtr == 'B')) {
++CurPtr;
// See if we actually have "0b" as part of something like "jmp 0b\n"
if (!isdigit(CurPtr[0])) {
return intToken(Result, Value);
}
- if (*CurPtr == 'x') {
+ if ((*CurPtr == 'x') || (*CurPtr == 'X')) {
++CurPtr;
const char *NumStart = CurPtr;
while (isxdigit(CurPtr[0]))
}
static unsigned GetAutoSenseRadix(StringRef &Str) {
- if (Str.startswith("0x")) {
+ if (Str.startswith("0x") || Str.startswith("0X")) {
Str = Str.substr(2);
return 16;
}
- if (Str.startswith("0b")) {
+ if (Str.startswith("0b") || Str.startswith("0B")) {
Str = Str.substr(2);
return 2;
}
--- /dev/null
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
+
+foo:
+.short 0X1
+# CHECK: .short 1
+.short 0B1
+# CHECK: .short 1