From 96488cc92c74babc449785128efd5ca64f57d15b Mon Sep 17 00:00:00 2001 From: krion Date: Sun, 16 Jan 2005 18:37:05 +0000 Subject: Update to 1.2.8 --- devel/sdl12/Makefile | 11 +- devel/sdl12/distinfo | 4 +- .../files/extra-patch-src_audio_SDL__mixer__MMX.c | 155 ------------ .../files/extra-patch-src_cpuinfo_SDL__cpuinfo.c | 74 ------ .../files/extra-patch-src_video_SDL__yuv__mmx.c | 269 ++++++++++++++++----- devel/sdl12/files/patch-al | 10 - devel/sdl12/files/patch-include_SDL__endian.h | 14 ++ devel/sdl12/pkg-plist | 2 +- 8 files changed, 236 insertions(+), 303 deletions(-) delete mode 100644 devel/sdl12/files/extra-patch-src_audio_SDL__mixer__MMX.c delete mode 100644 devel/sdl12/files/extra-patch-src_cpuinfo_SDL__cpuinfo.c delete mode 100644 devel/sdl12/files/patch-al create mode 100644 devel/sdl12/files/patch-include_SDL__endian.h (limited to 'devel') diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile index e851e38..cc6c1dc 100644 --- a/devel/sdl12/Makefile +++ b/devel/sdl12/Makefile @@ -6,8 +6,7 @@ # PORTNAME= sdl -PORTVERSION= 1.2.7 -PORTREVISION= 3 +PORTVERSION= 1.2.8 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ @@ -21,7 +20,7 @@ BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm INSTALLS_SHLIB= yes USE_REINPLACE= yes -USE_INC_LIBTOOL_VER= 13 +USE_LIBTOOL_VER=15 WANT_GNOME= yes CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ @@ -44,10 +43,8 @@ OPTIONS= NAS "Include support for the Network Audio System" Off \ .include -.if ${OSVERSION} > 500000 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_audio_SDL__mixer__MMX.c \ - ${FILESDIR}/extra-patch-src_cpuinfo_SDL__cpuinfo.c \ - ${FILESDIR}/extra-patch-src_video_SDL__yuv__mmx.c +.if ${OSVERSION} < 500000 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_video_SDL__yuv__mmx.c .endif .if exists(/usr/lib/libvgl.so.3) diff --git a/devel/sdl12/distinfo b/devel/sdl12/distinfo index db7e423..8f4766f 100644 --- a/devel/sdl12/distinfo +++ b/devel/sdl12/distinfo @@ -1,2 +1,2 @@ -MD5 (SDL-1.2.7.tar.gz) = d29b34b6ba3ed213893fc9d8d35e357a -SIZE (SDL-1.2.7.tar.gz) = 2470936 +MD5 (SDL-1.2.8.tar.gz) = 37aaf9f069f9c2c18856022f35de9f8c +SIZE (SDL-1.2.8.tar.gz) = 2602449 diff --git a/devel/sdl12/files/extra-patch-src_audio_SDL__mixer__MMX.c b/devel/sdl12/files/extra-patch-src_audio_SDL__mixer__MMX.c deleted file mode 100644 index 1e4b3c3..0000000 --- a/devel/sdl12/files/extra-patch-src_audio_SDL__mixer__MMX.c +++ /dev/null @@ -1,155 +0,0 @@ ---- src/audio/SDL_mixer_MMX.c.orig Sat Nov 9 07:13:28 2002 -+++ src/audio/SDL_mixer_MMX.c Sun May 16 19:19:47 2004 -@@ -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 diff --git a/devel/sdl12/files/extra-patch-src_cpuinfo_SDL__cpuinfo.c b/devel/sdl12/files/extra-patch-src_cpuinfo_SDL__cpuinfo.c deleted file mode 100644 index 358af94..0000000 --- a/devel/sdl12/files/extra-patch-src_cpuinfo_SDL__cpuinfo.c +++ /dev/null @@ -1,74 +0,0 @@ ---- src/cpuinfo/SDL_cpuinfo.c.orig Tue Feb 10 16:31:35 2004 -+++ src/cpuinfo/SDL_cpuinfo.c Sun May 16 19:19:48 2004 -@@ -22,7 +22,7 @@ - - #ifdef SAVE_RCSID - static char rcsid = -- "@(#) $Id: SDL_cpuinfo.c,v 1.14 2004/02/10 15:31:35 slouken Exp $"; -+ "@(#) $Id: SDL_cpuinfo.c,v 1.16 2004/05/16 17:19:48 slouken Exp $"; - #endif - - /* CPU feature detection for SDL */ -@@ -81,6 +81,26 @@ - : - : "%eax", "%ecx" - ); -+#elif defined(__GNUC__) && defined(__x86_64__) -+/* Technically, if this is being compiled under __x86_64__ then it has -+CPUid by definition. But it's nice to be able to prove it. :) */ -+ __asm__ ( -+" pushfq # Get original EFLAGS \n" -+" popq %%rax \n" -+" movq %%rax,%%rcx \n" -+" xorl $0x200000,%%eax # Flip ID bit in EFLAGS \n" -+" pushq %%rax # Save new EFLAGS value on stack \n" -+" popfq # Replace current EFLAGS value \n" -+" pushfq # Get new EFLAGS \n" -+" popq %%rax # Store new EFLAGS in EAX \n" -+" xorl %%ecx,%%eax # Can not toggle ID bit, \n" -+" jz 1f # Processor=80486 \n" -+" movl $1,%0 # We have CPUID support \n" -+"1: \n" -+ : "=m" (has_CPUID) -+ : -+ : "%rax", "%rcx" -+ ); - #elif defined(_MSC_VER) - __asm { - pushfd ; Get original EFLAGS -@@ -103,7 +123,7 @@ - static __inline__ int CPU_getCPUIDFeatures() - { - int features = 0; --#if defined(__GNUC__) && defined(i386) -+#if defined(__GNUC__) && ( defined(i386) || defined(__x86_64__) ) - __asm__ ( - " movl %%ebx,%%edi\n" - " xorl %%eax,%%eax # Set up for CPUID instruction \n" -@@ -118,7 +138,7 @@ - " movl %%edi,%%ebx\n" - : "=m" (features) - : -- : "%eax", "%ebx", "%ecx", "%edx", "%edi" -+ : "%eax", "%ecx", "%edx", "%edi" - ); - #elif defined(_MSC_VER) - __asm { -@@ -139,7 +159,7 @@ - static __inline__ int CPU_getCPUIDFeaturesExt() - { - int features = 0; --#if defined(__GNUC__) && defined(i386) -+#if defined(__GNUC__) && (defined(i386) || defined (__x86_64__) ) - __asm__ ( - " movl %%ebx,%%edi\n" - " movl $0x80000000,%%eax # Query for extended functions \n" -@@ -153,7 +173,7 @@ - " movl %%edi,%%ebx\n" - : "=m" (features) - : -- : "%eax", "%ebx", "%ecx", "%edx", "%edi" -+ : "%eax", "%ecx", "%edx", "%edi" - ); - #elif defined(_MSC_VER) - __asm { diff --git a/devel/sdl12/files/extra-patch-src_video_SDL__yuv__mmx.c b/devel/sdl12/files/extra-patch-src_video_SDL__yuv__mmx.c index 8e993b5..eb11424 100644 --- a/devel/sdl12/files/extra-patch-src_video_SDL__yuv__mmx.c +++ b/devel/sdl12/files/extra-patch-src_video_SDL__yuv__mmx.c @@ -1,89 +1,250 @@ ---- src/video/SDL_yuv_mmx.c.orig Wed Feb 18 18:22:04 2004 -+++ src/video/SDL_yuv_mmx.c Sun May 16 19:19:48 2004 -@@ -22,7 +22,7 @@ + +$FreeBSD$ + +--- src/video/SDL_yuv_mmx.c.orig ++++ src/video/SDL_yuv_mmx.c +@@ -30,29 +30,35 @@ - #ifdef SAVE_RCSID - static char rcsid = -- "@(#) $Id: SDL_yuv_mmx.c,v 1.5 2004/01/04 16:49:22 slouken Exp $"; -+ "@(#) $Id: SDL_yuv_mmx.c,v 1.6 2004/05/16 17:19:48 slouken Exp $"; - #endif + #include "SDL_types.h" +-static unsigned int MMX_0080w[] = {0x00800080, 0x00800080}; +-static unsigned int MMX_00FFw[] = {0x00ff00ff, 0x00ff00ff}; +-static unsigned int MMX_FF00w[] = {0xff00ff00, 0xff00ff00}; ++#ifdef __ELF__ ++#define ASM_VAR(X) _##X ++#else ++#define ASM_VAR(X) X ++#endif -@@ -120,12 +120,12 @@ +-static unsigned short MMX_Ycoeff[] = {0x004a, 0x004a, 0x004a, 0x004a}; ++static unsigned int ASM_VAR(MMX_0080w)[] = {0x00800080, 0x00800080}; ++static unsigned int ASM_VAR(MMX_00FFw)[] = {0x00ff00ff, 0x00ff00ff}; ++static unsigned int ASM_VAR(MMX_FF00w)[] = {0xff00ff00, 0xff00ff00}; + +-static unsigned short MMX_UbluRGB[] = {0x0072, 0x0072, 0x0072, 0x0072}; +-static unsigned short MMX_VredRGB[] = {0x0059, 0x0059, 0x0059, 0x0059}; +-static unsigned short MMX_UgrnRGB[] = {0xffea, 0xffea, 0xffea, 0xffea}; +-static unsigned short MMX_VgrnRGB[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; ++static unsigned short ASM_VAR(MMX_Ycoeff)[] = {0x004a, 0x004a, 0x004a, 0x004a}; + +-static unsigned short MMX_Ublu5x5[] = {0x0081, 0x0081, 0x0081, 0x0081}; +-static unsigned short MMX_Vred5x5[] = {0x0066, 0x0066, 0x0066, 0x0066}; +-static unsigned short MMX_Ugrn555[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; +-static unsigned short MMX_Vgrn555[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; +-static unsigned short MMX_Ugrn565[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; +-static unsigned short MMX_Vgrn565[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; ++static unsigned short ASM_VAR(MMX_UbluRGB)[] = {0x0072, 0x0072, 0x0072, 0x0072}; ++static unsigned short ASM_VAR(MMX_VredRGB)[] = {0x0059, 0x0059, 0x0059, 0x0059}; ++static unsigned short ASM_VAR(MMX_UgrnRGB)[] = {0xffea, 0xffea, 0xffea, 0xffea}; ++static unsigned short ASM_VAR(MMX_VgrnRGB)[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; + +-static unsigned short MMX_red555[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; +-static unsigned short MMX_red565[] = {0xf800, 0xf800, 0xf800, 0xf800}; +-static unsigned short MMX_grn555[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; +-static unsigned short MMX_grn565[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; +-static unsigned short MMX_blu5x5[] = {0x001f, 0x001f, 0x001f, 0x001f}; ++static unsigned short ASM_VAR(MMX_Ublu5x5)[] = {0x0081, 0x0081, 0x0081, 0x0081}; ++static unsigned short ASM_VAR(MMX_Vred5x5)[] = {0x0066, 0x0066, 0x0066, 0x0066}; ++static unsigned short ASM_VAR(MMX_Ugrn555)[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; ++static unsigned short ASM_VAR(MMX_Vgrn555)[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; ++static unsigned short ASM_VAR(MMX_Ugrn565)[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; ++static unsigned short ASM_VAR(MMX_Vgrn565)[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; ++ ++static unsigned short ASM_VAR(MMX_red555)[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; ++static unsigned short ASM_VAR(MMX_red565)[] = {0xf800, 0xf800, 0xf800, 0xf800}; ++static unsigned short ASM_VAR(MMX_grn555)[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; ++static unsigned short ASM_VAR(MMX_grn565)[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; ++static unsigned short ASM_VAR(MMX_blu5x5)[] = {0x001f, 0x001f, 0x001f, 0x001f}; + + /** + This MMX assembler is my first assembler/MMX program ever. +@@ -114,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 +- "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 +- "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 @@ +@@ -128,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 +- "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 @@ +@@ -146,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 +- "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 +- "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 @@ +@@ -232,14 +238,8 @@ "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) +- "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) ++ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) ++ : "%ebx" ); } -@@ -413,8 +419,16 @@ +@@ -269,21 +269,21 @@ + "movd (%%ebx), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0 + "punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0 + "punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0 +- "psubw %[_MMX_0080w], %%mm0\n" +- "psubw %[_MMX_0080w], %%mm1\n" ++ "psubw _MMX_0080w, %%mm0\n" ++ "psubw _MMX_0080w, %%mm1\n" + "movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0 + "movq %%mm1, %%mm3\n" // Cr +- "pmullw %[_MMX_Ugrn565], %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 ++ "pmullw _MMX_Ugrn565, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 + "movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0 +- "pmullw %[_MMX_Ublu5x5], %%mm0\n" // Cb2blue +- "pand %[_MMX_00FFw], %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 +- "pmullw %[_MMX_Vgrn565], %%mm3\n" // Cr2green ++ "pmullw _MMX_Ublu5x5, %%mm0\n" // Cb2blue ++ "pand _MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 ++ "pmullw _MMX_Vgrn565, %%mm3\n" // Cr2green + "movq (%2), %%mm7\n" // L2 +- "pmullw %[_MMX_Vred5x5], %%mm1\n" // Cr2red ++ "pmullw _MMX_Vred5x5, %%mm1\n" // Cr2red + "psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1 +- "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum1 ++ "pmullw _MMX_Ycoeff, %%mm6\n" // lum1 + "paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green +- "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum2 ++ "pmullw _MMX_Ycoeff, %%mm7\n" // lum2 + + "movq %%mm6, %%mm4\n" // lum1 + "paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0 +@@ -301,11 +301,11 @@ + "punpcklbw %%mm4, %%mm4\n" + "punpcklbw %%mm5, %%mm5\n" + +- "pand %[_MMX_red565], %%mm4\n" ++ "pand _MMX_red565, %%mm4\n" + "psllw $3, %%mm5\n" // GREEN 1 + "punpcklbw %%mm6, %%mm6\n" +- "pand %[_MMX_grn565], %%mm5\n" +- "pand %[_MMX_red565], %%mm6\n" ++ "pand _MMX_grn565, %%mm5\n" ++ "pand _MMX_red565, %%mm6\n" + "por %%mm5, %%mm4\n" // + "psrlw $11, %%mm6\n" // BLUE 1 + "movq %%mm3, %%mm5\n" // lum2 +@@ -319,23 +319,23 @@ + "packuswb %%mm3, %%mm3\n" + "packuswb %%mm5, %%mm5\n" + "packuswb %%mm7, %%mm7\n" +- "pand %[_MMX_00FFw], %%mm6\n" // L3 ++ "pand _MMX_00FFw, %%mm6\n" // L3 + "punpcklbw %%mm3, %%mm3\n" + "punpcklbw %%mm5, %%mm5\n" +- "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum3 ++ "pmullw _MMX_Ycoeff, %%mm6\n" // lum3 + "punpcklbw %%mm7, %%mm7\n" + "psllw $3, %%mm5\n" // GREEN 2 +- "pand %[_MMX_red565], %%mm7\n" +- "pand %[_MMX_red565], %%mm3\n" ++ "pand _MMX_red565, %%mm7\n" ++ "pand _MMX_red565, %%mm3\n" + "psrlw $11, %%mm7\n" // BLUE 2 +- "pand %[_MMX_grn565], %%mm5\n" ++ "pand _MMX_grn565, %%mm5\n" + "por %%mm7, %%mm3\n" + "movq (%2,%4), %%mm7\n" // L4 load lum2 + "por %%mm5, %%mm3\n" // + "psrlw $8, %%mm7\n" // L4 + "movq %%mm4, %%mm5\n" + "punpcklwd %%mm3, %%mm4\n" +- "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum4 ++ "pmullw _MMX_Ycoeff, %%mm7\n" // lum4 + "punpckhwd %%mm3, %%mm5\n" + + "movq %%mm4, (%3)\n" // write row1 +@@ -362,11 +362,11 @@ + "punpcklbw %%mm5, %%mm5\n" + "punpcklbw %%mm6, %%mm6\n" + "psllw $3, %%mm5\n" // GREEN 3 +- "pand %[_MMX_red565], %%mm4\n" ++ "pand _MMX_red565, %%mm4\n" + "psraw $6, %%mm3\n" // psr 6 + "psraw $6, %%mm0\n" +- "pand %[_MMX_red565], %%mm6\n" // BLUE +- "pand %[_MMX_grn565], %%mm5\n" ++ "pand _MMX_red565, %%mm6\n" // BLUE ++ "pand _MMX_grn565, %%mm5\n" + "psrlw $11, %%mm6\n" // BLUE 3 + "por %%mm5, %%mm4\n" + "psraw $6, %%mm7\n" +@@ -377,11 +377,11 @@ + "punpcklbw %%mm3, %%mm3\n" + "punpcklbw %%mm0, %%mm0\n" + "punpcklbw %%mm7, %%mm7\n" +- "pand %[_MMX_red565], %%mm3\n" +- "pand %[_MMX_red565], %%mm7\n" // BLUE ++ "pand _MMX_red565, %%mm3\n" ++ "pand _MMX_red565, %%mm7\n" // BLUE + "psllw $3, %%mm0\n" // GREEN 4 + "psrlw $11, %%mm7\n" +- "pand %[_MMX_grn565], %%mm0\n" ++ "pand _MMX_grn565, %%mm0\n" + "por %%mm7, %%mm3\n" + "por %%mm0, %%mm3\n" + +@@ -411,19 +411,11 @@ + "jl 1b\n" + "emms\n" "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) - ); +- : +- :"m" (cr), "r"(cb),"r"(lum), +- "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) +- ); ++ : ++ :"m" (cr), "r"(cb),"r"(lum), ++ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) ++ : "%ebx" ++ ); } + #endif /* GCC i386 inline assembly */ diff --git a/devel/sdl12/files/patch-al b/devel/sdl12/files/patch-al deleted file mode 100644 index c9e196b..0000000 --- a/devel/sdl12/files/patch-al +++ /dev/null @@ -1,10 +0,0 @@ ---- src/joystick/bsd/SDL_sysjoystick.c Wed Feb 18 09:22:01 2004 -+++ src/joystick/bsd/SDL_sysjoystick.c Sun Oct 31 06:55:00 2004 -@@ -160,6 +160,7 @@ - SDL_numjoysticks++; - } else { - free(joynames[nj.index]); -+ joynames[nj.index] = NULL; - } - } - for (i = 0; i < MAX_JOY_JOYS; i++) { diff --git a/devel/sdl12/files/patch-include_SDL__endian.h b/devel/sdl12/files/patch-include_SDL__endian.h new file mode 100644 index 0000000..17e22b6 --- /dev/null +++ b/devel/sdl12/files/patch-include_SDL__endian.h @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- include/SDL_endian.h.orig ++++ include/SDL_endian.h +@@ -68,7 +68,7 @@ + #elif defined(__GNUC__) && defined(__x86_64__) + static __inline__ Uint16 SDL_Swap16(Uint16 x) + { +- __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x)); ++ __asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x)); + return x; + } + #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) diff --git a/devel/sdl12/pkg-plist b/devel/sdl12/pkg-plist index d561035..ea55292 100644 --- a/devel/sdl12/pkg-plist +++ b/devel/sdl12/pkg-plist @@ -30,7 +30,6 @@ include/SDL11/SDL_video.h include/SDL11/begin_code.h include/SDL11/close_code.h lib/libSDL-1.1.a -lib/libSDL-1.1.la lib/libSDL-1.1.so lib/libSDL-1.1.so.7 lib/libSDLmain-1.1.a @@ -63,6 +62,7 @@ share/aclocal/sdl11.m4 %%EXAMPLESDIR%%/testcdrom.c %%EXAMPLESDIR%%/testcpuinfo.c %%EXAMPLESDIR%%/testdyngl.c +%%EXAMPLESDIR%%/testendian.c %%EXAMPLESDIR%%/testerror.c %%EXAMPLESDIR%%/testgamma.c %%EXAMPLESDIR%%/testgl.c -- cgit v1.1