diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2002-10-22 17:13:11 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2002-10-22 17:13:11 +0000 |
commit | ce2b47e5f3794eeaf4c900f1e127a71b06c0da29 (patch) | |
tree | 756401e15a55a9be9deb26d45070541f3ce6b5e2 | |
parent | a15b9cf7dfab926c0510aa554688318d3103982e (diff) | |
download | xine-lib-ce2b47e5f3794eeaf4c900f1e127a71b06c0da29.tar.gz xine-lib-ce2b47e5f3794eeaf4c900f1e127a71b06c0da29.tar.bz2 |
trying to reduce the number of SIGILL signals on Solaris x86 (no SSE support)
CVS patchset: 2938
CVS date: 2002/10/22 17:13:11
-rw-r--r-- | src/xine-utils/cpu_accel.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c index 03e047aa0..3f3cd7b9c 100644 --- a/src/xine-utils/cpu_accel.c +++ b/src/xine-utils/cpu_accel.c @@ -156,21 +156,26 @@ uint32_t xine_mm_accel (void) { #if defined (ARCH_X86) || (defined (ARCH_PPC) && defined (ENABLE_ALTIVEC)) static uint32_t accel; + static int initialized; - accel = arch_accel (); + if (!initialized) { + accel = arch_accel (); #ifdef ARCH_X86 - /* 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); + /* 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); + } } - } #endif /* ARCH_X86 */ + + initialized++; + } return accel; |