/*****************************************************************************
* cpu.c: CPU detection code
*****************************************************************************
- * Copyright (C) 1998-2002 VideoLAN
- * $Id: cpu.c,v 1.8 2002/11/10 18:04:24 sam Exp $
+ * Copyright (C) 1998-2004 VideoLAN
+ * $Id: cpu.c,v 1.12 2004/01/06 12:02:06 zorglub Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
*****************************************************************************
* This function is called to list extensions the CPU may have.
*****************************************************************************/
-u32 CPUCapabilities( void )
+uint32_t CPUCapabilities( void )
{
- volatile u32 i_capabilities = CPU_CAPABILITY_NONE;
+ volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE;
#if defined( SYS_DARWIN )
struct host_basic_info hi;
volatile vlc_bool_t b_amd;
/* Needed for x86 CPU capabilities detection */
-# define cpuid( a ) \
+# define cpuid( reg ) \
asm volatile ( "pushl %%ebx\n\t" \
"cpuid\n\t" \
"movl %%ebx,%1\n\t" \
"=r" ( i_ebx ), \
"=c" ( i_ecx ), \
"=d" ( i_edx ) \
- : "a" ( a ) \
+ : "a" ( reg ) \
: "cc" );
# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) \
i_capabilities |= CPU_CAPABILITY_FPU;
return i_capabilities;
+#elif defined( _MSC_VER )
+ i_capabilities |= CPU_CAPABILITY_FPU;
+ return i_capabilities;
+
#else
/* default behaviour */
return i_capabilities;