Re: [eigen] Building eigen in non x86/amd64/ppc archs

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Thomas,

Yes, a list of positive checks is clearly a better solution.
But, wouldn't amd64 be also included (it seems __i386__ is not defined
in amd64 archs)??  [1]
Just like your code, but changing the first line:

#if defined(__GNUC__) && ( defined(__i386__) || defined(__amd64__) )
# if defined(__PIC__)
# 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
# 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
#elif defined(_MSC_VER)
# if (_MSC_VER > 1500) /* newer than MSVC++ 9.0 */ || (_MSC_VER ==
1500 && _MSC_FULL_VER >= 150030729) /* MSVC++ 9.0 with SP1*/
# define EIGEN_CPUID(abcd,func,id) __cpuidex((int*)abcd,func,id)
# endif
#endif


In any case, I'll try to build a small test under MIPS with this
latest patch and I'll confirm if it works there.

JL

[1] http://predef.sourceforge.net/prearch.html



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/