diff options
author | R. Belmont <rb6502@users.noreply.github.com> | 2012-05-28 18:15:02 +0000 |
---|---|---|
committer | R. Belmont <rb6502@users.noreply.github.com> | 2012-05-28 18:15:02 +0000 |
commit | 144234d9f64df0da253fe0452e09c652aa999924 (patch) | |
tree | 847dc7fe7967148a5c5cc66f5d892c286bf4f0a3 /src/lib | |
parent | 7019ac92f74ba3683d7ac8f30a925ef26cd41b15 (diff) |
SDL: Preliminary Haiku OS support [PulkoMandy]
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/lib7z/CpuArch.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/lib7z/CpuArch.c b/src/lib/lib7z/CpuArch.c index 2896300d235..30ef775ce67 100644 --- a/src/lib/lib7z/CpuArch.c +++ b/src/lib/lib7z/CpuArch.c @@ -72,6 +72,16 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) #else + #ifdef __PIC__ + "mov %%ebx, %%edi;" + "cpuid;" + "xchgl %%ebx, %%edi;" + : "=a" (*a) , + "=D" (*b) , /* edi */ + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + #else // __PIC__ __asm__ __volatile__ ( "cpuid" : "=a" (*a) , @@ -79,6 +89,7 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) "=c" (*c) , "=d" (*d) : "0" (function)) ; + #endif // __PIC__ #endif |