1 diff -uNr SDL-1.2.7.orig/src/audio/SDL_mixer_MMX.c SDL-1.2.7/src/audio/SDL_mixer_MMX.c
2 --- SDL-1.2.7.orig/src/audio/SDL_mixer_MMX.c 2002-11-09 07:13:28.000000000 +0100
3 +++ SDL-1.2.7/src/audio/SDL_mixer_MMX.c 2004-03-08 19:07:00.538098528 +0100
5 void SDL_MixAudio_MMX_S16(char* dst,char* src,unsigned int size,int volume)
12 " movl %0,%%edi\n" // edi = dst
13 " movl %1,%%esi\n" // esi = src
14 " movl %3,%%eax\n" // eax = volume
23 : "m" (dst), "m"(src),"m"(size),
25 - : "eax","ebx", "esi", "edi","memory"
26 + : "eax", "esi", "edi", "memory"
34 void SDL_MixAudio_MMX_S8(char* dst,char* src,unsigned int size,int volume)
36 __asm__ __volatile__ (
41 " movl %0,%%edi\n" // edi = dst
42 " movl %1,%%esi\n" // esi = src
43 " movl %3,%%eax\n" // eax = volume
52 : "m" (dst), "m"(src),"m"(size),
54 - : "eax","ebx", "esi", "edi","memory"
55 + : "eax", "esi", "edi", "memory"
62 diff -uNr SDL-1.2.7.orig/src/cpuinfo/SDL_cpuinfo.c SDL-1.2.7/src/cpuinfo/SDL_cpuinfo.c
63 --- SDL-1.2.7.orig/src/cpuinfo/SDL_cpuinfo.c 2004-02-10 16:31:35.000000000 +0100
64 +++ SDL-1.2.7/src/cpuinfo/SDL_cpuinfo.c 2004-03-08 19:07:00.540098224 +0100
67 #if defined(__GNUC__) && defined(i386)
73 " xorl %%eax,%%eax # Set up for CPUID instruction \n"
74 " cpuid # Get and save vendor ID \n"
84 - : "%eax", "%ebx", "%ecx", "%edx", "%edi"
85 + : "%eax", "%ecx", "%edx", "%edi"
90 #elif defined(_MSC_VER)
94 #if defined(__GNUC__) && defined(i386)
100 " movl $0x80000000,%%eax # Query for extended functions \n"
101 " cpuid # Get extended function limit \n"
105 " movl %%edi,%%ebx\n"
111 - : "%eax", "%ebx", "%ecx", "%edx", "%edi"
112 + : "%eax", "%ecx", "%edx", "%edi"
117 #elif defined(_MSC_VER)
119 diff -uNr SDL-1.2.7.orig/src/video/SDL_yuv_mmx.c SDL-1.2.7/src/video/SDL_yuv_mmx.c
120 --- SDL-1.2.7.orig/src/video/SDL_yuv_mmx.c 2004-02-18 18:22:04.000000000 +0100
121 +++ SDL-1.2.7/src/video/SDL_yuv_mmx.c 2004-03-08 19:05:31.000000000 +0100
126 -static unsigned int ASM_VAR(MMX_0080w)[] = {0x00800080, 0x00800080};
127 -static unsigned int ASM_VAR(MMX_00FFw)[] = {0x00ff00ff, 0x00ff00ff};
128 -static unsigned int ASM_VAR(MMX_FF00w)[] = {0xff00ff00, 0xff00ff00};
130 -static unsigned short ASM_VAR(MMX_Ycoeff)[] = {0x004a, 0x004a, 0x004a, 0x004a};
132 -static unsigned short ASM_VAR(MMX_UbluRGB)[] = {0x0072, 0x0072, 0x0072, 0x0072};
133 -static unsigned short ASM_VAR(MMX_VredRGB)[] = {0x0059, 0x0059, 0x0059, 0x0059};
134 -static unsigned short ASM_VAR(MMX_UgrnRGB)[] = {0xffea, 0xffea, 0xffea, 0xffea};
135 -static unsigned short ASM_VAR(MMX_VgrnRGB)[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2};
137 -static unsigned short ASM_VAR(MMX_Ublu5x5)[] = {0x0081, 0x0081, 0x0081, 0x0081};
138 -static unsigned short ASM_VAR(MMX_Vred5x5)[] = {0x0066, 0x0066, 0x0066, 0x0066};
139 -static unsigned short ASM_VAR(MMX_Ugrn555)[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7};
140 -static unsigned short ASM_VAR(MMX_Vgrn555)[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc};
141 -static unsigned short ASM_VAR(MMX_Ugrn565)[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8};
142 -static unsigned short ASM_VAR(MMX_Vgrn565)[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd};
144 -static unsigned short ASM_VAR(MMX_red555)[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00};
145 -static unsigned short ASM_VAR(MMX_red565)[] = {0xf800, 0xf800, 0xf800, 0xf800};
146 -static unsigned short ASM_VAR(MMX_grn555)[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0};
147 -static unsigned short ASM_VAR(MMX_grn565)[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0};
148 -static unsigned short ASM_VAR(MMX_blu5x5)[] = {0x001f, 0x001f, 0x001f, 0x001f};
149 +unsigned int ASM_VAR(MMX_0080w)[] = {0x00800080, 0x00800080};
150 +unsigned int ASM_VAR(MMX_00FFw)[] = {0x00ff00ff, 0x00ff00ff};
151 +unsigned int ASM_VAR(MMX_FF00w)[] = {0xff00ff00, 0xff00ff00};
153 +unsigned short ASM_VAR(MMX_Ycoeff)[] = {0x004a, 0x004a, 0x004a, 0x004a};
155 +unsigned short ASM_VAR(MMX_UbluRGB)[] = {0x0072, 0x0072, 0x0072, 0x0072};
156 +unsigned short ASM_VAR(MMX_VredRGB)[] = {0x0059, 0x0059, 0x0059, 0x0059};
157 +unsigned short ASM_VAR(MMX_UgrnRGB)[] = {0xffea, 0xffea, 0xffea, 0xffea};
158 +unsigned short ASM_VAR(MMX_VgrnRGB)[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2};
160 +unsigned short ASM_VAR(MMX_Ublu5x5)[] = {0x0081, 0x0081, 0x0081, 0x0081};
161 +unsigned short ASM_VAR(MMX_Vred5x5)[] = {0x0066, 0x0066, 0x0066, 0x0066};
162 +unsigned short ASM_VAR(MMX_Ugrn555)[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7};
163 +unsigned short ASM_VAR(MMX_Vgrn555)[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc};
164 +unsigned short ASM_VAR(MMX_Ugrn565)[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8};
165 +unsigned short ASM_VAR(MMX_Vgrn565)[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd};
167 +unsigned short ASM_VAR(MMX_red555)[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00};
168 +unsigned short ASM_VAR(MMX_red565)[] = {0xf800, 0xf800, 0xf800, 0xf800};
169 +unsigned short ASM_VAR(MMX_grn555)[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0};
170 +unsigned short ASM_VAR(MMX_grn565)[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0};
171 +unsigned short ASM_VAR(MMX_blu5x5)[] = {0x001f, 0x001f, 0x001f, 0x001f};
174 This MMX assembler is my first assembler/MMX program ever.
176 relative addressing for the static tables, so right now we take the
177 COW hit on the pages this code resides. Big deal.
178 This spill is just to reduce register pressure in the PIC case. */
185 @@ -235,11 +237,15 @@
193 : "m" (cr), "r"(cb),"r"(lum),
194 "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)
204 __asm__ __volatile__(
211 @@ -410,11 +418,15 @@
219 :"m" (cr), "r"(cb),"r"(lum),
220 "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)