From 730d80864d7d2b868c8a759ea20a6f0660c8d353 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Sun, 17 Aug 2008 03:56:07 +0000 Subject: Mostly fix for OGL plugin, putting it's shaders in the right place, few other bugs here and there though. Fix for CPU detect and removed a quick hack to reduce underflows in the HLE plugin. Added AA for Linux, but may be only usable by ATI/Intel cards or Opensource drivers git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@231 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CPUDetect.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/Src/CPUDetect.cpp') diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index d11a9fbe18..bbcee7c9eb 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -26,7 +26,14 @@ // if you are on linux and this doesn't build, plz fix :) static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) -{ +{ + #ifdef __linux__ + __asm__("cpuid" + : "=a" (*eax), + "=b" (*ebx), + "=c" (*ecx), + "=d" (*edx)); + #else // Note: EBX is reserved on Mac OS X, so it has to be restored at the end // of the asm block. __asm__( @@ -38,6 +45,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "=r" (*ebx), "=c" (*ecx), "=d" (*edx)); + #endif } void __cpuid(int info[4], int x) @@ -174,4 +182,4 @@ std::string CPUInfo::Summarize() if (bLongMode) sum += ", 64-bit support"; sum += " (wrong? report)"; return sum; -} \ No newline at end of file +} -- cgit v1.2.3