Skip to content

Commit

Permalink
Merge pull request #8456 from davidlt/extvect-enable-long-double-vect…
Browse files Browse the repository at this point in the history
…ors-aarch64

ExtVec.h: add long double x2 x4 in ExtVecTraits for AArch64
  • Loading branch information
davidlange6 committed Mar 23, 2015
2 parents 0751c6c + fe1c2a1 commit 41769a2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions DataFormats/Math/interface/ExtVec.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ typedef double VECTOR_EXT( 16 ) float64x2_t;
typedef double VECTOR_EXT( 32 ) float64x4_t;
typedef double VECTOR_EXT( 64 ) float64x8_t;

// Enable only for AArch64 for now as this would ICE GCC on
// x86_64.
// XXX: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65486
// XXX: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65491
#if defined(__aarch64__)
typedef long double VECTOR_EXT( 32 ) float128x2_t;
typedef long double VECTOR_EXT( 64 ) float128x4_t;
typedef long double VECTOR_EXT( 128 ) float128x8_t;
#endif

// template<typename T, int N> using ExtVec = T __attribute__( ( vector_size( N*sizeof(T) ) ) );

template<typename T, int N>
Expand Down Expand Up @@ -43,6 +53,21 @@ struct ExtVecTraits<double, 4> {
typedef double VECTOR_EXT( 4*sizeof(double) ) type;
};

// Enable only for AArch64 for now as this would ICE GCC on
// x86_64.
// XXX: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65486
// XXX: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65491
#if defined(__aarch64__)
template<>
struct ExtVecTraits<long double, 2> {
typedef long double VECTOR_EXT( 2*sizeof(long double) ) type;
};

template<>
struct ExtVecTraits<long double, 4> {
typedef long double VECTOR_EXT( 4*sizeof(long double) ) type;
};
#endif

template<typename T, int N> using ExtVec = typename ExtVecTraits<T,N>::type;

Expand Down

0 comments on commit 41769a2

Please sign in to comment.