Force vector pairs in clang.
This commit is contained in:
parent
89a12fa083
commit
c9ce37d527
|
@ -46,7 +46,11 @@ FORCEINLINE void vec_load_pair(vec_f32 *dst, vec_f32 *src)
|
|||
{
|
||||
#ifdef USE_VECTOR_PAIRS
|
||||
__vector_pair vy0p;
|
||||
#ifdef __clang__
|
||||
vy0p = __builtin_vsx_lxvp(0L, (const __vector_pair *)(src));
|
||||
#else
|
||||
vy0p = *(__vector_pair *)(src);
|
||||
#endif
|
||||
__builtin_vsx_disassemble_pair((void *)(dst), &vy0p);
|
||||
#else
|
||||
dst[0] = src[0];
|
||||
|
@ -59,7 +63,11 @@ FORCEINLINE void vec_store_pair(vec_f32 *dst, vec_f32 *src)
|
|||
#ifdef USE_VECTOR_PAIRS
|
||||
__vector_pair vy0p;
|
||||
__builtin_vsx_assemble_pair2(&vy0p, (vec_uc8)src[1], (vec_uc8)src[0]);
|
||||
#ifdef __clang__
|
||||
__builtin_vsx_stxvp(vy0p, 0L, (__vector_pair *)(dst));
|
||||
#else
|
||||
*(__vector_pair *)(dst) = vy0p;
|
||||
#endif
|
||||
#else
|
||||
dst[0] = src[0];
|
||||
dst[1] = src[1];
|
||||
|
|
Loading…
Reference in New Issue