ReactOS  0.4.15-dev-509-g96a357b
xmmintrin.h
Go to the documentation of this file.
1 
7 #pragma once
8 #ifndef _INCLUDED_MM2
9 #define _INCLUDED_MM2
10 
11 #include <crtdefs.h>
12 #include <mmintrin.h>
13 
15 {
16  float m128_f32[4];
17  unsigned __int64 m128_u64[2];
18  __int8 m128_i8[16];
19  __int16 m128_i16[8];
20  __int32 m128_i32[4];
21  __int64 m128_i64[2];
22  unsigned __int8 m128_u8[16];
23  unsigned __int16 m128_u16[8];
24  unsigned __int32 m128_u32[4];
26 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 extern __m128 _mm_load_ss(float const*);
33 extern int _mm_cvt_ss2si(__m128);
36 
37 #ifdef _MSC_VER
38 unsigned int _mm_getcsr(void);
39 #pragma intrinsic(_mm_getcsr)
40 void _mm_setcsr(unsigned int);
41 #pragma intrinsic(_mm_setcsr)
42 #pragma intrinsic(_mm_xor_ps)
43 #pragma intrinsic(_mm_div_ps)
44 #else
45 
46 #ifndef __INTRIN_INLINE
47 #ifdef __clang__
48 #define __INTRIN_INLINE __forceinline
49 #else
50 #define __ATTRIBUTE_ARTIFICIAL __attribute__((artificial))
51 #define __INTRIN_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) __ATTRIBUTE_ARTIFICIAL
52 #endif
53 #endif
54 
55 /*
56  * We can't use __builtin_ia32_* functions,
57  * are they are only available with the -msse2 compiler switch
58  */
59 __INTRIN_INLINE unsigned int _mm_getcsr(void)
60 {
61  unsigned int retval;
62  __asm__ __volatile__("stmxcsr %0" : "=m"(retval));
63  return retval;
64 }
65 
66 __INTRIN_INLINE void _mm_setcsr(unsigned int val)
67 {
68  __asm__ __volatile__("ldmxcsr %0" : : "m"(val));
69 }
70 #endif
71 
72 /* Alternate names */
73 #define _mm_cvtss_si32 _mm_cvt_ss2si
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 /* _mm_prefetch constants */
80 #define _MM_HINT_T0 1
81 #define _MM_HINT_T1 2
82 #define _MM_HINT_T2 3
83 #define _MM_HINT_NTA 0
84 #define _MM_HINT_ET1 6
85 
86 
87 #endif /* _INCLUDED_MM2 */
#define _DECLSPEC_INTRIN_TYPE
Definition: _mingw.h:233
__INTRIN_INLINE void _mm_setcsr(unsigned int val)
Definition: xmmintrin.h:66
__m128 _mm_xor_ps(__m128 a, __m128 b)
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
__m128 _mm_div_ps(__m128 a, __m128 b)
#define __INTRIN_INLINE
Definition: xmmintrin.h:51
union _DECLSPEC_INTRIN_TYPE _CRT_ALIGN(16) __m128
Definition: xmmintrin.h:14
GLuint GLfloat * val
Definition: glext.h:7180
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
__INTRIN_INLINE unsigned int _mm_getcsr(void)
Definition: xmmintrin.h:59
__m128
Definition: xmmintrin.h:25
__m128 _mm_load_ss(float const *)
#define __int32
Definition: basetyps.h:19
#define __int8
Definition: basetyps.h:25
int _mm_cvt_ss2si(__m128)
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define __int64
Definition: basetyps.h:16
#define __int16
Definition: basetyps.h:22