From 06e640532aa093902e81f09aa18de1b084fcc5ce Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 27 Aug 2011 20:42:11 +0200 Subject: Various changes which improve FreeBSD support. Patches by martymac, all credits go to him ;) --- Source/Core/Common/Src/CPUDetect.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (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 810c5d2a59..7c231b0a69 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -32,6 +32,10 @@ //#include #include +#if defined __FreeBSD__ +#include +#include +#else static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { @@ -65,15 +69,20 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, ); #endif } +#endif /* defined __FreeBSD__ */ static void __cpuid(int info[4], int x) { +#if defined __FreeBSD__ + do_cpuid((unsigned int)x, (unsigned int*)info); +#else unsigned int eax = x, ebx = 0, ecx = 0, edx = 0; do_cpuid(&eax, &ebx, &ecx, &edx); info[0] = eax; info[1] = ebx; info[2] = ecx; info[3] = edx; +#endif } #endif -- cgit v1.2.3