summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/X86InstrInfo.td3
-rw-r--r--test/MC/X86/x86-32-coverage.s7
-rw-r--r--test/MC/X86/x86_64-encoding.s7
3 files changed, 17 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 14c90662d0..221aa2fdc3 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -1293,6 +1293,9 @@ def : MnemonicAlias<"cdqe", "cltq">;
// lret maps to lretl, it is not ambiguous with lretq.
def : MnemonicAlias<"lret", "lretl">;
+def : MnemonicAlias<"leavel", "leave">, Requires<[In32BitMode]>;
+def : MnemonicAlias<"leaveq", "leave">, Requires<[In64BitMode]>;
+
def : MnemonicAlias<"pop", "popl">, Requires<[In32BitMode]>;
def : MnemonicAlias<"pop", "popq">, Requires<[In64BitMode]>;
def : MnemonicAlias<"popf", "popfl">, Requires<[In32BitMode]>;
diff --git a/test/MC/X86/x86-32-coverage.s b/test/MC/X86/x86-32-coverage.s
index ea30e8d022..4ec9fcdb1e 100644
--- a/test/MC/X86/x86-32-coverage.s
+++ b/test/MC/X86/x86-32-coverage.s
@@ -267,6 +267,9 @@
// CHECK: leave
leave
+// CHECK: leave
+ leavel
+
// CHECK: seto %bl
seto %bl
@@ -3330,6 +3333,10 @@
// CHECK: encoding: [0xc9]
leave
+// CHECK: leave
+// CHECK: encoding: [0xc9]
+ leavel
+
// CHECK: seto %bl
// CHECK: encoding: [0x0f,0x90,0xc3]
seto %bl
diff --git a/test/MC/X86/x86_64-encoding.s b/test/MC/X86/x86_64-encoding.s
index c071a1b765..756da4dc35 100644
--- a/test/MC/X86/x86_64-encoding.s
+++ b/test/MC/X86/x86_64-encoding.s
@@ -148,3 +148,10 @@ pshufb CPI1_0(%rip), %xmm1
// CHECK: encoding: [0x48,0x0f,0xae,0x08]
fxrstorq (%rax)
+// CHECK: leave
+// CHECK: encoding: [0xc9]
+ leave
+
+// CHECK: leave
+// CHECK: encoding: [0xc9]
+ leaveq