add support for pushfd/popfd which are aliases for pushfl/popfl.
authorChris Lattner <sabre@nondot.org>
Sat, 11 Sep 2010 16:39:16 +0000 (16:39 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 11 Sep 2010 16:39:16 +0000 (16:39 +0000)
This fixes rdar://8408129 - pushfd and popfd get invalid instruction mnemonic errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113690 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/AsmParser/X86/x86_32-new-encoder.s

index e6f0d9561a11b4ef1db5f62acc8882d5a4412c99..4a636c3b135fe484bd23516ad68d291b6b6cd3b8 100644 (file)
@@ -633,6 +633,8 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
     .Case("pop", Is64Bit ? "popq" : "popl")
     .Case("pushf", Is64Bit ? "pushfq" : "pushfl")
     .Case("popf",  Is64Bit ? "popfq"  : "popfl")
+    .Case("pushfd", "pushfl")
+    .Case("popfd",  "popfl")
     .Case("retl", Is64Bit ? "retl" : "ret")
     .Case("retq", Is64Bit ? "ret" : "retq")
     .Case("setz", "sete")
index 70d4b40c78a886dcac61c5b4d3d52b9fc223007b..efdce604efc5027d4bbb4dc91a28d10ba766b7c7 100644 (file)
@@ -508,3 +508,13 @@ pop %ds
 pop %es
 // CHECK: popl %es
 // CHECK: encoding: [0x07]
+
+// rdar://8408129
+pushfd
+// CHECK: pushfl
+popfd
+// CHECK: popfl
+pushfl
+// CHECK: pushfl
+popfl
+// CHECK: popfl