summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2003-03-11 16:07:22 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2003-03-11 16:07:22 +0000
commit03d298ebbcbc8a097bd5e800ce32c75dd4365569 (patch)
treed2b2dde973bc7ea27fac5f33418977a97a59c1b8
parentd71730f12e14bd6dc8a479eafc73c1588febf375 (diff)
downloadxine-lib-03d298ebbcbc8a097bd5e800ce32c75dd4365569.tar.gz
xine-lib-03d298ebbcbc8a097bd5e800ce32c75dd4365569.tar.bz2
Disable some debug output on x86, when the OS doesn't support SSE.
CVS patchset: 4394 CVS date: 2003/03/11 16:07:22
-rw-r--r--src/xine-utils/cpu_accel.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c
index 7acb0ee25..feca22e51 100644
--- a/src/xine-utils/cpu_accel.c
+++ b/src/xine-utils/cpu_accel.c
@@ -29,6 +29,10 @@
#include "attributes.h"
#include "xineutils.h"
+/*
+#define LOG
+*/
+
#ifdef ARCH_X86
static uint32_t arch_accel (void)
{
@@ -112,7 +116,6 @@ static uint32_t arch_accel (void)
static jmp_buf sigill_return;
static void sigill_handler (int n) {
- printf ("cpu_accel: OS doesn't support SSE instructions.\n");
longjmp(sigill_return, 1);
}
#endif /* ARCH_X86 */
@@ -164,13 +167,20 @@ uint32_t xine_mm_accel (void)
#ifdef ARCH_X86
/* test OS support for SSE */
if( accel & MM_ACCEL_X86_SSE ) {
+ void (*old_sigill_handler)(int);
+
+ old_sigill_handler = signal (SIGILL, sigill_handler);
+
if (setjmp(sigill_return)) {
+#ifdef LOG
+ printf ("cpu_accel: OS doesn't support SSE instructions.\n");
+#endif
accel &= ~(MM_ACCEL_X86_SSE|MM_ACCEL_X86_SSE2);
} else {
- signal (SIGILL, sigill_handler);
__asm__ volatile ("xorps %xmm0, %xmm0");
- signal (SIGILL, SIG_DFL);
}
+
+ signal (SIGILL, old_sigill_handler);
}
#endif /* ARCH_X86 */