shithub: mc

Download patch

ref: 4a7d019d03fa6c267d27ffb9d90e2472bad4bcbf
parent: 4ea133ddac02791432ad26864fbdad4f1d49120f
author: Ori Bernstein <[email protected]>
date: Wed Dec 11 18:44:45 EST 2013

Just use 'movs' for all blits. It's faster anwyays.

--- a/6/isel.c
+++ b/6/isel.c
@@ -353,22 +353,8 @@
 
 static void blit(Isel *s, Loc *to, Loc *from, size_t dstoff, size_t srcoff, size_t sz)
 {
-    AsmOp op;
     Loc *sp, *dp, *len; /* pointers to src, dst */
 
-    if (sz % 8 == 0) {
-        sz /= 8;
-        op = Irepmovsq;
-    } else if (sz % 4 == 0) {
-        sz /= 4;
-        op = Irepmovsl;
-    } else if (sz % 2 == 0) {
-        sz /= 2;
-        op = Irepmovsw;
-    } else {
-        op = Irepmovsb;
-    }
-
     len = loclit(sz, ModeQ);
     sp = inr(s, from);
     dp = inr(s, to);
@@ -385,7 +371,7 @@
         g(s, Ilea, locmem(dstoff, dp, NULL, ModeQ), locphysreg(Rrdi), NULL);
     else
         g(s, Imov, dp, locphysreg(Rrdi), NULL);
-    g(s, op, NULL);
+    g(s, Irepmovsb, NULL);
 }
 
 static Loc *gencall(Isel *s, Node *n)