]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/libxine/files/cpu-1.0.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / libxine / files / cpu-1.0.patch
1 --- xine-lib-1-rc6a/src/post/goom/xmmx.c.orig   2004-09-16 21:53:34.040049792 -0400
2 +++ xine-lib-1-rc6a/src/post/goom/xmmx.c        2004-09-16 21:59:24.407785800 -0400
3 @@ -112,23 +112,23 @@
4                  * post : mm3 & mm4 : coefs for this position
5                  *              mm1 : X vector [0|X]
6                  *
7 -                * modif : eax,ebx
8 +                * modif : eax,ecx
9                  */
10                 __asm__ __volatile__ (
11 -                       "movd %%mm0,%%ebx\n"
12 +                       "movd %%mm0,%%ecx\n"
13                         "movq %%mm0,%%mm1\n"
14  
15 -                       "andl $15,%%ebx\n"
16 +                       "andl $15,%%ecx\n"
17                         "psrlq $32,%%mm1\n"
18  
19 -                       "shll $6,%%ebx\n"
20 +                       "shll $6,%%ecx\n"
21                         "movd %%mm1,%%eax\n"
22  
23 -                       "addl %0,%%ebx\n"
24 +                       "addl %0,%%ecx\n"
25                         "andl $15,%%eax\n"
26  
27 -                       "movd (%%ebx,%%eax,4),%%mm3\n"
28 -                       ::"g"(precalCoef):"eax","ebx");
29 +                       "movd (%%ecx,%%eax,4),%%mm3\n"
30 +                       ::"g"(precalCoef):"eax","ecx");
31  
32                 /*
33                  * extraction des coefficients...
34 @@ -158,7 +158,7 @@
35                  * post : mm0 : expix1[position]
36                  *        mm2 : expix1[position+largeur]
37                  *
38 -                * modif : eax,ebx
39 +                * modif : eax,ecx
40                  */
41                 psrld_i2r (PERTEDEC,mm0);
42                 psrld_i2r (PERTEDEC,mm1);
43 @@ -167,23 +167,23 @@
44                         /*^*/ "movq %%mm3,%%mm5\n"       /*^*/
45  
46                         "mull %1\n"
47 -                       "movd %%mm0,%%ebx\n"
48 +                       "movd %%mm0,%%ecx\n"
49                         /*^*/ "punpcklbw %%mm5, %%mm3\n" /*^*/
50  
51 -                       "addl %%ebx,%%eax\n"
52 +                       "addl %%ecx,%%eax\n"
53                         /*^*/ "movq %%mm3,%%mm4\n"       /*^*/
54                         /*^*/ "movq %%mm3,%%mm5\n"       /*^*/
55  
56 -                       "movl %0,%%ebx\n"
57 +                       "movl %0,%%ecx\n"
58                         /*^*/ "punpcklbw %%mm5,%%mm3\n"  /*^*/
59  
60 -                       "movq (%%ebx,%%eax,4),%%mm0\n"
61 +                       "movq (%%ecx,%%eax,4),%%mm0\n"
62                         /*^*/ "punpckhbw %%mm5,%%mm4\n"  /*^*/
63  
64                         "addl %1,%%eax\n"
65 -                       "movq (%%ebx,%%eax,4),%%mm2\n"
66 +                       "movq (%%ecx,%%eax,4),%%mm2\n"
67  
68 -                       : : "X"(expix1), "X"(prevX):"eax","ebx"
69 +                       : : "X"(expix1), "X"(prevX):"eax","ecx"
70                 );
71  
72                 /*
73 --- xine-lib-1-rc7/src/post/goom/mmx.h  2004-09-12 05:17:26.000000000 -0700
74 +++ xine-lib-1-rc7.new/src/post/goom/mmx.h      2004-11-09 16:08:17.777667856 -0700
75 @@ -71,13 +71,15 @@
76         */
77         register int rval = 0;
78  
79 +       /* Maybe if I yell it will help:  DON'T CLOBBER EBX! */
80 +
81         __asm__ __volatile__ (
82                 /* See if CPUID instruction is supported ... */
83                 /* ... Get copies of EFLAGS into eax and ecx */
84                 "pushf\n\t"
85                 "popl %%eax\n\t"
86                 "movl %%eax, %%ecx\n\t"
87 -
88 +       
89                 /* ... Toggle the ID bit in one copy and store */
90                 /*     to the EFLAGS reg */
91                 "xorl $0x200000, %%eax\n\t"
92 @@ -97,6 +99,8 @@
93                 /* Get standard CPUID information, and
94                        go to a specific vendor section */
95                 "movl $0, %%eax\n\t"
96 +
97 +               "pushl %%ebx\n\t"
98                 "cpuid\n\t"
99  
100                 /* Check for Intel */
101 @@ -214,9 +218,10 @@
102                 "movl $0, %0\n\n\t"
103  
104                 "Return:\n\t"
105 +               "popl %%ebx\n\t"
106                 : "=X" (rval)
107                 : /* no input */
108 -               : "eax", "ebx", "ecx", "edx"
109 +               : "eax", "ecx", "edx"
110         );
111  
112         /* Return */