From 836c50cc2fc15e5ec75aeab93bf1618512f87ab8 Mon Sep 17 00:00:00 2001 From: Coby Tayree Date: Wed, 27 Sep 2017 10:29:29 +0000 Subject: [PATCH] [X86][AsmParser] fix PR32035 Differential Revision: https://reviews.llvm.org/D37473 llvm-svn: 314295 --- llvm/lib/Target/X86/X86InstrInfo.td | 2 ++ llvm/test/MC/X86/intel-syntax-encoding.s | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index d42a6e3..9f99f40 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -2769,6 +2769,7 @@ def : MnemonicAlias<"pop", "popq", "att">, Requires<[In64BitMode]>; def : MnemonicAlias<"popf", "popfw", "att">, Requires<[In16BitMode]>; def : MnemonicAlias<"popf", "popfl", "att">, Requires<[In32BitMode]>; def : MnemonicAlias<"popf", "popfq", "att">, Requires<[In64BitMode]>; +def : MnemonicAlias<"popf", "popfq", "intel">, Requires<[In64BitMode]>; def : MnemonicAlias<"popfd", "popfl", "att">; // FIXME: This is wrong for "push reg". "push %bx" should turn into pushw in @@ -2780,6 +2781,7 @@ def : MnemonicAlias<"push", "pushq", "att">, Requires<[In64BitMode]>; def : MnemonicAlias<"pushf", "pushfw", "att">, Requires<[In16BitMode]>; def : MnemonicAlias<"pushf", "pushfl", "att">, Requires<[In32BitMode]>; def : MnemonicAlias<"pushf", "pushfq", "att">, Requires<[In64BitMode]>; +def : MnemonicAlias<"pushf", "pushfq", "intel">, Requires<[In64BitMode]>; def : MnemonicAlias<"pushfd", "pushfl", "att">; def : MnemonicAlias<"popad", "popal", "intel">, Requires<[Not64BitMode]>; diff --git a/llvm/test/MC/X86/intel-syntax-encoding.s b/llvm/test/MC/X86/intel-syntax-encoding.s index e6ddc87..e15f647 100644 --- a/llvm/test/MC/X86/intel-syntax-encoding.s +++ b/llvm/test/MC/X86/intel-syntax-encoding.s @@ -61,6 +61,11 @@ // CHECK: encoding: [0xf0] // CHECK: encoding: [0x48,0x01,0x00] +// CHECK: encoding: [0x9c] +// CHECK: encoding: [0x9d] +pushf +popf + LBB0_3: // CHECK: encoding: [0xeb,A] jmp LBB0_3 -- 2.7.4