[PATCH] D15148: Add support for loopz, loopnz for Intel syntax

Marina Yatsina via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 05:37:06 PST 2015


myatsina created this revision.
myatsina added reviewers: rnk, mcrosier.
myatsina added a subscriber: llvm-commits.
myatsina set the repository for this revision to rL LLVM.

According to x86 spec, loopz and loopnz should be supported for Intel syntax, where loopz is equivalent to loope and loopnz is equivalent to loopne


Repository:
  rL LLVM

http://reviews.llvm.org/D15148

Files:
  lib/Target/X86/X86InstrInfo.td
  test/MC/X86/intel-syntax.s

Index: lib/Target/X86/X86InstrInfo.td
===================================================================
--- lib/Target/X86/X86InstrInfo.td
+++ lib/Target/X86/X86InstrInfo.td
@@ -2569,8 +2569,8 @@
 def : MnemonicAlias<"leavel", "leave", "att">, Requires<[Not64BitMode]>;
 def : MnemonicAlias<"leaveq", "leave", "att">, Requires<[In64BitMode]>;
 
-def : MnemonicAlias<"loopz",  "loope",  "att">;
-def : MnemonicAlias<"loopnz", "loopne", "att">;
+def : MnemonicAlias<"loopz",  "loope">;
+def : MnemonicAlias<"loopnz", "loopne">;
 
 def : MnemonicAlias<"pop",   "popw",  "att">, Requires<[In16BitMode]>;
 def : MnemonicAlias<"pop",   "popl",  "att">, Requires<[In32BitMode]>;
Index: test/MC/X86/intel-syntax.s
===================================================================
--- test/MC/X86/intel-syntax.s
+++ test/MC/X86/intel-syntax.s
@@ -736,3 +736,9 @@
 fbstp tbyte ptr [eax]
 // CHECK: fbld (%eax)
 // CHECK: fbstp (%eax)
+
+loopz _foo
+loopnz _foo
+// CHECK: loope _foo
+// CHECK: loopne _foo
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15148.41615.patch
Type: text/x-patch
Size: 1002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/859bcc36/attachment.bin>


More information about the llvm-commits mailing list