Mercurial > sdl-ios-xcode
comparison src/cpuinfo/SDL_cpuinfo.c @ 1864:7bea26ad3130
I think this fixes bug #244
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Jun 2006 05:35:44 +0000 |
parents | 96d8c3fec479 |
children | c121d94672cb a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
1863:0e44c6f90b95 | 1864:7bea26ad3130 |
---|---|
107 xor eax, ecx ; Can not toggle ID bit, | 107 xor eax, ecx ; Can not toggle ID bit, |
108 jz done ; Processor=80486 | 108 jz done ; Processor=80486 |
109 mov has_CPUID,1 ; We have CPUID support | 109 mov has_CPUID,1 ; We have CPUID support |
110 done: | 110 done: |
111 } | 111 } |
112 #elif defined(__sun) && defined(__x86) | 112 #elif defined(__sun) && defined(__i386) |
113 __asm ( | 113 __asm ( |
114 " pushfl \n" | 114 " pushfl \n" |
115 " popl %eax \n" | 115 " popl %eax \n" |
116 " movl %eax,%ecx \n" | 116 " movl %eax,%ecx \n" |
117 " xorl $0x200000,%eax \n" | 117 " xorl $0x200000,%eax \n" |
173 inc eax | 173 inc eax |
174 cpuid ; Get family/model/stepping/features | 174 cpuid ; Get family/model/stepping/features |
175 mov features, edx | 175 mov features, edx |
176 done: | 176 done: |
177 } | 177 } |
178 #elif defined(__sun) && (defined(__x86) || defined(__amd64)) | 178 #elif defined(__sun) && (defined(__i386) || defined(__amd64)) |
179 __asm( | 179 __asm( |
180 " movl %ebx,%edi\n" | 180 " movl %ebx,%edi\n" |
181 " xorl %eax,%eax \n" | 181 " xorl %eax,%eax \n" |
182 " cpuid \n" | 182 " cpuid \n" |
183 " cmpl $1,%eax \n" | 183 " cmpl $1,%eax \n" |