Re: [eigen] Building eigen in non x86/amd64/ppc archs |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Building eigen in non x86/amd64/ppc archs
- From: Jose Luis Blanco <joseluisblancoc@xxxxxxxxx>
- Date: Mon, 27 Dec 2010 16:57:59 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=BHIf660E911rBea88dAsX1W5gFoHPaSW9RACC7gKBeM=; b=K0o1mxWv450QTAnhq+Cae+MS7zQo0DzJrdlgAt3p0YuKtQ7NuR/OMISzqYb/lX3XmR H2evbASc9hstAtt7wNCPiT1GAdO/oFRNqMJc9fgnU0WxWSfYe82qJmQISunzpR2WThCN C9XBwfu6P4xFAM1mdY3fTagkYV4/QdRl2TnK0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Pw/AdK4Q3O3TSIN9dEYA0hJiQobgRefQDdzuU1lUKQK7wi8EZgnRl8qu8iqx8GuDSl phYTVxOp/F3MDwdsG+wBc7ANN9kIZ1q2F/ADPnhblJmVuryDtlAqOqOatAiAPH4SLNtW Yfetg1XT4q5NUYfnVQC8LewOb8RLP3/MPro50=
On Mon, Dec 27, 2010 at 9:05 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> So, patches welcome!
OK. I can confirm you that changing just this single line:
==========================
--- eigen3/Eigen/src/Core/util/Memory.h
+++ eigen3/Eigen/src/Core/util/Memory.h
@@ -601,7 +601,7 @@
# 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));
-# elif !defined(__arm__) && !defined(__powerpc__)
+# elif !defined(__arm__) && !defined(__powerpc__) &&
!defined(__mips__) && !defined(__sparc__) && !defined(__sh__) &&
!defined(__s390__) && !defined(__m68k__) && !defined(__ia64__) &&
!defined(__hppa__)
# 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
==========================
fixes the compilation under MIPS, and hopefully in the rest of
platforms (if you're interested, I'll let you know if it's really the
case, but building one single file in a MIPS emulator took me ~30mins,
so it'll take days!!!).
Please, apply that patch upstream. You can also replace all those "&&
!defined()" by a few "|| define()" if you are sure on which platforms
cpuid works... (x86 & x86_64?).
Thanks and... have a happy new year!
JL