[MPlayer-cvslog] CVS: main/libmpeg2 cpu_accel.c, 1.7, 1.8 cpu_state.c, 1.7, 1.8 idct_altivec.c, 1.3, 1.4

Nicolas Plourde CVS syncmail at mplayerhq.hu
Sun May 15 22:11:36 CEST 2005


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libmpeg2
In directory mail:/var2/tmp/cvs-serv7248/libmpeg2

Modified Files:
	cpu_accel.c cpu_state.c idct_altivec.c 
Log Message:
set define for apple gcc altivec

Index: cpu_accel.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/cpu_accel.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cpu_accel.c	19 Feb 2005 02:32:12 -0000	1.7
+++ cpu_accel.c	15 May 2005 20:11:34 -0000	1.8
@@ -143,10 +143,10 @@
 
     canjump = 1;
 
-#ifdef HAVE_ALTIVEC_H	/* gnu */
-#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
-#else			/* apple */
+#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
 #define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t"
+#else			/* gnu */
+#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
 #endif
     asm volatile ("mtspr 256, %0\n\t"
 		  VAND (0, 0, 0)

Index: cpu_state.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/cpu_state.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cpu_state.c	19 Feb 2005 02:32:12 -0000	1.7
+++ cpu_state.c	15 May 2005 20:11:34 -0000	1.8
@@ -48,18 +48,18 @@
 #endif
 
 #if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
-#ifdef HAVE_ALTIVEC_H	/* gnu */
-#define LI(a,b) "li " #a "," #b "\n\t"
-#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
-#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
-#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
-#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
-#else			/* apple */
+#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ )	/* apple */
 #define LI(a,b) "li r" #a "," #b "\n\t"
 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
+#else			/* gnu */
+#define LI(a,b) "li " #a "," #b "\n\t"
+#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
+#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
+#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
+#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
 #endif
 
 static void state_save_altivec (cpu_state_t * state)

Index: idct_altivec.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/idct_altivec.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- idct_altivec.c	2 Aug 2004 11:20:38 -0000	1.3
+++ idct_altivec.c	15 May 2005 20:11:34 -0000	1.4
@@ -41,7 +41,7 @@
 typedef vector signed int vector_s32_t;
 typedef vector unsigned int vector_u32_t;
 
-#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
+#if defined( HAVE_ALTIVEC_H ) && !defined( __APPLE_ALTIVEC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
 /* work around gcc <3.3 vec_mergel bug */
 static inline vector_s16_t my_vec_mergel (vector_s16_t const A,
 					  vector_s16_t const B)
@@ -56,10 +56,10 @@
 #define vec_mergel my_vec_mergel
 #endif
 
-#ifdef HAVE_ALTIVEC_H	/* gnu */
-#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h}
-#else			/* apple */
+#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
 #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
+#else			/* gnu */
+#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h}
 #endif
 
 static const vector_s16_t constants ATTR_ALIGN(16) =




More information about the MPlayer-cvslog mailing list