compile fixes for vsc port

This commit is contained in:
Vectorcamp 2021-10-06 06:23:46 -04:00 committed by apostolos
parent 90d3db1776
commit 2231f7c024
7 changed files with 208 additions and 127 deletions

View File

@ -695,6 +695,10 @@ elseif (ARCH_ARM32 OR ARCH_AARCH64)
set (hs_exec_SRCS
${hs_exec_SRCS}
src/util/supervector/arch/arm/impl.cpp)
elseif (ARCH_PPC64EL)
set (hs_exec_SRCS
${hs_exec_SRCS}
src/util/supervector/arch/ppc64el/impl.cpp)
endif ()
endif()

View File

@ -893,10 +893,10 @@ do { \
#define CONFIRM_TEDDY(var, bucket, offset, reason, conf_fn) \
do { \
if (unlikely(diff128(var, ones128()))) { \
u64a __attribute__((aligned(16))) vector[2]; \
store128(vector, var); \
u64a lo = vector[0]; \
u64a hi = vector[1]; \
u64a __attribute__((aligned(16))) vec[2]; \
store128(vec, var); \
u64a lo = vec[0]; \
u64a hi = vec[1]; \
CONF_CHUNK_64(lo, bucket, offset, reason, conf_fn); \
CONF_CHUNK_64(hi, bucket, offset + 8, reason, conf_fn); \
} \

View File

@ -44,5 +44,7 @@ hs_error_t HS_CDECL hs_valid_platform(void) {
}
#elif defined(ARCH_ARM32) || defined(ARCH_AARCH64)
return HS_SUCCESS;
#elif defined(ARCH_PPC64EL)
return HS_SUCCESS;
#endif
}

View File

@ -36,6 +36,7 @@
#if defined(__VSX__) && defined(ARCH_PPC64EL)
#define HAVE_VSX
#define HAVE_SIMD_128_BITS
#define VECTORSIZE 16
#endif
#endif // UTIL_ARCH_ARM_H_

View File

@ -52,7 +52,8 @@ typedef __vector uint8_t uint8x16_t;
typedef __vector int8_t int8x16_t;
static really_inline m128 ones128(void) {
return (m128) vec_splat_s8(0xFF);
// the value in function must be a signed literal in range -16 to 15
return (m128) vec_splat_s8(-1);
}
static really_inline m128 zeroes128(void) {
@ -61,9 +62,8 @@ static really_inline m128 zeroes128(void) {
/** \brief Bitwise not for m128*/
static really_inline m128 not128(m128 a) {
//return (m128)vec_xor(a, a);
return (m128) vec_xor(a,ones128());
// or
return (m128)vec_xor(a, a);
}
/** \brief Return 1 if a and b are different otherwise 0 */
@ -116,43 +116,40 @@ m128 sub_2x64(m128 a, m128 b) {
}
static really_really_inline
m128 lshift_m128(m128 a, unsigned b) {
//return (m128) vshlq_n_s32((int64x2_t)a, b);
return (m128) vec_sl((int64x2_t)a, b);
// or
// return (m128) vec_sll((int64x2_t)a, b);
// the above command executes Left shifts an entire vector by a given number of bits.
m128 lshift_m128(m128 a, unsigned UNUSED b) {
// #warning FIXME
// b must be 4 bit literal
return (m128) vec_sld(a, zeroes128(), 0);
}
static really_really_inline
m128 rshift_m128(m128 a, unsigned b) {
//return (m128) vshrq_n_s32((int64x2_t)a, b);
return (m128) vec_srl((int64x2_t)a, b);
// or
// return (m128) vec_srl((int64x2_t)a, b);
// the above command executes Right shifts an entire vector by a given number of bits.
m128 rshift_m128(m128 a, unsigned UNUSED b) {
// #warning FIXME
// b must be 4 bit literal
return (m128) vec_sld(zeroes128(), a, 0 - 0);
}
static really_really_inline
m128 lshift64_m128(m128 a, unsigned b) {
return (m128) vec_sldw ((int64x2_t)a, b, 8);
m128 lshift64_m128(m128 a, unsigned UNUSED b) {
// #warnint FIXME
// b must be 4 bit literal
return (m128) vec_sld(zeroes128(), a, 0);
}
static really_really_inline
m128 rshift64_m128(m128 a, unsigned b) {
//return (m128) vshrq_n_s64((int64x2_t)a, b);
#warning FIXME
m128 rshift64_m128(m128 a, unsigned UNUSED b) {
// warnint FIXME
// b must be 4 bit literal
return (m128) vec_sld(zeroes128(), a, 0);
}
static really_inline m128 eq128(m128 a, m128 b) {
return (m128) vec_all_eq((uint64x2_t)a, (uint64x2_t)b);
//or
//return (m128) vec_cmpeq((uint64x2_t)a, (uint64x2_t)b);
return (m128) vec_cmpeq((uint8x16_t)a, (uint8x16_t)b);
}
static really_inline m128 eq64_m128(m128 a, m128 b) {
//return (m128) vceqq_u64((int64x2_t)a, (int64x2_t)b);
#warning FIXME
return (m128) vec_cmpeq((uint64x2_t)a, (uint64x2_t)b);
}
@ -168,39 +165,46 @@ static really_inline u32 movemask128(m128 a) {
//uint16_t output;
//vst1q_lane_u16((uint16_t*)&output, (uint16x8_t)mask, 0);
//return output;
#warning FIXME
// #warning FIXME
return !!diff128(a, zeroes128());
}
static really_inline m128 set1_16x8(u8 c) {
//return (m128) vdupq_n_u8(c);
return (m128) vec_splat_u8(c);
static really_inline m128 set1_16x8(u8 UNUSED c) {
// warning FIXME
// c must be 5 bit literal
// a solution is to use vec_splats
//return (m128) vec_splat_u8(0);
return (m128) vec_splats(c);
}
static really_inline m128 set1_4x32(u32 c) {
//return (m128) vdupq_n_u32(c);
return (m128) vec_splat_u32(c);
static really_inline m128 set1_4x32(u32 UNUSED c) {
// warning FIXME
// c must be 5 bit literal
// a solution is to use vec_splats
// return (m128) vec_splat_u32(0);
return (m128) vec_splats(c);
}
static really_inline m128 set1_2x64(u64a c) {
//return (m128) vdupq_n_u64(c);
return (m128) vec_splat_u64(c);
return (m128) vec_splats(c);
}
static really_inline u32 movd(const m128 in) {
//return vgetq_lane_u32((uint32x4_t) in, 0);
#warning FIXME
return !!diff128(in, zeroes128());
// #warning FIXME
}
static really_inline u64a movq(const m128 in) {
//return vgetq_lane_u64((uint64x2_t) in, 0);
#warning FIXME
return !!diff128(in, zeroes128());
// #warning FIXME
}
/* another form of movq */
static really_inline
m128 load_m128_from_u64a(const u64a *p) {
//return (m128) vsetq_lane_u64(*p, zeroes128(), 0);
#warning FIXME
return (m128) vec_ld(0,p);
}
@ -228,7 +232,8 @@ static really_inline u32 extract32from128(const m128 in, unsigned imm) {
}
#endif
*/
#warning FIXME
// #warning FIXME
return vec_any_ne(in,lshift_m128(in,imm));
}
static really_inline u64a extract64from128(const m128 in, unsigned imm) {
@ -249,17 +254,20 @@ static really_inline u64a extract64from128(const m128 in, unsigned imm) {
}
#endif
*/
#warning FIXME
// #warning FIXME
return vec_any_ne(in,lshift_m128(in,imm));
}
static really_inline m128 low64from128(const m128 in) {
//return vcombine_u64(vget_low_u64(in), vdup_n_u64(0));
#warning FIXME
// #warning FIXME
return in;
}
static really_inline m128 high64from128(const m128 in) {
//return vcombine_u64(vget_high_u64(in), vdup_n_u64(0));
#warning FIXME
// #warning FIXME
return in;
}
@ -289,29 +297,28 @@ static really_inline m128 andnot128(m128 a, m128 b) {
// aligned load
static really_inline m128 load128(const void *ptr) {
assert(ISALIGNED_N(ptr, alignof(m128)));
//return (m128) vld1q_s32((const int32_t *)ptr);
//return *(int64x2_t *) (&ptr[0]);
#warning FIXME
//return (m128) vec_ld(0, ptr);
// #warning FIXME
return zeroes128();
}
// aligned store
static really_inline void store128(void *ptr, m128 a) {
//assert(ISALIGNED_N(ptr, alignof(m128)));
//vst1q_s32((int32_t *)ptr, a);
#warning FIXME
static really_inline void store128(void *ptr, m128 UNUSED a) {
assert(ISALIGNED_N(ptr, alignof(m128)));
//vec_st(a, 0, ptr);
// warning FIXME
}
// unaligned load
static really_inline m128 loadu128(const void *ptr) {
//return (m128) vld1q_s32((const int32_t *)ptr);
//return *(uint64x2_t *) (&ptr[0]);
#warning FIXME
static really_inline m128 loadu128(const void UNUSED *ptr) {
//return (m128) vec_ld(0, ptr);
// #warning FIXME
return zeroes128();
}
// unaligned store
static really_inline void storeu128(void *ptr, m128 a) {
//vst1q_s32((int32_t *)ptr, a);
#warning FIXME
static really_inline void storeu128(void UNUSED *ptr, m128 UNUSED a) {
// #warning FIXME
}
// packed unaligned store of first N bytes
@ -331,10 +338,11 @@ m128 loadbytes128(const void *ptr, unsigned int n) {
}
#define CASE_ALIGN_VECTORS(a, b, offset) case offset: return (m128)vextq_s8((int8x16_t)(a), (int8x16_t)(b), (offset)); break;
//#define CASE_ALIGN_VECTORS(a, b, offset) case offset: return (m128)vextq_s8((int8x16_t)(a), (int8x16_t)(b), (offset)); break;
static really_really_inline
m128 palignr_imm(m128 r, m128 l, int offset) {
/*
switch (offset) {
case 0: return l; break;
CASE_ALIGN_VECTORS(l, r, 1);
@ -357,6 +365,9 @@ m128 palignr_imm(m128 r, m128 l, int offset) {
return zeroes128();
break;
}
*/
// #warning FIXME
return (m128) vec_cmpeq(r,lshift_m128(l,offset));
}
static really_really_inline
@ -368,21 +379,24 @@ m128 palignr(m128 r, m128 l, int offset) {
return palignr_imm(r, l, offset);
#endif
*/
#warning FIXME
// #warning FIXME
return (m128) vec_cmpeq(r, lshift_m128(l,offset));
}
#undef CASE_ALIGN_VECTORS
static really_really_inline
m128 rshiftbyte_m128(m128 a, unsigned b) {
//return palignr(zeroes128(), a, b);
#warning FIXME
// #warning FIXME
// return vec_sro(a,b);
return rshift_m128(a,b);
}
static really_really_inline
m128 lshiftbyte_m128(m128 a, unsigned b) {
//return palignr(a, zeroes128(), 16 - b);
#warning FIXME
//#warning FIXME
//return vec_slo(a,b);
return lshift_m128(a,b);
}
static really_inline
@ -395,7 +409,8 @@ m128 variable_byte_shift_m128(m128 in, s32 amount) {
m128 shift_mask = palignr_imm(vbs_mask, outside_mask, 16 - amount);
return vqtbl1q_s8(in, shift_mask);
*/
#warning FIXME
// #warning FIXME
return lshift_m128(in,amount);
}
#ifdef __cplusplus
@ -440,7 +455,8 @@ m128 pshufb_m128(m128 a, m128 b) {
btranslated is the version that is converted from Intel to NEON. */
//int8x16_t btranslated = vandq_s8((int8x16_t)b,vdupq_n_s8(0x8f));
//return (m128)vqtbl1q_s8((int8x16_t)a, (uint8x16_t)btranslated);
#warning FIXME
// #warning FIXME
return (m128) vec_max((int8x16_t)a, (int8x16_t)b);
}
static really_inline
@ -464,17 +480,19 @@ m128 sub_u8_m128(m128 a, m128 b) {
}
static really_inline
m128 set4x32(u32 x3, u32 x2, u32 x1, u32 x0) {
m128 set4x32(u32 UNUSED x3, u32 UNUSED x2, u32 UNUSED x1, u32 UNUSED x0) {
//uint32_t ALIGN_ATTR(16) data[4] = { x0, x1, x2, x3 };
//return (m128) vld1q_u32((uint32_t *) data);
#warning FIXME
//return (m128) vec_splat_u32(data);
// #warning FIXME
return zeroes128();
}
static really_inline
m128 set2x64(u64a hi, u64a lo) {
m128 set2x64(u64a UNUSED hi, u64a UNUSED lo) {
//uint64_t ALIGN_ATTR(16) data[2] = { lo, hi };
//return (m128) vld1q_u64((uint64_t *) data);
#warning FIXME
//return (m128) vec_splats(data);
// #warning FIXME
return zeroes128();
}
#endif // ARCH_PPC64EL_SIMD_UTILS_H

View File

@ -37,6 +37,7 @@
#include "util/arch.h"
#include "util/unaligned.h"
#include "util/supervector/supervector.hpp"
#include <iostream>
// 128-bit Powerpc64le implementation
@ -57,7 +58,8 @@ template<>
really_inline SuperVector<16>::SuperVector<int8_t>(int8_t const other)
{
//u.v128[0] = _mm_set1_epi8(other);
u.v128[0] = vec_splat_s8(other);
//u.v128[0] = vec_splat_s8(other);
std::cout<<other<<std::endl;
}
template<>
@ -65,7 +67,8 @@ template<>
really_inline SuperVector<16>::SuperVector<uint8_t>(uint8_t const other)
{
//u.v128[0] = _mm_set1_epi8(static_cast<int8_t>(other));
u.v128[0] = vec_splat_s8(static_cast<int8_t>(other));
//u.v128[0] = vec_splat_s8(static_cast<int8_t>(other));
std::cout<<other<<std::endl;
}
template<>
@ -73,7 +76,8 @@ template<>
really_inline SuperVector<16>::SuperVector<int16_t>(int16_t const other)
{
//u.v128[0] = _mm_set1_epi16(other);
u.v128[0] = vec_splat_s16(other);
//u.v128[0] = vec_splat_s16(other);
std::cout<<other<<std::endl;
}
template<>
@ -81,7 +85,8 @@ template<>
really_inline SuperVector<16>::SuperVector<uint16_t>(uint16_t const other)
{
//u.v128[0] = _mm_set1_epi16(static_cast<int16_t>(other));
u.v128[0] = vec_splat_s16(static_cast<int8_t>(other));
//u.v128[0] = vec_splat_s16(static_cast<int8_t>(other));
std::cout<<other<<std::endl;
}
template<>
@ -89,7 +94,8 @@ template<>
really_inline SuperVector<16>::SuperVector<int32_t>(int32_t const other)
{
//u.v128[0] = _mm_set1_epi32(other);
u.v128[0] = vec_splat_s32(other);
//u.v128[0] = vec_splat_s32(other);
std::cout<<other<<std::endl;
}
template<>
@ -97,7 +103,8 @@ template<>
really_inline SuperVector<16>::SuperVector<uint32_t>(uint32_t const other)
{
//u.v128[0] = _mm_set1_epi32(static_cast<int32_t>(other));
u.v128[0] = vec_splat_s32(static_cast<int8_t>(other));
//u.v128[0] = vec_splat_s32(static_cast<int8_t>(other));
std::cout<<other<<std::endl;
}
template<>
@ -105,7 +112,8 @@ template<>
really_inline SuperVector<16>::SuperVector<int64_t>(int64_t const other)
{
//u.v128[0] = _mm_set1_epi64x(other);
u.v128[0] = vec_splat_u64(other);
//u.v128[0] = vec_splat_u64(other);
std::cout<<other<<std::endl;
}
template<>
@ -113,7 +121,8 @@ template<>
really_inline SuperVector<16>::SuperVector<uint64_t>(uint64_t const other)
{
//u.v128[0] = _mm_set1_epi64x(static_cast<int64_t>(other));
u.v128[0] = vec_splat_u32(static_cast<int8_t>(other));
//u.v128[0] = vec_splat_u32(static_cast<int8_t>(other));
std::cout<<other<<std::endl;
}
// Constants
@ -121,14 +130,14 @@ template<>
really_inline SuperVector<16> SuperVector<16>::Ones(void)
{
//return {_mm_set1_epi8(0xFF)};
return {vec_splat_s8(0xFF)};
return {(m128) vec_splat_s8(1)};
}
template<>
really_inline SuperVector<16> SuperVector<16>::Zeroes(void)
{
//return {_mm_set1_epi8(0)};
return {vec_splat_s8(0)};
return {(m128) vec_splat_s8(0)};
}
// Methods
@ -150,21 +159,22 @@ template <>
really_inline SuperVector<16> SuperVector<16>::operator|(SuperVector<16> const &b) const
{
//return {_mm_or_si128(u.v128[0], b.u.v128[0])};
return {vec_or(u.v128[0], b.u.v128[0]);}
return {vec_or(u.v128[0], b.u.v128[0])};
}
template <>
really_inline SuperVector<16> SuperVector<16>::operator^(SuperVector<16> const &b) const
{
//return {_mm_xor_si128(u.v128[0], b.u.v128[0])};
return {vec_xor(u.v128[0], b.u.v128[0]);}
return {vec_xor(u.v128[0], b.u.v128[0])};
}
template <>
really_inline SuperVector<16> SuperVector<16>::opandnot(SuperVector<16> const &b) const
{
//return {_mm_andnot_si128(u.v128[0], b.u.v128[0])};
#warning FIXME
m128 and_res = vec_and(u.v128[0], b.u.v128[0]);
return vec_xor(and_res,and_res);
}
template <>
@ -187,7 +197,8 @@ really_inline typename SuperVector<16>::movemask_type SuperVector<16>::movemask(
//uint16_t output;
//vst1q_lane_u16((uint16_t*)&output, (uint16x8_t)mask, 0);
//return output;
#warning FIXME
//#warning FIXME
return 0;
}
template <>
@ -199,45 +210,54 @@ really_inline typename SuperVector<16>::movemask_type SuperVector<16>::eqmask(Su
template <>
really_inline SuperVector<16> SuperVector<16>::rshift128_var(uint8_t const N) const
{
/*
switch(N) {
case 1: return {vec_srl(u.v128[0], 1)}; break;
case 2: return {vec_srl(u.v128[0], 2)}; break;
case 3: return {vec_srl(u.v128[0], 3)}; break;
case 4: return {vec_srl(u.v128[0], 4)}; break;
case 5: return {vec_srl(u.v128[0], 5)}; break;
case 6: return {vec_srl(u.v128[0], 6)}; break;
case 7: return {vec_srl(u.v128[0], 7)}; break;
case 8: return {vec_srl(u.v128[0], 8)}; break;
case 9: return {vec_srl(u.v128[0], 9)}; break;
case 10: return {vec_srl(u.v128[0], 10)}; break;
case 11: return {vec_srl(u.v128[0], 11)}; break;
case 12: return {vec_srl(u.v128[0], 12)}; break;
case 13: return {vec_srl(u.v128[0], 13)}; break;
case 14: return {vec_srl(u.v128[0], 14)}; break;
case 15: return {vec_srl(u.v128[0], 15)}; break;
case 1: return {vec_srl(u.v128[0], Zeroes(), 1)}; break;
case 2: return {vec_srl(u.v128[0], Zeroes(), 2)}; break;
case 3: return {vec_srl(u.v128[0], Zeroes(),3)}; break;
case 4: return {vec_srl(u.v128[0], Zeroes(),4)}; break;
case 5: return {vec_srl(u.v128[0], Zeroes(),5)}; break;
case 6: return {vec_srl(u.v128[0], Zeroes(),6)}; break;
case 7: return {vec_srl(u.v128[0], Zeroes(),7)}; break;
case 8: return {vec_srl(u.v128[0], Zeroes(),8)}; break;
case 9: return {vec_srl(u.v128[0], Zeroes(),9)}; break;
case 10: return {vec_srl(u.v128[0], Zeroes(),10)}; break;
case 11: return {vec_srl(u.v128[0], Zeroes(),11)}; break;
case 12: return {vec_srl(u.v128[0], Zeroes(),12)}; break;
case 13: return {vec_srl(u.v128[0], Zeroes(),13)}; break;
case 14: return {vec_srl(u.v128[0], Zeroes(),14)}; break;
case 15: return {vec_srl(u.v128[0], Zeroes(),15)}; break;
case 16: return Zeroes(); break;
default: break;
}
return *this;
*/
std::cout<<N<<std::endl;
return Zeroes();
}
#ifdef HS_OPTIMIZE
template <>
really_inline SuperVector<16> SuperVector<16>::operator>>(uint8_t const N) const
{
return {vec_srl(u.v128[0], N)};
//return {vec_srl(u.v128[0], N)};
std::cout<<N<<std::endl;
return Zeroes();
}
#else
template <>
really_inline SuperVector<16> SuperVector<16>::operator>>(uint8_t const N) const
{
return rshift128_var(N);
//return rshift128_var(N);
std::cout<<N<<std::endl;
return Zeroes();
}
#endif
template <>
really_inline SuperVector<16> SuperVector<16>::lshift128_var(uint8_t const N) const
{
/*
switch(N) {
case 1: return {vec_sll(u.v128[0], 1)}; break;
case 2: return {vec_sll(u.v128[0], 2)}; break;
@ -258,19 +278,26 @@ really_inline SuperVector<16> SuperVector<16>::lshift128_var(uint8_t const N) co
default: break;
}
return *this;
*/
std::cout<<N<<std::endl;
return Zeroes();
}
#ifdef HS_OPTIMIZE
template <>
really_inline SuperVector<16> SuperVector<16>::operator<<(uint8_t const N) const
{
return {vec_sll(u.v128[0], N)};
//return {vec_sll(u.v128[0], N)};
std::cout<<N<<std::endl;
return Zeroes();
}
#else
template <>
really_inline SuperVector<16> SuperVector<16>::operator<<(uint8_t const N) const
{
return lshift128_var(N);
//return lshift128_var(N);
std::cout<<N<<std::endl;
return Zeroes();
}
#endif
@ -278,7 +305,9 @@ template <>
really_inline SuperVector<16> SuperVector<16>::loadu(void const *ptr)
{
//return _mm_loadu_si128((const m128 *)ptr);
#warning FIXME
//#warning FIXME
std::cout<<ptr<<std::endl;
return Zeroes();
}
template <>
@ -289,7 +318,9 @@ really_inline SuperVector<16> SuperVector<16>::load(void const *ptr)
//return _mm_load_si128((const m128 *)ptr);
//assert(ISALIGNED_N(ptr, alignof(m128)));
//return vld1q_s32((const int32_t *)ptr);
#warning FIXME
//#warning FIXME
std::cout<<ptr<<std::endl;
return Zeroes();
}
template <>
@ -300,7 +331,20 @@ really_inline SuperVector<16> SuperVector<16>::loadu_maskz(void const *ptr, uint
//SuperVector<16> v = vld1q_s32((const int32_t *)ptr);
//v.print8("v");
//return mask & v;
#warning FIXME
//#warning FIXME
std::cout<<len<<std::endl;
std::cout<<ptr<<std::endl;
return Zeroes();
}
template<>
really_inline SuperVector<16> SuperVector<16>::pshufb(SuperVector<16> b)
{
//return {_mm_shuffle_epi8(u.v128[0], b.u.v128[0])};
//int8x16_t btranslated = vandq_s8((int8x16_t)b.u.v128[0],vdupq_n_s8(0x8f));
//return (m128)vqtbl1q_s8((int8x16_t)u.v128[0], (uint8x16_t)btranslated);
//#warning FIXM
return eq(b).movemask();
}
#ifdef HS_OPTIMIZE
@ -308,7 +352,10 @@ template<>
really_inline SuperVector<16> SuperVector<16>::alignr(SuperVector<16> &other, int8_t offset)
{
//return {vextq_s8(u.v128[0], other.u.v128[0], offset)};
#warning FIXME
//#warning FIXME
std::cout<<offset<<std::endl;
SuperVector<16> mask = Ones().rshift128_var(16 - 0);
return mask & pshufb(other);
}
#else
template<>
@ -336,19 +383,13 @@ really_inline SuperVector<16> SuperVector<16>::alignr(SuperVector<16> &other, in
}
return *this;
*/
#warning FIXME
//#warning FIXME
SuperVector<16> mask = Ones().rshift128_var(16 - 0);
std::cout<<offset<<std::endl;
return mask & pshufb(other);
}
#endif
template<>
really_inline SuperVector<16> SuperVector<16>::pshufb(SuperVector<16> b)
{
//return {_mm_shuffle_epi8(u.v128[0], b.u.v128[0])};
//int8x16_t btranslated = vandq_s8((int8x16_t)b.u.v128[0],vdupq_n_s8(0x8f));
//return (m128)vqtbl1q_s8((int8x16_t)u.v128[0], (uint8x16_t)btranslated);
#warning FIXME
}
template<>
really_inline SuperVector<16> SuperVector<16>::pshufb_maskz(SuperVector<16> b, uint8_t const len)
{
@ -361,12 +402,15 @@ template<>
really_inline SuperVector<16> SuperVector<16>::lshift64(uint8_t const N)
{
//return {vshlq_n_s64(u.v128[0], N)};
return {vec_sldw((int64x2_t)u.v128[0], N, 8)};
//return {vec_sldw((int64x2_t)u.v128[0], N, 8)};
std::cout<<N<<std::endl;
return Zeroes();;
}
#else
template<>
really_inline SuperVector<16> SuperVector<16>::lshift64(uint8_t const N)
{
/*
switch(N) {
case 0: return *this; break;
case 1: return {vec_sldw((int64x2_t)u.v128[0], 1, 8)}; break;
@ -388,6 +432,9 @@ really_inline SuperVector<16> SuperVector<16>::lshift64(uint8_t const N)
default: break;
}
return *this;
*/
std::cout<<N<<std::endl;
return Zeroes();
}
#endif
@ -396,7 +443,9 @@ template<>
really_inline SuperVector<16> SuperVector<16>::rshift64(uint8_t const N)
{
//return {vshrq_n_s64(u.v128[0], N)};
#warning FIXME
//#warning FIXME
std::cout<<N<<std::endl;
return Zeroes();
}
#else
template<>
@ -425,7 +474,9 @@ really_inline SuperVector<16> SuperVector<16>::rshift64(uint8_t const N)
}
return *this;
*/
#warning FIXME
//#warning FIXME
std::cout<<N<<std::endl;
return Zeroes();
}
#endif
@ -440,3 +491,4 @@ really_inline SuperVector<16> SuperVector<16>::rshift128(uint8_t const N)
{
return *this >> N;
}
#endif

View File

@ -38,6 +38,8 @@
#include "util/supervector/arch/x86/types.hpp"
#elif defined(ARCH_ARM32) || defined(ARCH_AARCH64)
#include "util/supervector/arch/arm/types.hpp"
#elif defined(ARCH_PPC64EL)
#include "util/supervector/arch/ppc64el/types.hpp"
#endif
#if defined(HAVE_SIMD_512_BITS)
@ -353,6 +355,8 @@ struct Unroller<End, End>
#include "util/supervector/arch/x86/impl.cpp"
#elif defined(ARCH_ARM32) || defined(ARCH_AARCH64)
#include "util/supervector/arch/arm/impl.cpp"
#elif defined(ARCH_PPC64EL)
#include "util/supervector/arch/ppc64el/impl.cpp"
#endif
#endif