Commit a12ff596 authored by Sam Lantinga's avatar Sam Lantinga

Updated Visual C++ support

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40750
parent 17c9e1dd
No preview for this file type
...@@ -59,7 +59,7 @@ static __inline__ int CPU_haveCPUID() ...@@ -59,7 +59,7 @@ static __inline__ int CPU_haveCPUID()
: "%eax", "%ecx" : "%eax", "%ecx"
); );
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
__asm__ { __asm {
pushfd ; Get original EFLAGS pushfd ; Get original EFLAGS
pop eax pop eax
mov ecx, eax mov ecx, eax
...@@ -102,7 +102,7 @@ static __inline__ int CPU_getCPUIDFeatures() ...@@ -102,7 +102,7 @@ static __inline__ int CPU_getCPUIDFeatures()
: "%eax", "%ebx", "%ecx", "%edx" : "%eax", "%ebx", "%ecx", "%edx"
); );
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
__asm__ { __asm {
xor eax, eax ; Set up for CPUID instruction xor eax, eax ; Set up for CPUID instruction
cpuid ; Get and save vendor ID cpuid ; Get and save vendor ID
cmp eax, 1 ; Make sure 1 is valid input for CPUID cmp eax, 1 ; Make sure 1 is valid input for CPUID
...@@ -162,7 +162,7 @@ static __inline__ int CPU_have3DNow() ...@@ -162,7 +162,7 @@ static __inline__ int CPU_have3DNow()
: "%eax", "%ebx", "%ecx", "%edx" : "%eax", "%ebx", "%ecx", "%edx"
); );
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
__asm__ { __asm {
mov eax,80000000h ; Query for extended functions mov eax,80000000h ; Query for extended functions
cpuid ; Get extended function limit cpuid ; Get extended function limit
cmp eax,80000001h cmp eax,80000001h
......
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