fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"
authorChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 23:40:56 +0000 (23:40 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 23:40:56 +0000 (23:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113184 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/AsmParser/X86/x86_instructions.s

index 2aa632d42980ef6b8a607b973278a9fe6fcbbc38..19d9470639d7edcc39c64df3d2186cba6afd20c5 100644 (file)
@@ -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")
index 43702a16174d3a7268172f47db3d360a6bd1760d..308dc09586daeee1c841776e996425311bfc7d99 100644 (file)
@@ -173,3 +173,8 @@ outb        %al, $161
 outw   %ax, $128
 // CHECK: inb  $161, %al
 inb    $161, %al
+
+// rdar://8017621
+// CHECK: pushq        $1
+push $1
+