diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-05 15:12:02 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-05 15:12:02 +0000 |
commit | 85fa502b8d69f72eecee95fe3692344ae4035989 (patch) | |
tree | ecbc5a6c7d1166dab53781c70722588a36e7ce9d /src/xine-utils | |
parent | 814d94cb28617fdafa195f8bdbd4c40db4ccc92a (diff) | |
download | xine-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')
-rw-r--r-- | src/xine-utils/cpu_accel.c | 34 | ||||
-rw-r--r-- | src/xine-utils/xineutils.h | 4 |
2 files changed, 19 insertions, 19 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; } diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index a4a689f4a..634cf0c74 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.4 2001/11/30 00:53:51 f1rmb Exp $ + * $Id: xineutils.h,v 1.5 2001/12/05 15:12:03 guenter Exp $ * */ #ifndef XINEUTILS_H @@ -49,6 +49,8 @@ extern "C" { #define MM_ACCEL_X86_MMXEXT 0x20000000 #define MM_ACCEL_X86_SSE 0x10000000 #define MM_ACCEL_X86_SSE2 0x08000000 +/* powerpc accelerations */ +#define MM_ACCEL_PPC_ALTIVEC 0x04000000 /* x86 compat defines */ #define MM_MMX MM_ACCEL_X86_MMX #define MM_3DNOW MM_ACCEL_X86_3DNOW |