Mercurial > mplayer.hg
comparison libmpeg2/libmpeg-0.4.1.diff @ 25980:11181df06389
Do not check for __APPLE_ALTIVEC__, just check for __APPLE_CC__.
This should work even when -faltivec is not specified.
author | diego |
---|---|
date | Sat, 16 Feb 2008 17:44:49 +0000 |
parents | 1769eb14d6e8 |
children | dfdf201e62cc |
comparison
equal
deleted
inserted
replaced
25979:ebb3be14974e | 25980:11181df06389 |
---|---|
70 canjump = 1; | 70 canjump = 1; |
71 | 71 |
72 -#ifdef HAVE_ALTIVEC_H /* gnu */ | 72 -#ifdef HAVE_ALTIVEC_H /* gnu */ |
73 -#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t" | 73 -#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t" |
74 -#else /* apple */ | 74 -#else /* apple */ |
75 +#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */ | 75 +#if defined(__APPLE_CC__) /* apple */ |
76 #define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t" | 76 #define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t" |
77 +#else /* gnu */ | 77 +#else /* gnu */ |
78 +#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t" | 78 +#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t" |
79 #endif | 79 #endif |
80 asm volatile ("mtspr 256, %0\n\t" | 80 asm volatile ("mtspr 256, %0\n\t" |
135 -#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" | 135 -#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" |
136 -#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" | 136 -#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" |
137 -#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" | 137 -#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" |
138 -#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" | 138 -#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" |
139 -#else /* apple */ | 139 -#else /* apple */ |
140 +#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */ | 140 +#if defined(__APPLE_CC__) /* apple */ |
141 #define LI(a,b) "li r" #a "," #b "\n\t" | 141 #define LI(a,b) "li r" #a "," #b "\n\t" |
142 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" | 142 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" |
143 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t" | 143 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t" |
144 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t" | 144 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t" |
145 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t" | 145 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t" |
462 @@ -41,7 +41,7 @@ | 462 @@ -41,7 +41,7 @@ |
463 typedef vector signed int vector_s32_t; | 463 typedef vector signed int vector_s32_t; |
464 typedef vector unsigned int vector_u32_t; | 464 typedef vector unsigned int vector_u32_t; |
465 | 465 |
466 -#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) | 466 -#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) |
467 +#if defined( HAVE_ALTIVEC_H ) && !defined( __APPLE_ALTIVEC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) | 467 +#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_CC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) |
468 /* work around gcc <3.3 vec_mergel bug */ | 468 /* work around gcc <3.3 vec_mergel bug */ |
469 static inline vector_s16_t my_vec_mergel (vector_s16_t const A, | 469 static inline vector_s16_t my_vec_mergel (vector_s16_t const A, |
470 vector_s16_t const B) | 470 vector_s16_t const B) |
471 @@ -56,10 +56,10 @@ | 471 @@ -56,10 +56,10 @@ |
472 #define vec_mergel my_vec_mergel | 472 #define vec_mergel my_vec_mergel |
473 #endif | 473 #endif |
474 | 474 |
475 -#ifdef HAVE_ALTIVEC_H /* gnu */ | 475 -#ifdef HAVE_ALTIVEC_H /* gnu */ |
476 -#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} | 476 -#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} |
477 -#else /* apple */ | 477 -#else /* apple */ |
478 +#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */ | 478 +#if defined(__APPLE_CC__) /* apple */ |
479 #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) | 479 #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) |
480 +#else /* gnu */ | 480 +#else /* gnu */ |
481 +#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} | 481 +#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} |
482 #endif | 482 #endif |
483 | 483 |