diff options
| author | NeoBrainX <NeoBrainX@googlemail.com> | 2011-09-12 21:08:18 +0200 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@googlemail.com> | 2011-09-12 21:08:18 +0200 |
| commit | 13ef4fc54ffa40b3ce1e9441e742fc5254cda676 (patch) | |
| tree | 296f51a3eca7ad73e180603defffa344fd8ccd47 /Source/Core/Common/Src/CPUDetect.cpp | |
| parent | 2df4811807ab4a90c3871b8c9f361799adb98f9c (diff) | |
| parent | 854c4903ebf7e5236775699616629cc954f75d32 (diff) | |
Merge remote-tracking branch 'remotes/origin/freebsd-port'
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <config/i386/cpuid.h> #include <xmmintrin.h> +#if defined __FreeBSD__ +#include <sys/types.h> +#include <machine/cpufunc.h> +#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 |
