if (ParseIntelDotOperator(SM, End))
return true;
break;
+ case AsmToken::At:
case AsmToken::String:
case AsmToken::Identifier: {
SMLoc IdentLoc = Tok.getLoc();
UpdateLocLex = false;
// Register
unsigned Reg;
- if (Tok.isNot(AsmToken::String) && !ParseRegister(Reg, IdentLoc, End)) {
+ if (Tok.is(AsmToken::Identifier) && !ParseRegister(Reg, IdentLoc, End)) {
if (SM.onRegister(Reg, ErrMsg))
return Error(Tok.getLoc(), ErrMsg);
break;
break;
}
// MS InlineAsm identifier
+ // Call parseIdentifier() to combine @ with the identifier behind it.
+ if (TK == AsmToken::At && Parser.parseIdentifier(Identifier))
+ return Error(IdentLoc, "expected identifier");
if (ParseIntelInlineAsmIdentifier(Val, Identifier, Info, false, End))
return true;
else if (SM.onIdentifierExpr(Val, Identifier, Info, true, ErrMsg))
; Check how tricky symbols are printed in the asm output.
; RUN: llc -mtriple=i686-pc-win32 %s -o - | FileCheck %s --check-prefix=ASM
+; RUN: llc -mtriple=i686-pc-win32 %s -x86-asm-syntax=intel -o - | FileCheck %s --check-prefix=ASM
-; Check that we can roundtrip these names through our assembler.
+; Check that we can roundtrip these names through our assembler,
+; in both at&t and intel syntax.
; RUN: llc -mtriple=i686-pc-win32 %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
+; RUN: llc -mtriple=i686-pc-win32 -x86-asm-syntax=intel %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
@"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ" = global i32 0