# HG changeset patch # User Ryan C. Gordon # Date 1136444939 0 # Node ID 3202d727bb4b444315c444631daa10d3452ddb07 # Parent d05306f0dc210a8f08316a7fef43ed18c9ec6dbd 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 diff -r d05306f0dc21 -r 3202d727bb4b src/hermes/x86_main.asm --- a/src/hermes/x86_main.asm Wed Jan 04 22:57:50 2006 +0000 +++ b/src/hermes/x86_main.asm Thu Jan 05 07:08:59 2006 +0000 @@ -16,11 +16,6 @@ GLOBAL _Hermes_X86_CPU -SECTION .data - -cpu_flags dd 0 - - SECTION .text ;; _ConvertX86: @@ -109,16 +104,13 @@ xor eax,ecx je .L1 - pusha - + push ebx + mov eax,1 cpuid - - mov [cpu_flags],edx + mov eax,edx - popa - - mov eax,[cpu_flags] + pop ebx .L1: ret