1 --- FRAMEWAVE_1.3.1_SRC/Framewave/domain/fwBase/src/system.cpp.orig 2009-07-09 11:15:36.000000000 +0200
2 +++ FRAMEWAVE_1.3.1_SRC/Framewave/domain/fwBase/src/system.cpp 2017-04-15 12:04:33.188802940 +0200
3 @@ -18,6 +18,8 @@ void * x_baseDataPtr = 0;
4 #pragma intrinsic(__cpuid)
5 #pragma intrinsic(__rdtsc)
7 + #define get_cpuid __cpuid
9 static inline __int64 get_rdtsc_sys()
12 @@ -35,37 +37,8 @@ void * x_baseDataPtr = 0;
14 #elif defined( FW_LIN ) || defined( FW_MAC )
17 - #if defined( FW_SYS64 )
19 - #define __cpuid(CPUInfo, InfoType) __asm__ __volatile__(" pushq %%rbx; \
20 - xorq %%rax, %%rax; \
21 - movl %%esi, %%eax; \
23 - movl %%eax, 0x0(%%rdi); \
24 - movl %%ebx, 0x4(%%rdi); \
25 - movl %%ecx, 0x8(%%rdi); \
26 - movl %%edx, 0xc(%%rdi); \
28 - : : "D" (CPUInfo), "S" (InfoType) \
29 - : "%rax", "%rcx", "%rdx" )
31 - #elif defined( FW_SYS32 )
33 - #define __cpuid(CPUInfo, InfoType) __asm__ __volatile__(" pushl %%ebx; \
34 - xorl %%eax, %%eax; \
35 - movl %%esi, %%eax; \
37 - movl %%eax, 0x0(%%edi); \
38 - movl %%ebx, 0x4(%%edi); \
39 - movl %%ecx, 0x8(%%edi); \
40 - movl %%edx, 0xc(%%edi); \
42 - : : "D" (CPUInfo), "S" (InfoType) \
43 - : "%eax", "%ecx", "%edx" )
48 + #define get_cpuid(CPUInfo, InfoType) __cpuid(InfoType, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3])
50 #define rdtsc(low,high) __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
52 @@ -127,7 +100,7 @@ void * x_baseDataPtr = 0;
56 - #define __cpuid cpuid64
57 + #define get_cpuid cpuid64
59 #elif defined( FW_SYS32 )
61 @@ -157,7 +130,7 @@ void * x_baseDataPtr = 0;
65 - #define __cpuid cpuid32
66 + #define get_cpuid cpuid32
70 @@ -215,7 +188,7 @@ template< class T > unsigned MSBPos()
71 FwCpuType GetCpuType()
74 - __cpuid( out, CPUID_CODE_FEATURES );
75 + get_cpuid( out, CPUID_CODE_FEATURES );
77 if( IsSet( out[CPUID_INDEX_SSE4A ], CPUID_BIT_SSE4A)) return fwCpuFamily10h;
78 if( IsSet( out[CPUID_INDEX_SSE3 ], CPUID_BIT_SSE3 )) return fwCpuSSE3;