From a6ba0012fb26d2e735b30ebdde23b36be8439c77 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 22 Dec 2008 02:51:35 +0000 Subject: [PATCH] Add set intrinsics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61321 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/xmmintrin.devel.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/Headers/xmmintrin.devel.h b/lib/Headers/xmmintrin.devel.h index acb6e279be..828f0dd6a5 100644 --- a/lib/Headers/xmmintrin.devel.h +++ b/lib/Headers/xmmintrin.devel.h @@ -455,6 +455,31 @@ static inline __m128 __attribute__((__always_inline__)) _mm_loadr_ps(float *p) return __builtin_shufflevector(a, a, 3, 2, 1, 0); } +static inline __m128 __attribute__((__always_inline__)) _mm_set_ss(float w) +{ + return (__m128){ w, 0, 0, 0 }; +} + +static inline __m128 __attribute__((__always_inline__)) _mm_set1_ps(float w) +{ + return (__m128){ w, w, w, w }; +} + +static inline __m128 __attribute__((__always_inline__)) _mm_set_ps(float z, float y, float x, float w) +{ + return (__m128){ w, x, y, z }; +} + +static inline __m128 __attribute__((__always_inline__)) _mm_setr_ps(float z, float y, float x, float w) +{ + return (__m128){ z, y, x, w }; +} + +static inline __m128 __attribute__((__always__inline__)) _mm_setzero_ps(void) +{ + return (__m128){ 0, 0, 0, 0 }; +} + #endif /* __SSE__ */ #endif /* __XMMINTRIN_H */