Browse Source

Fixed --enable-dynsimd parts to work with latest gcc releases when using -march=pentium4

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@923 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
sonarnerd 20 years ago
parent
commit
0fd4fb70a3
3 changed files with 25 additions and 15 deletions
  1. +1
    -1
      configure.ac
  2. +2
    -2
      jack/intsimd.h
  3. +22
    -12
      libjack/client.c

+ 1
- 1
configure.ac View File

@@ -15,7 +15,7 @@ dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=100
JACK_MICRO_VERSION=5
JACK_MICRO_VERSION=6

dnl ---
dnl HOWTO: updating the jack protocol version


+ 2
- 2
jack/intsimd.h View File

@@ -22,9 +22,9 @@
#define __jack_intsimd_h__

#ifdef USE_DYNSIMD
#if (defined(__i686__) || defined(__x86_64__))
#if (defined(__i386__) || defined(__x86_64__))
#define ARCH_X86
#endif /* __i686__ || __x86_64__ */
#endif /* __i386__ || __x86_64__ */
#endif /* USE_DYNSIMD */

#ifdef ARCH_X86


+ 22
- 12
libjack/client.c View File

@@ -89,70 +89,77 @@ typedef struct {
static int
have_3dnow ()
{
int res = 0;
unsigned int res = 0;

asm volatile (
"pushl %%ebx\n\t" \
"movl $0x80000000, %%eax\n\t" \
"cpuid\n\t" \
"cmpl $0x80000001, %%eax\n\t" \
"jl tdnow_testexit\n\t" \
"jl tdnow_prexit\n\t" \
\
"movl $0x80000001, %%eax\n\t" \
"cpuid\n\t" \
\
"xorl %%eax, %%eax\n\t" \
\
"movl $1, %%ecx\n\t" \
"shll $31, %%ecx\n\t" \
"testl %%ecx, %%edx\n\t" \
"jz tdnow_testexit\n\t" \
"movl $1, %0\n\t" \
"movl $1, %%eax\n\t" \
\
"movl $1, %%ecx\n\t" \
"shll $30, %%ecx\n\t" \
"testl %%ecx, %%edx\n\t" \
"jz tdnow_testexit\n\t" \
"movl $2, %0\n\t" \
"movl $2, %%eax\n\t" \
"jmp tdnow_testexit\n\t" \
\
"tdnow_prexit:\n\t" \
"xorl %%eax, %%eax\n\t" \
"tdnow_testexit:\n\t" \
"popl %%ebx\n\t"
: "=m" (res)
: "=a" (res)
:
: "eax", "ecx", "edx", "memory");
: "ecx", "edx", "memory");
return res;
}

static int
have_sse ()
{
int res = 0;
unsigned int res = 0;

asm volatile (
"pushl %%ebx\n\t" \
"movl $1, %%eax\n\t" \
"cpuid\n\t" \
\
"xorl %%eax, %%eax\n\t" \
\
"movl $1, %%ebx\n\t" \
"shll $25, %%ebx\n\t" \
"testl %%ebx, %%edx\n\t" \
"jz sse_testexit\n\t" \
"movl $1, %0\n\t" \
"movl $1, %%eax\n\t" \
\
"movl $1, %%ebx\n\t" \
"shll $26, %%ebx\n\t" \
"testl %%ebx, %%edx\n\t" \
"jz sse_testexit\n\t" \
"movl $2, %0\n\t" \
"movl $2, %%eax\n\t" \
\
"movl $1, %%ebx\n\t" \
"testl %%ebx, %%ecx\n\t" \
"jz sse_testexit\n\t" \
"movl $3, %0\n\t" \
"movl $3, %%eax\n\t" \
\
"sse_testexit:\n\t" \
"popl %%ebx\n\t"
: "=m" (res)
: "=a" (res)
:
: "eax", "ecx", "edx", "memory");
: "ecx", "edx", "memory");
return res;
}

@@ -164,6 +171,9 @@ init_cpu ()
fprintf(stderr, "Enhanced3DNow! detected\n");
if (ARCH_X86_HAVE_SSE2(cpu_type))
fprintf(stderr, "SSE2 detected\n");
if ((!ARCH_X86_HAVE_3DNOW(cpu_type)) && (!ARCH_X86_HAVE_SSE2(cpu_type)))
fprintf(stderr,
"No supported SIMD instruction sets detected\n");
}

#endif /* ARCH_X86 */


Loading…
Cancel
Save