summaryrefslogtreecommitdiff
path: root/src/xine-utils/cpu_accel.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-12-05 15:12:02 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-12-05 15:12:02 +0000
commit85fa502b8d69f72eecee95fe3692344ae4035989 (patch)
treeecbc5a6c7d1166dab53781c70722588a36e7ce9d /src/xine-utils/cpu_accel.c
parent814d94cb28617fdafa195f8bdbd4c40db4ccc92a (diff)
downloadxine-lib-85fa502b8d69f72eecee95fe3692344ae4035989.tar.gz
xine-lib-85fa502b8d69f72eecee95fe3692344ae4035989.tar.bz2
altivec support by Jeffrey W. Baker <jwbaker@acm.org>
CVS patchset: 1171 CVS date: 2001/12/05 15:12:02
Diffstat (limited to 'src/xine-utils/cpu_accel.c')
-rw-r--r--src/xine-utils/cpu_accel.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c
index 5fa5a45ed..41baa5d5e 100644
--- a/src/xine-utils/cpu_accel.c
+++ b/src/xine-utils/cpu_accel.c
@@ -121,33 +121,31 @@ static void sigill_handler (int n) {
uint32_t xine_mm_accel (void)
{
#ifdef ARCH_X86
- static int got_accel = 0;
static uint32_t accel;
- if (!got_accel) {
- got_accel = 1;
-
- accel = x86_accel ();
-
- /* test OS support for SSE */
- if( accel & MM_ACCEL_X86_SSE ) {
- if (setjmp(sigill_return)) {
- accel &= ~(MM_ACCEL_X86_SSE|MM_ACCEL_X86_SSE2);
- } else {
- signal (SIGILL, sigill_handler);
- __asm __volatile ("xorps %xmm0, %xmm0");
- signal (SIGILL, SIG_DFL);
- }
+ accel = x86_accel ();
+
+ /* test OS support for SSE */
+ if( accel & MM_ACCEL_X86_SSE ) {
+ if (setjmp(sigill_return)) {
+ accel &= ~(MM_ACCEL_X86_SSE|MM_ACCEL_X86_SSE2);
+ } else {
+ signal (SIGILL, sigill_handler);
+ __asm __volatile ("xorps %xmm0, %xmm0");
+ signal (SIGILL, SIG_DFL);
}
}
return accel;
-#else
+#endif
#ifdef HAVE_MLIB
return MM_ACCEL_MLIB;
-#else
- return 0;
+#endif
+#ifdef ARCH_PPC
+#ifdef ENABLE_ALTIVEC
+ return MM_ACCEL_PPC_ALTIVEC;
#endif
#endif
+ return 0;
}