diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 2aa632d4298..19d9470639d 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -636,6 +636,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc, .Case("repe", "rep") .Case("repz", "rep") .Case("repnz", "repne") + .Case("push", Is64Bit ? "pushq" : "pushl") .Case("pushf", Is64Bit ? "pushfq" : "pushfl") .Case("popf", Is64Bit ? "popfq" : "popfl") .Case("retl", Is64Bit ? "retl" : "ret") diff --git a/test/MC/AsmParser/X86/x86_instructions.s b/test/MC/AsmParser/X86/x86_instructions.s index 43702a16174..308dc09586d 100644 --- a/test/MC/AsmParser/X86/x86_instructions.s +++ b/test/MC/AsmParser/X86/x86_instructions.s @@ -173,3 +173,8 @@ outb %al, $161 outw %ax, $128 // CHECK: inb $161, %al inb $161, %al + +// rdar://8017621 +// CHECK: pushq $1 +push $1 +