comparison libmpeg2/cpu_state.c @ 13864:96259a2f2142

enable mmx support on x86_64 in libmpeg2
author aurel
date Wed, 03 Nov 2004 17:12:01 +0000
parents 1c514c78c7b4
children 1385ec491ffb
comparison
equal deleted inserted replaced
13863:2233c999dce1 13864:96259a2f2142
27 #include <inttypes.h> 27 #include <inttypes.h>
28 28
29 #include "mpeg2.h" 29 #include "mpeg2.h"
30 #include "attributes.h" 30 #include "attributes.h"
31 #include "mpeg2_internal.h" 31 #include "mpeg2_internal.h"
32 #ifdef ARCH_X86 32 #if defined(ARCH_X86) || defined(ARCH_X86_64)
33 #include "mmx.h" 33 #include "mmx.h"
34 #endif 34 #endif
35 35
36 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; 36 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
37 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; 37 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
38 38
39 #ifdef ARCH_X86 39 #if defined(ARCH_X86) || defined(ARCH_X86_64)
40 static void state_restore_mmx (cpu_state_t * state) 40 static void state_restore_mmx (cpu_state_t * state)
41 { 41 {
42 emms (); 42 emms ();
43 } 43 }
44 #endif 44 #endif
113 } 113 }
114 #endif 114 #endif
115 115
116 void mpeg2_cpu_state_init (uint32_t accel) 116 void mpeg2_cpu_state_init (uint32_t accel)
117 { 117 {
118 #ifdef ARCH_X86 118 #if defined(ARCH_X86) || defined(ARCH_X86_64)
119 if (accel & MPEG2_ACCEL_X86_MMX) { 119 if (accel & MPEG2_ACCEL_X86_MMX) {
120 mpeg2_cpu_state_restore = state_restore_mmx; 120 mpeg2_cpu_state_restore = state_restore_mmx;
121 } 121 }
122 #endif 122 #endif
123 #if defined(ARCH_PPC) && defined(HAVE_ALTIVEC) 123 #if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)