comparison libmpeg2/cpu_state.c @ 15483:52838f825747

set define for apple gcc altivec
author nplourde
date Sun, 15 May 2005 20:11:34 +0000
parents 1385ec491ffb
children 0783dd397f74
comparison
equal deleted inserted replaced
15482:c4af653727eb 15483:52838f825747
46 emms (); 46 emms ();
47 } 47 }
48 #endif 48 #endif
49 49
50 #if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC ) 50 #if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
51 #ifdef HAVE_ALTIVEC_H /* gnu */ 51 #if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
52 #define LI(a,b) "li r" #a "," #b "\n\t"
53 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
54 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
55 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
56 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
57 #else /* gnu */
52 #define LI(a,b) "li " #a "," #b "\n\t" 58 #define LI(a,b) "li " #a "," #b "\n\t"
53 #define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" 59 #define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
54 #define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" 60 #define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
55 #define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" 61 #define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
56 #define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" 62 #define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
57 #else /* apple */
58 #define LI(a,b) "li r" #a "," #b "\n\t"
59 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
60 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
61 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
62 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
63 #endif 63 #endif
64 64
65 static void state_save_altivec (cpu_state_t * state) 65 static void state_save_altivec (cpu_state_t * state)
66 { 66 {
67 asm (LI (9, 16) 67 asm (LI (9, 16)