diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-05-16 06:17:05 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-05-16 06:17:05 +0000 |
commit | c06b71a0da6d912ad8e529d4e419906ac0fe93ee (patch) | |
tree | e3633c0f8b2ace15f6b0c78b4c1bb836593a560c | |
parent | fixing Manifest (diff) | |
download | gentoo-2-c06b71a0da6d912ad8e529d4e419906ac0fe93ee.tar.gz gentoo-2-c06b71a0da6d912ad8e529d4e419906ac0fe93ee.tar.bz2 gentoo-2-c06b71a0da6d912ad8e529d4e419906ac0fe93ee.zip |
Add gcc-3.4 fix #48947 by Arve Knudsen
-rw-r--r-- | media-libs/libsdl/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/libsdl/files/1.2.7-gcc34.patch | 270 | ||||
-rw-r--r-- | media-libs/libsdl/libsdl-1.2.7-r1.ebuild | 3 |
3 files changed, 277 insertions, 2 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog index eedcc25a13d1..16544e160bb4 100644 --- a/media-libs/libsdl/ChangeLog +++ b/media-libs/libsdl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/libsdl # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.45 2004/04/18 21:50:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.46 2004/05/16 06:17:05 vapier Exp $ + + 16 May 2004; Mike Frysinger <vapier@gentoo.org> +files/1.2.7-gcc34.patch, + libsdl-1.2.7-r1.ebuild: + Add gcc-3.4 fix #48947 by Arve Knudsen *libsdl-1.2.7-r1 (18 Apr 2004) diff --git a/media-libs/libsdl/files/1.2.7-gcc34.patch b/media-libs/libsdl/files/1.2.7-gcc34.patch new file mode 100644 index 000000000000..d36a908aefad --- /dev/null +++ b/media-libs/libsdl/files/1.2.7-gcc34.patch @@ -0,0 +1,270 @@ +Index: src/audio/SDL_mixer_MMX.c +=================================================================== +RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/audio/SDL_mixer_MMX.c,v +retrieving revision 1.1 +diff -u -r1.1 SDL_mixer_MMX.c +--- src/audio/SDL_mixer_MMX.c 9 Nov 2002 06:13:28 -0000 1.1 ++++ src/audio/SDL_mixer_MMX.c 3 May 2004 19:51:58 -0000 +@@ -15,13 +15,11 @@ + { + __asm__ __volatile__ ( + +-" movl %0,%%edi\n" // edi = dst +-" movl %1,%%esi\n" // esi = src + " movl %3,%%eax\n" // eax = volume + +-" movl %2,%%ebx\n" // ebx = size ++" movl %2,%%edx\n" // edx = size + +-" shrl $4,%%ebx\n" // process 16 bytes per iteration = 8 samples ++" shrl $4,%%edx\n" // process 16 bytes per iteration = 8 samples + + " jz .endS16\n" + +@@ -39,14 +37,14 @@ + ".align 16\n" + " .mixloopS16:\n" + +-" movq (%%esi),%%mm1\n" // mm1 = a|b|c|d ++" movq (%1),%%mm1\n" // mm1 = a|b|c|d + + " movq %%mm1,%%mm2\n" // mm2 = a|b|c|d + +-" movq 8(%%esi),%%mm4\n" // mm4 = e|f|g|h ++" movq 8(%1),%%mm4\n" // mm4 = e|f|g|h + + // pré charger le buffer dst dans mm7 +-" movq (%%edi),%%mm7\n" // mm7 = dst[0]" ++" movq (%0),%%mm7\n" // mm7 = dst[0]" + + // multiplier par le volume + " pmullw %%mm0,%%mm1\n" // mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) +@@ -69,11 +67,11 @@ + " punpcklwd %%mm5,%%mm6\n" // mm6 = g*v|h*v + + // pré charger le buffer dst dans mm5 +-" movq 8(%%edi),%%mm5\n" // mm5 = dst[1] ++" movq 8(%0),%%mm5\n" // mm5 = dst[1] + + // diviser par 128 + " psrad $7,%%mm1\n" // mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME +-" addl $16,%%esi\n" ++" add $16,%1\n" + + " psrad $7,%%mm3\n" // mm3 = c*v/128|d*v/128 + +@@ -87,15 +85,15 @@ + + // mm4 = le sample avec le volume modifié + " packssdw %%mm4,%%mm6\n" // mm6 = s(e*v|f*v|g*v|h*v) +-" movq %%mm3,(%%edi)\n" ++" movq %%mm3,(%0)\n" + + " paddsw %%mm5,%%mm6\n" // mm6 = adjust_volume(src)+dst + +-" movq %%mm6,8(%%edi)\n" ++" movq %%mm6,8(%0)\n" + +-" addl $16,%%edi\n" ++" add $16,%0\n" + +-" dec %%ebx\n" ++" dec %%edx\n" + + " jnz .mixloopS16\n" + +@@ -103,9 +101,9 @@ + + ".endS16:\n" + : +- : "m" (dst), "m"(src),"m"(size), ++ : "r" (dst), "r"(src),"m"(size), + "m"(volume) +- : "eax","ebx", "esi", "edi","memory" ++ : "eax","edx","memory" + ); + } + +@@ -119,11 +117,9 @@ + { + __asm__ __volatile__ ( + +-" movl %0,%%edi\n" // edi = dst +-" movl %1,%%esi\n" // esi = src + " movl %3,%%eax\n" // eax = volume + +-" movd %%ebx,%%mm0\n" ++" movd %%edx,%%mm0\n" + " movq %%mm0,%%mm1\n" + " psllq $16,%%mm0\n" + " por %%mm1,%%mm0\n" +@@ -132,17 +128,17 @@ + " psllq $16,%%mm0\n" + " por %%mm1,%%mm0\n" + +-" movl %2,%%ebx\n" // ebx = size +-" shr $3,%%ebx\n" // process 8 bytes per iteration = 8 samples ++" movl %2,%%edx\n" // edx = size ++" shr $3,%%edx\n" // process 8 bytes per iteration = 8 samples + +-" cmp $0,%%ebx\n" ++" cmp $0,%%edx\n" + " je .endS8\n" + + ".align 16\n" + " .mixloopS8:\n" + + " pxor %%mm2,%%mm2\n" // mm2 = 0 +-" movq (%%esi),%%mm1\n" // mm1 = a|b|c|d|e|f|g|h ++" movq (%1),%%mm1\n" // mm1 = a|b|c|d|e|f|g|h + + " movq %%mm1,%%mm3\n" // mm3 = a|b|c|d|e|f|g|h + +@@ -152,10 +148,10 @@ + " punpckhbw %%mm2,%%mm1\n" // mm1 = 0|a|0|b|0|c|0|d + + " punpcklbw %%mm2,%%mm3\n" // mm3 = 0|e|0|f|0|g|0|h +-" movq (%%edi),%%mm2\n" // mm2 = destination ++" movq (%0),%%mm2\n" // mm2 = destination + + " pmullw %%mm0,%%mm1\n" // mm1 = v*a|v*b|v*c|v*d +-" addl $8,%%esi\n" ++" add $8,%1\n" + + " pmullw %%mm0,%%mm3\n" // mm3 = v*e|v*f|v*g|v*h + " psraw $7,%%mm1\n" // mm1 = v*a/128|v*b/128|v*c/128|v*d/128 +@@ -166,19 +162,19 @@ + + " paddsb %%mm2,%%mm3\n" // add to destination buffer + +-" movq %%mm3,(%%edi)\n" // store back to ram +-" addl $8,%%edi\n" ++" movq %%mm3,(%0)\n" // store back to ram ++" add $8,%0\n" + +-" dec %%ebx\n" ++" dec %%edx\n" + + " jnz .mixloopS8\n" + + ".endS8:\n" + " emms\n" + : +- : "m" (dst), "m"(src),"m"(size), ++ : "r" (dst), "r"(src),"m"(size), + "m"(volume) +- : "eax","ebx", "esi", "edi","memory" ++ : "eax","edx","memory" + ); + } + #endif +Index: src/cpuinfo/SDL_cpuinfo.c +=================================================================== +RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/cpuinfo/SDL_cpuinfo.c,v +retrieving revision 1.15 +diff -u -r1.15 SDL_cpuinfo.c +--- src/cpuinfo/SDL_cpuinfo.c 11 Apr 2004 19:49:34 -0000 1.15 ++++ src/cpuinfo/SDL_cpuinfo.c 3 May 2004 19:52:08 -0000 +@@ -118,7 +118,7 @@ + " movl %%edi,%%ebx\n" + : "=m" (features) + : +- : "%eax", "%ebx", "%ecx", "%edx", "%edi" ++ : "%eax", "%ecx", "%edx", "%edi" + ); + #elif defined(_MSC_VER) + __asm { +@@ -153,7 +153,7 @@ + " movl %%edi,%%ebx\n" + : "=m" (features) + : +- : "%eax", "%ebx", "%ecx", "%edx", "%edi" ++ : "%eax", "%ecx", "%edx", "%edi" + ); + #elif defined(_MSC_VER) + __asm { +Index: src/video/SDL_yuv_mmx.c +=================================================================== +RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_yuv_mmx.c,v +retrieving revision 1.5 +diff -u -r1.5 SDL_yuv_mmx.c +--- src/video/SDL_yuv_mmx.c 4 Jan 2004 16:49:22 -0000 1.5 ++++ src/video/SDL_yuv_mmx.c 3 May 2004 19:52:24 -0000 +@@ -120,12 +120,12 @@ + "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 + "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 + "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 +- "psubw _MMX_0080w,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 ++ "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 + + // create Cr_g (result in mm0) + "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 +- "pmullw _MMX_VgrnRGB,%%mm0\n"// red*-46dec=0.7136*64 +- "pmullw _MMX_VredRGB,%%mm1\n"// red*89dec=1.4013*64 ++ "pmullw %[_MMX_VgrnRGB],%%mm0\n"// red*-46dec=0.7136*64 ++ "pmullw %[_MMX_VredRGB],%%mm1\n"// red*89dec=1.4013*64 + "psraw $6, %%mm0\n" // red=red/64 + "psraw $6, %%mm1\n" // red=red/64 + +@@ -134,8 +134,8 @@ + "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 + "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 + "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 +- "pand _MMX_FF00w,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 +- "pand _MMX_00FFw,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 ++ "pand %[_MMX_FF00w],%%mm2\n" // L3 0 L1 0 l3 0 l1 0 ++ "pand %[_MMX_00FFw],%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 + "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 + + // create R (result in mm6) +@@ -152,11 +152,11 @@ + "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 + "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 + "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 +- "psubw _MMX_0080w,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 ++ "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 + // create Cb_g (result in mm5) + "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 +- "pmullw _MMX_UgrnRGB,%%mm5\n" // blue*-109dec=1.7129*64 +- "pmullw _MMX_UbluRGB,%%mm1\n" // blue*114dec=1.78125*64 ++ "pmullw %[_MMX_UgrnRGB],%%mm5\n" // blue*-109dec=1.7129*64 ++ "pmullw %[_MMX_UbluRGB],%%mm1\n" // blue*114dec=1.78125*64 + "psraw $6, %%mm5\n" // blue=red/64 + "psraw $6, %%mm1\n" // blue=blue/64 + +@@ -238,8 +238,14 @@ + "popl %%ebx\n" + : + : "m" (cr), "r"(cb),"r"(lum), +- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) +- : "%ebx" ++ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), ++ [_MMX_0080w] "m" (*_MMX_0080w), ++ [_MMX_00FFw] "m" (*_MMX_00FFw), ++ [_MMX_FF00w] "m" (*_MMX_FF00w), ++ [_MMX_VgrnRGB] "m" (*_MMX_VgrnRGB), ++ [_MMX_VredRGB] "m" (*_MMX_VredRGB), ++ [_MMX_UgrnRGB] "m" (*_MMX_UgrnRGB), ++ [_MMX_UbluRGB] "m" (*_MMX_UbluRGB) + ); + } + +@@ -413,8 +419,16 @@ + "popl %%ebx\n" + : + :"m" (cr), "r"(cb),"r"(lum), +- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) +- : "%ebx" ++ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), ++ [_MMX_0080w] "m" (*_MMX_0080w), ++ [_MMX_Ugrn565] "m" (*_MMX_Ugrn565), ++ [_MMX_Ublu5x5] "m" (*_MMX_Ublu5x5), ++ [_MMX_00FFw] "m" (*_MMX_00FFw), ++ [_MMX_Vgrn565] "m" (*_MMX_Vgrn565), ++ [_MMX_Vred5x5] "m" (*_MMX_Vred5x5), ++ [_MMX_Ycoeff] "m" (*_MMX_Ycoeff), ++ [_MMX_red565] "m" (*_MMX_red565), ++ [_MMX_grn565] "m" (*_MMX_grn565) + ); + } + diff --git a/media-libs/libsdl/libsdl-1.2.7-r1.ebuild b/media-libs/libsdl/libsdl-1.2.7-r1.ebuild index 654b0213acfe..1f405e911b71 100644 --- a/media-libs/libsdl/libsdl-1.2.7-r1.ebuild +++ b/media-libs/libsdl/libsdl-1.2.7-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.7-r1.ebuild,v 1.1 2004/04/18 21:50:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.7-r1.ebuild,v 1.2 2004/05/16 06:17:05 vapier Exp $ inherit fixheadtails eutils @@ -37,6 +37,7 @@ src_unpack() { epatch ${FILESDIR}/${PV}-nobuggy-X.patch #30089 epatch ${FILESDIR}/${PV}-libcaca.patch #40224 + epatch ${FILESDIR}/${PV}-gcc34.patch #48947 ht_fix_file configure.in |