summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.td3
-rw-r--r--llvm/test/MC/X86/x86-32-coverage.s7
-rw-r--r--llvm/test/MC/X86/x86_64-encoding.s7
3 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td
index 14c90662d02..221aa2fdc33 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.td
+++ b/llvm/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/llvm/test/MC/X86/x86-32-coverage.s b/llvm/test/MC/X86/x86-32-coverage.s
index ea30e8d022f..4ec9fcdb1ee 100644
--- a/llvm/test/MC/X86/x86-32-coverage.s
+++ b/llvm/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/llvm/test/MC/X86/x86_64-encoding.s b/llvm/test/MC/X86/x86_64-encoding.s
index c071a1b765e..756da4dc352 100644
--- a/llvm/test/MC/X86/x86_64-encoding.s
+++ b/llvm/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
OpenPOWER on IntegriCloud