[PATCH] D11794: Fix REPE, REPZ, REPNZ for intel syntax

Marina Yatsina via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 01:27:09 PDT 2015


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

Fix REPE, REPZ, REPNZ for intel syntax

Repository:
  rL LLVM

http://reviews.llvm.org/D11794

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
@@ -2540,9 +2540,9 @@
 def : MnemonicAlias<"popa",   "popal",  "att">, Requires<[In32BitMode]>;
 def : MnemonicAlias<"pusha",  "pushal", "att">, Requires<[In32BitMode]>;
 
-def : MnemonicAlias<"repe",  "rep",   "att">;
-def : MnemonicAlias<"repz",  "rep",   "att">;
-def : MnemonicAlias<"repnz", "repne", "att">;
+def : MnemonicAlias<"repe",  "rep">;
+def : MnemonicAlias<"repz",  "rep">;
+def : MnemonicAlias<"repnz", "repne">;
 
 def : MnemonicAlias<"ret", "retw", "att">, Requires<[In16BitMode]>;
 def : MnemonicAlias<"ret", "retl", "att">, Requires<[In32BitMode]>;
Index: test/MC/X86/intel-syntax.s
===================================================================
--- test/MC/X86/intel-syntax.s
+++ test/MC/X86/intel-syntax.s
@@ -681,3 +681,19 @@
 // CHECK: outsb (%rsi), %dx
 // CHECK: outsw (%rsi), %dx
 // CHECK: outsl (%rsi), %dx
+
+rep cmpsb
+repe cmpsb
+repz cmpsb
+repne cmpsb
+repnz cmpsb
+//CHECK: rep
+//CHECK: cmpsb	%es:(%rdi), (%rsi)
+//CHECK: rep
+//CHECK: cmpsb	%es:(%rdi), (%rsi)
+//CHECK: rep
+//CHECK: cmpsb	%es:(%rdi), (%rsi)
+//CHECK: repne
+//CHECK: cmpsb	%es:(%rdi), (%rsi)
+//CHECK: repne
+//CHECK: cmpsb	%es:(%rdi), (%rsi)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11794.31355.patch
Type: text/x-patch
Size: 1360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150806/5edf1ccc/attachment.bin>


More information about the llvm-commits mailing list