From Mike Frysinger and/or Gentoo:
- libsdl-PIC-hermes-cpuid.patch rewrites the code in _Hermes_X86_CPU so that it doesnt require the local cpu_flags memory variable, it just uses registers. test case: http://dev.gentoo.org/~vapier/libsdl/hermes-cpuid-test.tar.bz2 --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401230
This commit is contained in:
parent
d28ecd1a1c
commit
f5f2890758
1 changed files with 4 additions and 12 deletions
|
@ -16,11 +16,6 @@ GLOBAL _x86return
|
||||||
|
|
||||||
GLOBAL _Hermes_X86_CPU
|
GLOBAL _Hermes_X86_CPU
|
||||||
|
|
||||||
SECTION .data
|
|
||||||
|
|
||||||
cpu_flags dd 0
|
|
||||||
|
|
||||||
|
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
|
||||||
;; _ConvertX86:
|
;; _ConvertX86:
|
||||||
|
@ -109,16 +104,13 @@ _Hermes_X86_CPU:
|
||||||
xor eax,ecx
|
xor eax,ecx
|
||||||
je .L1
|
je .L1
|
||||||
|
|
||||||
pusha
|
push ebx
|
||||||
|
|
||||||
mov eax,1
|
mov eax,1
|
||||||
cpuid
|
cpuid
|
||||||
|
mov eax,edx
|
||||||
|
|
||||||
mov [cpu_flags],edx
|
pop ebx
|
||||||
|
|
||||||
popa
|
|
||||||
|
|
||||||
mov eax,[cpu_flags]
|
|
||||||
|
|
||||||
.L1:
|
.L1:
|
||||||
ret
|
ret
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue