[MPlayer-cvslog] r26012 - in trunk/libmpeg2: cpu_accel.c cpu_state.c idct_altivec.c libmpeg-0.4.1.diff

diego subversion at mplayerhq.hu
Sat Feb 16 18:44:49 CET 2008


Author: diego
Date: Sat Feb 16 18:44:49 2008
New Revision: 26012

Log:
Do not check for __APPLE_ALTIVEC__, just check for __APPLE_CC__.
This should work even when -faltivec is not specified.


Modified:
   trunk/libmpeg2/cpu_accel.c
   trunk/libmpeg2/cpu_state.c
   trunk/libmpeg2/idct_altivec.c
   trunk/libmpeg2/libmpeg-0.4.1.diff

Modified: trunk/libmpeg2/cpu_accel.c
==============================================================================
--- trunk/libmpeg2/cpu_accel.c	(original)
+++ trunk/libmpeg2/cpu_accel.c	Sat Feb 16 18:44:49 2008
@@ -168,7 +168,7 @@ static uint32_t arch_accel (void)
 
     canjump = 1;
 
-#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
+#if defined(__APPLE_CC__)	/* 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"

Modified: trunk/libmpeg2/cpu_state.c
==============================================================================
--- trunk/libmpeg2/cpu_state.c	(original)
+++ trunk/libmpeg2/cpu_state.c	Sat Feb 16 18:44:49 2008
@@ -48,7 +48,7 @@ static void state_restore_mmx (cpu_state
 #endif
 
 #if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
-#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ )	/* apple */
+#if defined(__APPLE_CC__)	/* 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"

Modified: trunk/libmpeg2/idct_altivec.c
==============================================================================
--- trunk/libmpeg2/idct_altivec.c	(original)
+++ trunk/libmpeg2/idct_altivec.c	Sat Feb 16 18:44:49 2008
@@ -41,7 +41,7 @@ typedef vector unsigned short vector_u16
 typedef vector signed int vector_s32_t;
 typedef vector unsigned int vector_u32_t;
 
-#if defined( HAVE_ALTIVEC_H ) && !defined( __APPLE_ALTIVEC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
+#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_CC__) && (__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,7 +56,7 @@ static inline vector_s16_t my_vec_mergel
 #define vec_mergel my_vec_mergel
 #endif
 
-#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
+#if defined(__APPLE_CC__)	/* 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}

Modified: trunk/libmpeg2/libmpeg-0.4.1.diff
==============================================================================
--- trunk/libmpeg2/libmpeg-0.4.1.diff	(original)
+++ trunk/libmpeg2/libmpeg-0.4.1.diff	Sat Feb 16 18:44:49 2008
@@ -72,7 +72,7 @@
 -#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 */
++#if defined(__APPLE_CC__)	/* 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"
@@ -137,7 +137,7 @@
 -#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 */
++#if defined(__APPLE_CC__)	/* 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"
@@ -464,7 +464,7 @@
  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)
++#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_CC__) && (__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)
@@ -475,7 +475,7 @@
 -#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 */
++#if defined(__APPLE_CC__)	/* 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}



More information about the MPlayer-cvslog mailing list