diff options
| author | Sonicadvance1 <sonicadvance1@gmail.com> | 2008-08-17 03:56:07 +0000 |
|---|---|---|
| committer | Sonicadvance1 <sonicadvance1@gmail.com> | 2008-08-17 03:56:07 +0000 |
| commit | 730d80864d7d2b868c8a759ea20a6f0660c8d353 (patch) | |
| tree | a44a84e45b841a12ea7348cdebc1b3271dfb1f7a /Source/Core/Common/Src/CPUDetect.cpp | |
| parent | d1723cae4aa7a6f6de98e02dcfa70babe5ea1dab (diff) | |
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
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 +}
|
