Allow a slash, '/', as a prefix separator for X86. rdar://8741045
authorKevin Enderby <enderby@apple.com>
Wed, 8 Dec 2010 23:57:59 +0000 (23:57 +0000)
committerKevin Enderby <enderby@apple.com>
Wed, 8 Dec 2010 23:57:59 +0000 (23:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121320 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/X86/x86-64.s

index 1064effbbc67cd4d6dbbc8cb28b6d39bff3c8821..b3f3dbbedd0ab59c36e0047ec442fc53c2225362 100644 (file)
@@ -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
index 17f00faafc0068654cad42ae171124d819853ee7..a285c6f6456640becbd4ec3fc99ad7bd719dc834 100644 (file)
@@ -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