accept lret as an alias for lretl, fixing the reopened part of PR8592
authorChris Lattner <sabre@nondot.org>
Fri, 12 Nov 2010 18:54:56 +0000 (18:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Nov 2010 18:54:56 +0000 (18:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118916 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrControl.td
lib/Target/X86/X86InstrInfo.td
test/MC/X86/x86-64.s

index 5f1f2dfef10d7f20abb04ee6fe9dc2602929dce4..ee20ebca06b293447057caa0e385252a985426c4 100644 (file)
@@ -27,8 +27,8 @@ let isTerminator = 1, isReturn = 1, isBarrier = 1,
   def RETIW  : Ii16<0xC2, RawFrm, (outs), (ins i16imm:$amt, variable_ops),
                     "retw\t$amt",
                     [(X86retflag timm:$amt)]>, OpSize;
-  def LRET   : I   <0xCB, RawFrm, (outs), (ins),
-                    "lret", []>;
+  def LRETL  : I   <0xCB, RawFrm, (outs), (ins),
+                    "lretl", []>;
   def LRETQ  : RI  <0xCB, RawFrm, (outs), (ins),
                     "lretq", []>;
   def LRETI  : Ii16<0xCA, RawFrm, (outs), (ins i16imm:$amt),
index 148264d4dcd34c6c9c53a2be174fae325fdca3cf..0a60eb7b9179105b71eb7405d86f5afd58ed2e1d 100644 (file)
@@ -1264,6 +1264,9 @@ def : MnemonicAlias<"cdq", "cltd">;
 def : MnemonicAlias<"cwde", "cwtl">;
 def : MnemonicAlias<"cdqe", "cltq">;
 
+// lret maps to lretl, it is not ambiguous with lretq.
+def : MnemonicAlias<"lret", "lretl">;
+
 def : MnemonicAlias<"pop", "popl">, Requires<[In32BitMode]>;
 def : MnemonicAlias<"pop", "popq">, Requires<[In64BitMode]>;
 def : MnemonicAlias<"popf", "popfl">, Requires<[In32BitMode]>;
index 66074f021165b58d522bf97ec69ea8e52f3f3518..b8b093c19b86e502b1cf42cf6d0f816186f51a4d 100644 (file)
@@ -771,7 +771,8 @@ iretq
 
 // PR8592
 lretq  // CHECK: lretq # encoding: [0x48,0xcb]
-lret   // CHECK: lret  # encoding: [0xcb]
+lretl  // CHECK: lretl # encoding: [0xcb]
+lret   // CHECK: lretl # encoding: [0xcb]
 
 // rdar://8403907
 sysret