diff options
author | Anders Carlsson <andersca@mac.com> | 2008-12-22 03:16:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-12-22 03:16:40 +0000 |
commit | 09b9305acfd140283c3a204878750bd6edde7a00 (patch) | |
tree | f44d091e0f1358ecbbe981c5cc005a216f1bea24 | |
parent | a6ba0012fb26d2e735b30ebdde23b36be8439c77 (diff) |
Add store intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61322 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Headers/xmmintrin.devel.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/Headers/xmmintrin.devel.h b/lib/Headers/xmmintrin.devel.h index 828f0dd6a5..f5ae1b677b 100644 --- a/lib/Headers/xmmintrin.devel.h +++ b/lib/Headers/xmmintrin.devel.h @@ -480,6 +480,43 @@ static inline __m128 __attribute__((__always__inline__)) _mm_setzero_ps(void) return (__m128){ 0, 0, 0, 0 }; } +static inline void __attribute__((__always__inline__)) _mm_storeh_pi(__m64 *p, __m128 a) +{ + __builtin_ia32_storehps((__v2si *)p, a); +} + +static inline void __attribute__((__always__inline__)) _mm_storel_pi(__m64 *p, __m128 a) +{ + __builtin_ia32_storelps((__v2si *)p, a); +} + +static inline void __attribute__((__always__inline__)) _mm_store_ss(float *p, __m128 a) +{ + *p = a[0]; +} + +static inline void __attribute__((__always_inline__)) _mm_storeu_ps(float *p, __m128 a) +{ + __builtin_ia32_storeups(p, a); +} + +static inline void __attribute__((__always_inline__)) _mm_store1_ps(float *p, __m128 a) +{ + a = __builtin_shufflevector(a, a, 0, 0, 0, 0); + _mm_storeu_ps(p, a); +} + +static inline void __attribute__((__always_inline__)) _mm_store_ps(float *p, __m128 a) +{ + *(__m128 *)p = a; +} + +static inline void __attribute__((__always_inline__)) _mm_storer_ps(float *p, __m128 a) +{ + a = __builtin_shufflevector(a, a, 3, 2, 1, 0); + _mm_store_ps(p, a); +} + #endif /* __SSE__ */ #endif /* __XMMINTRIN_H */ |