summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-11 16:39:16 +0000
committerChris Lattner <sabre@nondot.org>2010-09-11 16:39:16 +0000
commitdfa3c9d98260f899297c11cda2b15dc44fc4f91e (patch)
tree00ab570bcdc37057564f19598c1d9d67f140871c
parentee211d0ed632d6329922ad4c5f7a25d3d66cf551 (diff)
downloadllvm-dfa3c9d98260f899297c11cda2b15dc44fc4f91e.tar.gz
llvm-dfa3c9d98260f899297c11cda2b15dc44fc4f91e.tar.bz2
llvm-dfa3c9d98260f899297c11cda2b15dc44fc4f91e.tar.xz
add support for pushfd/popfd which are aliases for pushfl/popfl.
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
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp2
-rw-r--r--test/MC/AsmParser/X86/x86_32-new-encoder.s10
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index e6f0d9561a..4a636c3b13 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -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")
diff --git a/test/MC/AsmParser/X86/x86_32-new-encoder.s b/test/MC/AsmParser/X86/x86_32-new-encoder.s
index 70d4b40c78..efdce604ef 100644
--- a/test/MC/AsmParser/X86/x86_32-new-encoder.s
+++ b/test/MC/AsmParser/X86/x86_32-new-encoder.s
@@ -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