summaryrefslogtreecommitdiff
path: root/devel/directfb/files/patch-src-misc-memcpy.c
blob: 981ca772541391ad8cdbc05ccad838c370ed4715 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- src/misc/memcpy.c.orig	2007-11-02 12:33:04.000000000 +0100
+++ src/misc/memcpy.c	2007-11-02 12:35:27.000000000 +0100
@@ -226,8 +226,8 @@
                                     "movq %%mm6, 48(%1)\n"
                                     "movq %%mm7, 56(%1)\n"
                                     :: "r" (from), "r" (to) : "memory");
-               ((const unsigned char *)from)+=64;
-               ((unsigned char *)to)+=64;
+               from = (const unsigned char *)from + 64;
+               to = (unsigned char *)to + 64;
           }
           __asm__ __volatile__ ("emms":::"memory");
      }
@@ -288,8 +288,8 @@
                                     "movntq %%mm6, 48(%1)\n"
                                     "movntq %%mm7, 56(%1)\n"
                                     :: "r" (from), "r" (to) : "memory");
-               ((const unsigned char *)from)+=64;
-               ((unsigned char *)to)+=64;
+               from = (const unsigned char *)from + 64;
+               to = (unsigned char *)to + 64;
           }
           /* since movntq is weakly-ordered, a "sfence"
           * is needed to become ordered again. */
@@ -346,8 +346,8 @@
                                          "movntps %%xmm2, 32(%1)\n"
                                          "movntps %%xmm3, 48(%1)\n"
                                          :: "r" (from), "r" (to) : "memory");
-                    ((const unsigned char *)from)+=64;
-                    ((unsigned char *)to)+=64;
+                    from = (const unsigned char *)from + 64;
+                    to = (unsigned char *)to + 64;
                }
           else
                /*
@@ -368,8 +368,8 @@
                                          "movntps %%xmm2, 32(%1)\n"
                                          "movntps %%xmm3, 48(%1)\n"
                                          :: "r" (from), "r" (to) : "memory");
-                    ((const unsigned char *)from)+=64;
-                    ((unsigned char *)to)+=64;
+                    from = (const unsigned char *)from + 64;
+                    to = (unsigned char *)to + 64;
                }
           /* since movntq is weakly-ordered, a "sfence"
            * is needed to become ordered again. */