Contents of /trunk/libsdl/patches/libsdl-1.2.9-PIC-hermes-cpuid.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 452 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 452 byte(s)
-import
1 | Fixes from the PaX team to eliminate TEXTRELs |
2 | |
3 | --- src/hermes/x86_main.asm |
4 | +++ src/hermes/x86_main.asm |
5 | @@ -17,11 +17,6 @@ GLOBAL _x86return |
6 | GLOBAL _Hermes_X86_CPU |
7 | |
8 | |
9 | -SECTION .data |
10 | - |
11 | -cpu_flags dd 0 |
12 | - |
13 | - |
14 | SECTION .text |
15 | |
16 | ;; _ConvertX86: |
17 | @@ -110,16 +105,13 @@ _Hermes_X86_CPU: |
18 | xor eax,ecx |
19 | je .L1 |
20 | |
21 | - pusha |
22 | - |
23 | + push ebx |
24 | + |
25 | mov eax,1 |
26 | cpuid |
27 | + mov eax,edx |
28 | |
29 | - mov [cpu_flags],edx |
30 | - |
31 | - popa |
32 | - |
33 | - mov eax,[cpu_flags] |
34 | + pop ebx |
35 | |
36 | .L1: |
37 | ret |