PIPS
3dnow.h
Go to the documentation of this file.
1 #include <mm3dnow.h>
2 
3 typedef float a2sf[2] __attribute__ ((aligned (16)));
4 typedef __m64 v2sf;
5 
6 typedef int a2si[2] __attribute__ ((aligned (16)));
7 typedef __m64 v2si;
8 
9 #define SIMD_LOAD_V2SF(vec, f) \
10  vec = *(const __m64 *) &(f)[0]
11 #define SIMD_LOAD_GENERIC_V2SF(vec, f0,f1) \
12  do {\
13  a2sf __tmp;\
14  __tmp[0]=f0;\
15  __tmp[1]=f1;\
16  vec = *(const __m64 *) &(__tmp)[0];\
17  } while(0)
18 
19 #define SIMD_STORE_V2SF(vec, f) \
20  *(__m64 *)(&(f)[0]) = vec
21 
22 #define SIMD_MULPS(vec1, vec2, vec3) \
23  vec1 = _m_pfmul(vec2, vec3)
24 
25 #define SIMD_ADDPS(vec1, vec2, vec3) \
26  vec1 = _m_pfadd(vec2, vec3)
27 
28 #define SIMD_SUBPS(vec1, vec2, vec3) \
29  vec1 = _m_pfsub(vec2, vec3)
30 
31 /* should not be there :$ */
32 #define SIMD_ZERO_V4SF(vec) \
33  SIMD_SUBPS(vec,vec,vec)
34 
35 #define SIMD_UMINPS(vec1, vec2) \
36  do { \
37  __m64 __pips_tmp; \
38  __pips_tmp = _m_pxor(__pips_tmp, __pips_tmp); \
39  SIMD_SUBPS(vec1, __pips_tmp, vec2); \
40  } while(0)
41 
42 #define SIMD_LOAD_V2SI_TO_V2SF(vec, f) \
43  do { \
44  float __pips_f[2]; \
45  __pips_f[0] = (f)[0]; \
46  __pips_f[1] = (f)[1]; \
47  SIMD_LOAD_V2SF(vec, __pips_f); \
48  } while (0)
49 
__m64 v2si
Definition: 3dnow.h:7
__m64 v2sf
Definition: 3dnow.h:4
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
int a2si[2]
Definition: SIMD_types.h:7
float a2sf[2]
Definition: SIMD_types.h:4