mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-08 17:59:00 +08:00
Port EIGEN_OPTIMIZATION_BARRIER to soft float arm
This commit is contained in:
parent
937c3d73cb
commit
fb05198bdd
@ -1002,11 +1002,17 @@ namespace Eigen {
|
|||||||
// General, Altivec, VSX.
|
// General, Altivec, VSX.
|
||||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,v,wa" (X));
|
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,v,wa" (X));
|
||||||
#elif EIGEN_ARCH_ARM_OR_ARM64
|
#elif EIGEN_ARCH_ARM_OR_ARM64
|
||||||
// General, NEON.
|
#ifdef __ARM_FP
|
||||||
|
// General, VFP or NEON.
|
||||||
// Clang doesn't like "r",
|
// Clang doesn't like "r",
|
||||||
// error: non-trivial scalar-to-vector conversion, possible invalid
|
// error: non-trivial scalar-to-vector conversion, possible invalid
|
||||||
// constraint for vector typ
|
// constraint for vector typ
|
||||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,w" (X));
|
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,w" (X));
|
||||||
|
#else
|
||||||
|
// Arm without VFP or NEON.
|
||||||
|
// "w" constraint will not compile.
|
||||||
|
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g" (X));
|
||||||
|
#endif
|
||||||
#elif EIGEN_ARCH_i386_OR_x86_64
|
#elif EIGEN_ARCH_i386_OR_x86_64
|
||||||
// General, SSE.
|
// General, SSE.
|
||||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,x" (X));
|
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,x" (X));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user