comparison src/cpuinfo/SDL_cpuinfo.c @ 1152:51a8702d8ecd

Updates to PocketPC (WinCE) support, thanks to Dmitry Yakimov at activekitten.com.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 29 Sep 2005 09:43:00 +0000
parents b4b64bb88f2f
children b616ac4f39d1
comparison
equal deleted inserted replaced
1151:be9c9c8f6d53 1152:51a8702d8ecd
99 "1: \n" 99 "1: \n"
100 : "=m" (has_CPUID) 100 : "=m" (has_CPUID)
101 : 101 :
102 : "%rax", "%rcx" 102 : "%rax", "%rcx"
103 ); 103 );
104 #elif defined(_MSC_VER) 104 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_X86_))
105 __asm { 105 __asm {
106 pushfd ; Get original EFLAGS 106 pushfd ; Get original EFLAGS
107 pop eax 107 pop eax
108 mov ecx, eax 108 mov ecx, eax
109 xor eax, 200000h ; Flip ID bit in EFLAGS 109 xor eax, 200000h ; Flip ID bit in EFLAGS
138 " movl %%edi,%%ebx\n" 138 " movl %%edi,%%ebx\n"
139 : "=m" (features) 139 : "=m" (features)
140 : 140 :
141 : "%eax", "%ecx", "%edx", "%edi" 141 : "%eax", "%ecx", "%edx", "%edi"
142 ); 142 );
143 #elif defined(_MSC_VER) 143 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_X86_))
144 __asm { 144 __asm {
145 xor eax, eax ; Set up for CPUID instruction 145 xor eax, eax ; Set up for CPUID instruction
146 cpuid ; Get and save vendor ID 146 cpuid ; Get and save vendor ID
147 cmp eax, 1 ; Make sure 1 is valid input for CPUID 147 cmp eax, 1 ; Make sure 1 is valid input for CPUID
148 jl done ; We dont have the CPUID instruction 148 jl done ; We dont have the CPUID instruction
173 " movl %%edi,%%ebx\n" 173 " movl %%edi,%%ebx\n"
174 : "=m" (features) 174 : "=m" (features)
175 : 175 :
176 : "%eax", "%ecx", "%edx", "%edi" 176 : "%eax", "%ecx", "%edx", "%edi"
177 ); 177 );
178 #elif defined(_MSC_VER) 178 #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_X86_))
179 __asm { 179 __asm {
180 mov eax,80000000h ; Query for extended functions 180 mov eax,80000000h ; Query for extended functions
181 cpuid ; Get extended function limit 181 cpuid ; Get extended function limit
182 cmp eax,80000001h 182 cmp eax,80000001h
183 jl done ; Nope, we dont have function 800000001h 183 jl done ; Nope, we dont have function 800000001h