#ifdef HAVE_SIGNAL_H
static jmp_buf env;
static int i_illegal;
-#if defined( __i386__ )
+#if defined( __i386__ ) || defined( __x86_64__ )
static char *psz_capability;
#endif
#endif
return i_capabilities;
-#elif defined( __i386__ )
+#elif defined( __i386__ ) || defined( __x86_64__ )
volatile unsigned int i_eax, i_ebx, i_ecx, i_edx;
volatile vlc_bool_t b_amd;
/* Needed for x86 CPU capabilities detection */
# define cpuid( reg ) \
- asm volatile ( "pushl %%ebx\n\t" \
+ asm volatile ( "push %%ebx\n\t" \
"cpuid\n\t" \
"movl %%ebx,%1\n\t" \
- "popl %%ebx\n\t" \
+ "pop %%ebx\n\t" \
: "=a" ( i_eax ), \
"=r" ( i_ebx ), \
"=c" ( i_ecx ), \
i_capabilities |= CPU_CAPABILITY_FPU;
- /* test for a 486 CPU */
- asm volatile ( "pushl %%ebx\n\t"
- "pushfl\n\t"
- "popl %%eax\n\t"
+ asm volatile ( "push %%ebx\n\t"
+ "pushf\n\t"
+ "pop %%eax\n\t"
"movl %%eax, %%ebx\n\t"
"xorl $0x200000, %%eax\n\t"
- "pushl %%eax\n\t"
- "popfl\n\t"
- "pushfl\n\t"
- "popl %%eax\n\t"
+ "push %%eax\n\t"
+ "popf\n\t"
+ "pushf\n\t"
+ "pop %%eax\n\t"
"movl %%ebx,%1\n\t"
- "popl %%ebx\n\t"
+ "pop %%ebx\n\t"
: "=a" ( i_eax ),
"=r" ( i_ebx )
:
if( i_edx & 0x04000000 )
{
-# if defined(CAN_COMPILE_SSE) && !defined(SYS_BEOS)
+# if defined(CAN_COMPILE_SSE)
/* We test if OS supports the SSE instructions */
psz_capability = "SSE2";
i_illegal = 0;
i_capabilities |= CPU_CAPABILITY_FPU;
return i_capabilities;
-#elif defined( _MSC_VER )
+#elif defined( _MSC_VER ) && !defined( UNDER_CE )
i_capabilities |= CPU_CAPABILITY_FPU;
return i_capabilities;