Commit 48554a26 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Support cpuid on 64-bit.

parent 85630593
...@@ -2804,21 +2804,44 @@ done: ...@@ -2804,21 +2804,44 @@ done:
return status; return status;
} }
static inline void do_cpuid( unsigned int ax, unsigned int *p ) extern void do_cpuid( unsigned int ax, unsigned int *p );
{ #if defined(_MSC_VER)
#ifdef __i386__ void do_cpuid( unsigned int ax, unsigned int *p )
#ifdef _MSC_VER {
__cpuid(p, ax); __cpuid( p, ax );
#else }
__asm__("pushl %%ebx\n\t" #elif defined(__i386__)
__ASM_GLOBAL_FUNC( do_cpuid,
"pushl %esi\n\t"
"pushl %ebx\n\t"
"movl 12(%esp),%eax\n\t"
"movl 16(%esp),%esi\n\t"
"cpuid\n\t" "cpuid\n\t"
"movl %%ebx, %%esi\n\t" "movl %eax,(%esi)\n\t"
"popl %%ebx" "movl %ebx,4(%esi)\n\t"
: "=a" (p[0]), "=S" (p[1]), "=c" (p[2]), "=d" (p[3]) "movl %ecx,8(%esi)\n\t"
: "0" (ax)); "movl %edx,12(%esi)\n\t"
#endif "popl %ebx\n\t"
#endif "popl %esi\n\t"
"ret" )
#elif defined(__x86_64__)
__ASM_GLOBAL_FUNC( do_cpuid,
"pushq %rbx\n\t"
"movl %edi,%eax\n\t"
"cpuid\n\t"
"movl %eax,(%rsi)\n\t"
"movl %ebx,4(%rsi)\n\t"
"movl %ecx,8(%rsi)\n\t"
"movl %edx,12(%rsi)\n\t"
"popq %rbx\n\t"
"ret" )
#else
void do_cpuid( unsigned int ax, unsigned int *p )
{
FIXME("\n");
} }
#endif
static const WCHAR *get_osarchitecture(void) static const WCHAR *get_osarchitecture(void)
{ {
SYSTEM_INFO info; SYSTEM_INFO info;
......
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