Commit 3e7aaa36 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

detect SSE3.

2005-06-07  Manish Singh  <yosh@gimp.org>

        * app/base/cpu-accel.[ch]: detect SSE3.
parent 92643ca2
2005-06-07 Manish Singh <yosh@gimp.org>
* app/base/cpu-accel.[ch]: detect SSE3.
2005-06-07 Manish Singh <yosh@gimp.org>
* app/actions/dockable-actions.c (dockable_actions_update): cast
......
......@@ -74,6 +74,11 @@ enum
ARCH_X86_CYRIX_FEATURE_MMXEXT = 1 << 24
};
enum
{
ARCH_X86_INTEL_FEATURE_PNI = 1 << 0
};
#if !defined(ARCH_X86_64) && defined(PIC)
#define cpuid(op,eax,ebx,ecx,edx) \
__asm__ ("movl %%ebx, %%esi\n\t" \
......@@ -187,6 +192,9 @@ arch_accel_intel (void)
if (edx & ARCH_X86_INTEL_FEATURE_XMM2)
caps |= CPU_ACCEL_X86_SSE2;
if (ecx & ARCH_X86_INTEL_FEATURE_PNI)
caps |= CPU_ACCEL_X86_SSE3;
#endif /* USE_SSE */
}
#endif /* USE_MMX */
......@@ -466,6 +474,8 @@ cpu_accel_print_results (void)
(cpu_accel() & CPU_ACCEL_X86_SSE) ? "yes" : "no");
g_printerr (" sse2 : %s\n",
(cpu_accel() & CPU_ACCEL_X86_SSE2) ? "yes" : "no");
g_printerr (" sse3 : %s\n",
(cpu_accel() & CPU_ACCEL_X86_SSE3) ? "yes" : "no");
#endif
#ifdef ARCH_PPC
g_printerr (" altivec : %s\n",
......
......@@ -33,6 +33,7 @@
#define CPU_ACCEL_X86_MMXEXT 0x20000000
#define CPU_ACCEL_X86_SSE 0x10000000
#define CPU_ACCEL_X86_SSE2 0x08000000
#define CPU_ACCEL_X86_SSE3 0x02000000
/* powerpc accelerations */
#define CPU_ACCEL_PPC_ALTIVEC 0x04000000
......
......@@ -74,6 +74,11 @@ enum
ARCH_X86_CYRIX_FEATURE_MMXEXT = 1 << 24
};
enum
{
ARCH_X86_INTEL_FEATURE_PNI = 1 << 0
};
#if !defined(ARCH_X86_64) && defined(PIC)
#define cpuid(op,eax,ebx,ecx,edx) \
__asm__ ("movl %%ebx, %%esi\n\t" \
......@@ -187,6 +192,9 @@ arch_accel_intel (void)
if (edx & ARCH_X86_INTEL_FEATURE_XMM2)
caps |= CPU_ACCEL_X86_SSE2;
if (ecx & ARCH_X86_INTEL_FEATURE_PNI)
caps |= CPU_ACCEL_X86_SSE3;
#endif /* USE_SSE */
}
#endif /* USE_MMX */
......@@ -466,6 +474,8 @@ cpu_accel_print_results (void)
(cpu_accel() & CPU_ACCEL_X86_SSE) ? "yes" : "no");
g_printerr (" sse2 : %s\n",
(cpu_accel() & CPU_ACCEL_X86_SSE2) ? "yes" : "no");
g_printerr (" sse3 : %s\n",
(cpu_accel() & CPU_ACCEL_X86_SSE3) ? "yes" : "no");
#endif
#ifdef ARCH_PPC
g_printerr (" altivec : %s\n",
......
......@@ -33,6 +33,7 @@
#define CPU_ACCEL_X86_MMXEXT 0x20000000
#define CPU_ACCEL_X86_SSE 0x10000000
#define CPU_ACCEL_X86_SSE2 0x08000000
#define CPU_ACCEL_X86_SSE3 0x02000000
/* powerpc accelerations */
#define CPU_ACCEL_PPC_ALTIVEC 0x04000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment