Add cacheability intrinsics

llvm-svn: 61323
This commit is contained in:
Anders Carlsson 2008-12-22 03:50:21 +00:00
parent 1e71996bd1
commit 70d5f46646
1 changed files with 25 additions and 0 deletions

View File

@ -517,6 +517,31 @@ static inline void __attribute__((__always_inline__)) _mm_storer_ps(float *p, __
_mm_store_ps(p, a); _mm_store_ps(p, a);
} }
#define _MM_HINT_T0 1
#define _MM_HINT_T1 2
#define _MM_HINT_T2 3
#define _MM_HINT_NTA 0
// FIXME: We have to #define this because "sel" must be a constant integer, and
// Sema doesn't do any form of constant propagation yet.
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)a, 0, sel))
static inline void __attribute__((__always_inline__)) _mm_stream_pi(__m64 *p, __m64 a)
{
__builtin_ia32_movntq(p, a);
}
static inline void __attribute__((__always_inline__)) _mm_stream_ps(float *p, __m128 a)
{
__builtin_ia32_movntps(p, a);
}
static inline void __attribute__((__always_inline__)) _mm_sfence(void)
{
__builtin_ia32_sfence();
}
#endif /* __SSE__ */ #endif /* __SSE__ */
#endif /* __XMMINTRIN_H */ #endif /* __XMMINTRIN_H */