From: Kevin Enderby Date: Wed, 8 Dec 2010 23:57:59 +0000 (+0000) Subject: Allow a slash, '/', as a prefix separator for X86. rdar://8741045 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=76331754d4a06e2394c15ae8f4870f4aeaf5ca1f;p=oota-llvm.git Allow a slash, '/', as a prefix separator for X86. rdar://8741045 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121320 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 1064effbbc6..b3f3dbbedd0 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -758,6 +758,8 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, if (getLexer().is(AsmToken::EndOfStatement)) Parser.Lex(); // Consume the EndOfStatement + else if (isPrefix && getLexer().is(AsmToken::Slash)) + Parser.Lex(); // Consume the prefix separator Slash // This is a terrible hack to handle "out[bwl]? %al, (%dx)" -> // "outb %al, %dx". Out doesn't take a memory form, but this is a widely diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s index 17f00faafc0..a285c6f6456 100644 --- a/test/MC/X86/x86-64.s +++ b/test/MC/X86/x86-64.s @@ -738,6 +738,11 @@ lock incl 1(%rsp) // CHECK: lock // CHECK: incl 1(%rsp) +// rdar://8741045 +lock/incl 1(%rsp) +// CHECK: lock +// CHECK: incl 1(%rsp) + // rdar://8033482 rep movsl // CHECK: rep