Skip to content

Commit 634626b

Browse files
WIP
1 parent 341f10c commit 634626b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include "../types/xsimd_altivec_register.hpp"
2020

21+
#include <endian.h>
22+
2123
namespace xsimd
2224
{
2325
template <typename T, class A, bool... Values>
@@ -879,7 +881,11 @@ namespace xsimd
879881
}
880882
else
881883
{
884+
#if BYTE_ORDER == LITTLE_ENDIAN
885+
auto slider = vec_splats((uint8_t)(8 * (16 - N)));
886+
#else
882887
auto slider = vec_splats((uint8_t)(8 * N));
888+
#endif
883889
return (typename batch<T, A>::register_type)vec_sro((__vector unsigned char)x.data, slider);
884890
}
885891
}

0 commit comments

Comments
 (0)