[cfe-commits] r61323 - /cfe/trunk/lib/Headers/xmmintrin.devel.h

Anders Carlsson andersca at mac.com
Sun Dec 21 19:50:23 PST 2008


Author: andersca
Date: Sun Dec 21 21:50:21 2008
New Revision: 61323

URL: http://llvm.org/viewvc/llvm-project?rev=61323&view=rev
Log:
Add cacheability intrinsics

Modified:
    cfe/trunk/lib/Headers/xmmintrin.devel.h

Modified: cfe/trunk/lib/Headers/xmmintrin.devel.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.devel.h?rev=61323&r1=61322&r2=61323&view=diff

==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.devel.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.devel.h Sun Dec 21 21:50:21 2008
@@ -517,6 +517,31 @@
   _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 /* __XMMINTRIN_H */





More information about the cfe-commits mailing list