mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 00:34:14 +08:00
E2K: initial support of LCC MCST compiler for the Elbrus 2000 CPU architecture
This commit is contained in:
parent
ae86a146b1
commit
f9b7564faa
@ -32,7 +32,7 @@ namespace internal {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((defined EIGEN_VECTORIZE_AVX) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_MINGW) && (__GXX_ABI_VERSION < 1004)) || EIGEN_OS_QNX
|
#if ((defined EIGEN_VECTORIZE_AVX) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_MINGW || EIGEN_COMP_LCC) && (__GXX_ABI_VERSION < 1004)) || EIGEN_OS_QNX
|
||||||
// With GCC's default ABI version, a __m128 or __m256 are the same types and therefore we cannot
|
// With GCC's default ABI version, a __m128 or __m256 are the same types and therefore we cannot
|
||||||
// have overloads for both types without linking error.
|
// have overloads for both types without linking error.
|
||||||
// One solution is to increase ABI version using -fabi-version=4 (or greater).
|
// One solution is to increase ABI version using -fabi-version=4 (or greater).
|
||||||
@ -443,7 +443,7 @@ template<> EIGEN_STRONG_INLINE Packet16b pcmp_eq(const Packet16b& a, const Packe
|
|||||||
template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return por(pcmp_lt(a,b), pcmp_eq(a,b)); }
|
template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return por(pcmp_lt(a,b), pcmp_eq(a,b)); }
|
||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b) {
|
template<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b) {
|
||||||
#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63
|
#if EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC < 63
|
||||||
// There appears to be a bug in GCC, by which the optimizer may
|
// There appears to be a bug in GCC, by which the optimizer may
|
||||||
// flip the argument order in calls to _mm_min_ps, so we have to
|
// flip the argument order in calls to _mm_min_ps, so we have to
|
||||||
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
||||||
@ -462,7 +462,7 @@ template<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
template<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) {
|
template<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) {
|
||||||
#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63
|
#if EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC < 63
|
||||||
// There appears to be a bug in GCC, by which the optimizer may
|
// There appears to be a bug in GCC, by which the optimizer may
|
||||||
// flip the argument order in calls to _mm_min_pd, so we have to
|
// flip the argument order in calls to _mm_min_pd, so we have to
|
||||||
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
||||||
@ -493,7 +493,7 @@ template<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const
|
|||||||
|
|
||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b) {
|
template<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b) {
|
||||||
#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63
|
#if EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC < 63
|
||||||
// There appears to be a bug in GCC, by which the optimizer may
|
// There appears to be a bug in GCC, by which the optimizer may
|
||||||
// flip the argument order in calls to _mm_max_ps, so we have to
|
// flip the argument order in calls to _mm_max_ps, so we have to
|
||||||
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
// resort to inline ASM here. This is supposed to be fixed in gcc6.3,
|
||||||
|
@ -1203,7 +1203,7 @@ struct lhs_process_one_packet
|
|||||||
traits.madd(*A0, *rhs_panel, *C1, *T0, fix<1>);
|
traits.madd(*A0, *rhs_panel, *C1, *T0, fix<1>);
|
||||||
traits.madd(*A0, *rhs_panel, *C2, *T0, fix<2>);
|
traits.madd(*A0, *rhs_panel, *C2, *T0, fix<2>);
|
||||||
traits.madd(*A0, *rhs_panel, *C3, *T0, fix<3>);
|
traits.madd(*A0, *rhs_panel, *C3, *T0, fix<3>);
|
||||||
#if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE)
|
#if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE) && !(EIGEN_COMP_LCC)
|
||||||
__asm__ ("" : "+x,m" (*A0));
|
__asm__ ("" : "+x,m" (*A0));
|
||||||
#endif
|
#endif
|
||||||
EIGEN_ASM_COMMENT("end step of gebp micro kernel 1X4");
|
EIGEN_ASM_COMMENT("end step of gebp micro kernel 1X4");
|
||||||
@ -1729,7 +1729,7 @@ void gebp_kernel<LhsScalar,RhsScalar,Index,DataMapper,mr,nr,ConjugateLhs,Conjuga
|
|||||||
|
|
||||||
// NOTE: the begin/end asm comments below work around bug 935!
|
// NOTE: the begin/end asm comments below work around bug 935!
|
||||||
// but they are not enough for gcc>=6 without FMA (bug 1637)
|
// but they are not enough for gcc>=6 without FMA (bug 1637)
|
||||||
#if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE)
|
#if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE) && !(EIGEN_COMP_LCC)
|
||||||
#define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND __asm__ ("" : [a0] "+x,m" (A0),[a1] "+x,m" (A1));
|
#define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND __asm__ ("" : [a0] "+x,m" (A0),[a1] "+x,m" (A1));
|
||||||
#else
|
#else
|
||||||
#define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND
|
#define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND
|
||||||
|
@ -236,9 +236,16 @@
|
|||||||
#define EIGEN_COMP_CLANGCPE 0
|
#define EIGEN_COMP_CLANGCPE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// \internal EIGEN_COMP_LCC set to 1 if the compiler is MCST-LCC (MCST eLbrus Compiler Collection)
|
||||||
|
#if defined(__LCC__) && defined(__MCST__)
|
||||||
|
#define EIGEN_COMP_LCC (__LCC__*100+__LCC_MINOR__)
|
||||||
|
#else
|
||||||
|
#define EIGEN_COMP_LCC 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/// \internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)
|
/// \internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)
|
||||||
#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || EIGEN_COMP_CLANGFCC || EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE)
|
#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || EIGEN_COMP_CLANGFCC || EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE || EIGEN_COMP_LCC)
|
||||||
#define EIGEN_COMP_GNUC_STRICT 1
|
#define EIGEN_COMP_GNUC_STRICT 1
|
||||||
#else
|
#else
|
||||||
#define EIGEN_COMP_GNUC_STRICT 0
|
#define EIGEN_COMP_GNUC_STRICT 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user