diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 18:40:44 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 18:40:44 +0000 |
commit | 5c50d3e7dd839be03468e5058ce7d5eb60dfe1d8 (patch) | |
tree | 5c630dd1bec808dfe785e27b47615982d84040ad /loader | |
parent | 49ea21d07367275022349403cb4a60f8316e5634 (diff) |
applied solaris8/netbsd/other fixes patch by Jürgen Keil <jk@tools.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1039 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r-- | loader/stubs.s | 16 | ||||
-rw-r--r-- | loader/win32.c | 27 |
2 files changed, 24 insertions, 19 deletions
diff --git a/loader/stubs.s b/loader/stubs.s index dd2d5db931..d2ca312594 100644 --- a/loader/stubs.s +++ b/loader/stubs.s @@ -1,13 +1,7 @@ - .file "stubs.c" - .version "01.01" -gcc2_compiled.: -.section .rodata -.LC0: - .string "Called unk_%s\n" -.data + .data +.LC0: .string "Called unk_%s\n" .align 4 .globl unk_exp1 - .type unk_exp1,@function unk_exp1: pushl %ebp movl %esp,%ebp @@ -26,11 +20,5 @@ unk_exp1: call printf addl $8,%esp xorl %eax,%eax - jmp .L1 - .align 4 -.L1: leave ret -.Lfe1: - .size unk_exp1,.Lfe1-unk_exp1 - .ident "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)" diff --git a/loader/win32.c b/loader/win32.c index 105f8afc1f..323c99b1ad 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -702,12 +702,29 @@ void WINAPI expGetSystemInfo(SYSTEM_INFO* si) cachedsi.wProcessorLevel = 5; /* pentium */ cachedsi.wProcessorRevision = 0x0101; -#if defined(__FreeBSD__) || defined(__NetBSD__) - cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; - cachedsi.wProcessorLevel= 5; - PF[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE; +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__) do_cpuid(regs); - if (regs[3] & 0x00800000) + switch ((regs[0] >> 8) & 0xf) { // cpu family + case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386; + cachedsi.wProcessorLevel= 3; + break; + case 4: cachedsi.dwProcessorType = PROCESSOR_INTEL_486; + cachedsi.wProcessorLevel= 4; + break; + case 5: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; + cachedsi.wProcessorLevel= 5; + break; + case 6: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; + cachedsi.wProcessorLevel= 5; + break; + default:cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; + cachedsi.wProcessorLevel= 5; + break; + } + cachedsi.wProcessorRevision = regs[0] & 0xf; // stepping + if (regs[3] & (1 << 8)) + PF[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE; + if (regs[3] & (1 << 23)) PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE; cachedsi.dwNumberOfProcessors=1; #else |