mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
add check for non x86 platforms, we get a compile error on arm/powerpc without the check
(there is no known -yet- method to get cpuid, without resolving to kernel /sys interface)
This commit is contained in:
parent
1daf9b11ba
commit
1505221263
@ -591,7 +591,7 @@ public:
|
||||
# if defined(__PIC__) && defined(__i386__)
|
||||
# define EIGEN_CPUID(abcd,func,id) \
|
||||
__asm__ __volatile__ ("xchgl %%ebx, %%esi;cpuid; xchgl %%ebx,%%esi": "=a" (abcd[0]), "=S" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func), "c" (id));
|
||||
# else
|
||||
# elif !defined(__arm__) && !defined(__powerpc__)
|
||||
# define EIGEN_CPUID(abcd,func,id) \
|
||||
__asm__ __volatile__ ("cpuid": "=a" (abcd[0]), "=b" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func), "c" (id) );
|
||||
# endif
|
||||
@ -772,6 +772,7 @@ inline void ei_queryCacheSizes(int& l1, int& l2, int& l3)
|
||||
// ||ei_cpuid_is_vendor(abcd,"CentaurHauls")
|
||||
// ||ei_cpuid_is_vendor(abcd,"CentaurHauls")
|
||||
#endif
|
||||
l1 = l2 = l3 = -1;
|
||||
}
|
||||
|
||||
/** \internal
|
||||
|
Loading…
Reference in New Issue
Block a user