mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
GCC 4.8 arm EIGEN_OPTIMIZATION_BARRIER fix (#2315).
GCC 4.8 doesn't seem to like the `g` register constraint, failing to compile with "error: 'asm' operand requires impossible reload". Tested `r` instead, and that seems to work, even with latest compilers. Also fixed some minor macro issues to eliminate warnings on armv7. Fixes #2315.
This commit is contained in:
parent
cc3573ab44
commit
ff07a8a639
@ -155,7 +155,7 @@ EIGEN_STRONG_INLINE Packet4f vec4f_unpackhi(const Packet4f& a, const Packet4f& b
|
|||||||
#define EIGEN_ARM_PREFETCH(ADDR) __builtin_prefetch(ADDR);
|
#define EIGEN_ARM_PREFETCH(ADDR) __builtin_prefetch(ADDR);
|
||||||
#elif defined __pld
|
#elif defined __pld
|
||||||
#define EIGEN_ARM_PREFETCH(ADDR) __pld(ADDR)
|
#define EIGEN_ARM_PREFETCH(ADDR) __pld(ADDR)
|
||||||
#elif EIGEN_ARCH_ARM32
|
#elif EIGEN_ARCH_ARM
|
||||||
#define EIGEN_ARM_PREFETCH(ADDR) __asm__ __volatile__ ("pld [%[addr]]\n" :: [addr] "r" (ADDR) : );
|
#define EIGEN_ARM_PREFETCH(ADDR) __asm__ __volatile__ ("pld [%[addr]]\n" :: [addr] "r" (ADDR) : );
|
||||||
#else
|
#else
|
||||||
// by default no explicit prefetching
|
// by default no explicit prefetching
|
||||||
@ -3985,8 +3985,6 @@ template<> EIGEN_STRONG_INLINE Packet2d prsqrt(const Packet2d& a) {
|
|||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet2d psqrt(const Packet2d& _x){ return vsqrtq_f64(_x); }
|
template<> EIGEN_STRONG_INLINE Packet2d psqrt(const Packet2d& _x){ return vsqrtq_f64(_x); }
|
||||||
|
|
||||||
#endif // EIGEN_ARCH_ARM64
|
|
||||||
|
|
||||||
// Do we have an fp16 types and supporting Neon intrinsics?
|
// Do we have an fp16 types and supporting Neon intrinsics?
|
||||||
#if EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
#if EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
||||||
typedef float16x4_t Packet4hf;
|
typedef float16x4_t Packet4hf;
|
||||||
@ -4625,6 +4623,8 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8hf, 8>&
|
|||||||
}
|
}
|
||||||
#endif // end EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
#endif // end EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
|
||||||
|
|
||||||
|
#endif // EIGEN_ARCH_ARM64
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
@ -1131,7 +1131,7 @@ namespace Eigen {
|
|||||||
#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.
|
// General, NEON.
|
||||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,w" (X));
|
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,w" (X));
|
||||||
#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