mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
[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
This commit is contained in:
parent
d840d7cb1b
commit
b5aa5bcdc1
2 changed files with 19 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
#if defined(_M_IX86) || defined(_M_X64)
|
#if defined(_M_IX86) || defined(_M_X64)
|
||||||
//#include <immintrin.h>
|
//#include <immintrin.h>
|
||||||
//#include <ammintrin.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 */
|
#endif /* _M_IX86 || _M_X64 */
|
||||||
|
|
||||||
#if defined(_M_IX86)
|
#if defined(_M_IX86)
|
||||||
|
|
|
@ -34,6 +34,16 @@ unsigned int _mm_getcsr(void);
|
||||||
void _mm_setcsr(unsigned int);
|
void _mm_setcsr(unsigned int);
|
||||||
#pragma intrinsic(_mm_setcsr)
|
#pragma intrinsic(_mm_setcsr)
|
||||||
#else
|
#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,
|
* We can't use __builtin_ia32_* functions,
|
||||||
* are they are only available with the -msse2 compiler switch
|
* 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
|
#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 */
|
#endif /* _INCLUDED_MM2 */
|
||||||
|
|
Loading…
Reference in a new issue