File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1515#include < complex>
1616#include < limits>
1717#include < type_traits>
18+ #include < endian.h>
1819
1920#include " ../types/xsimd_altivec_register.hpp"
2021
@@ -864,7 +865,11 @@ namespace xsimd
864865 }
865866 else
866867 {
868+ #if BYTE_ORDER == LITTLE_ENDIAN
867869 auto slider = vec_splats ((uint8_t )(8 * N));
870+ #else
871+ auto slider = vec_splats ((uint8_t )(8 * (16 - N)));
872+ #endif
868873 return (typename batch<T, A>::register_type)vec_slo (x.data , slider);
869874 }
870875 }
@@ -879,7 +884,11 @@ namespace xsimd
879884 }
880885 else
881886 {
887+ #if BYTE_ORDER == LITTLE_ENDIAN
882888 auto slider = vec_splats ((uint8_t )(8 * N));
889+ #else
890+ auto slider = vec_splats ((uint8_t )(8 * (16 - N)));
891+ #endif
883892 return (typename batch<T, A>::register_type)vec_sro ((__vector unsigned char )x.data , slider);
884893 }
885894 }
You can’t perform that action at this time.
0 commit comments