[llvm-commits] [llvm] r125795 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td test/MC/X86/x86-32-coverage.s test/MC/X86/x86_64-encoding.s
Joerg Sonnenberger
joerg at bec.de
Thu Feb 17 15:36:39 PST 2011
Author: joerg
Date: Thu Feb 17 17:36:39 2011
New Revision: 125795
URL: http://llvm.org/viewvc/llvm-project?rev=125795&view=rev
Log:
Recognize leavel and leaveq aliases for leave.
Validate encoding of leave in 64bit mode.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
llvm/trunk/test/MC/X86/x86-32-coverage.s
llvm/trunk/test/MC/X86/x86_64-encoding.s
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=125795&r1=125794&r2=125795&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Thu Feb 17 17:36:39 2011
@@ -1293,6 +1293,9 @@
// 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]>;
Modified: llvm/trunk/test/MC/X86/x86-32-coverage.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-32-coverage.s?rev=125795&r1=125794&r2=125795&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-32-coverage.s (original)
+++ llvm/trunk/test/MC/X86/x86-32-coverage.s Thu Feb 17 17:36:39 2011
@@ -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
Modified: llvm/trunk/test/MC/X86/x86_64-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_64-encoding.s?rev=125795&r1=125794&r2=125795&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86_64-encoding.s (original)
+++ llvm/trunk/test/MC/X86/x86_64-encoding.s Thu Feb 17 17:36:39 2011
@@ -148,3 +148,10 @@
// CHECK: encoding: [0x48,0x0f,0xae,0x08]
fxrstorq (%rax)
+// CHECK: leave
+// CHECK: encoding: [0xc9]
+ leave
+
+// CHECK: leave
+// CHECK: encoding: [0xc9]
+ leaveq
More information about the llvm-commits
mailing list