https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b5aa5bcdc1973b68dda396dc194705858d63c68d

commit b5aa5bcdc1973b68dda396dc194705858d63c68d
Author:     Mark Jansen <[email protected]>
AuthorDate: Sun Dec 16 23:25:52 2018 +0100
Commit:     GitHub <[email protected]>
CommitDate: Sun Dec 16 23:25:52 2018 +0100

    [SDK] Define some constants for use with _mm_prefetch (#1147)
    
    * [SDK] Define some constants for use with _mm_prefetch
    This should fix the build for x64
    Add __INTRIN_INLINE for gcc and clang
---
 sdk/include/crt/intrin.h    |  1 +
 sdk/include/crt/xmmintrin.h | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/sdk/include/crt/intrin.h b/sdk/include/crt/intrin.h
index 8dc1944fe7..3a03d02fe3 100644
--- a/sdk/include/crt/intrin.h
+++ b/sdk/include/crt/intrin.h
@@ -11,6 +11,7 @@
 #if defined(_M_IX86) || defined(_M_X64)
 //#include <immintrin.h>
 //#include <ammintrin.h>
+#include <xmmintrin.h> // native headers: immintrin.h -> wmmintrin.h -> 
nmmintrin.h -> smmintrin.h -> tmmintrin.h -> pmmintrin.h -> emmintrin.h
 #endif /* _M_IX86 || _M_X64 */
 
 #if defined(_M_IX86)
diff --git a/sdk/include/crt/xmmintrin.h b/sdk/include/crt/xmmintrin.h
index 19eff23702..8bb7c7b06b 100644
--- a/sdk/include/crt/xmmintrin.h
+++ b/sdk/include/crt/xmmintrin.h
@@ -34,6 +34,16 @@ unsigned int _mm_getcsr(void);
 void _mm_setcsr(unsigned int);
 #pragma intrinsic(_mm_setcsr)
 #else
+
+#ifndef __INTRIN_INLINE
+#ifdef __clang__
+#define __INTRIN_INLINE __forceinline
+#else
+#define __ATTRIBUTE_ARTIFICIAL __attribute__((artificial))
+#define __INTRIN_INLINE extern __inline__ 
__attribute__((__always_inline__,__gnu_inline__)) __ATTRIBUTE_ARTIFICIAL
+#endif
+#endif
+
 /* 
  * We can't use __builtin_ia32_* functions,
  * are they are only available with the -msse2 compiler switch
@@ -55,4 +65,12 @@ __INTRIN_INLINE void _mm_setcsr(unsigned int val)
 #define _mm_cvtss_si32 _mm_cvt_ss2si
 
 
+/* _mm_prefetch constants */
+#define _MM_HINT_T0 1
+#define _MM_HINT_T1 2
+#define _MM_HINT_T2 3
+#define _MM_HINT_NTA 0
+#define _MM_HINT_ET1 6
+
+
 #endif /* _INCLUDED_MM2 */

Reply via email to