Browse Source

Force vector pairs in clang.

tags/v0.3.29
Chip Kerchner 1 year ago
parent
commit
c9ce37d527
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      kernel/power/gemm_common.c

+ 8
- 0
kernel/power/gemm_common.c View File

@@ -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…
Cancel
Save