|
|
|
| 1 |
|
/** |
| 2 |
|
*** |
| 3 |
|
*** Copyright (C) 1985-2005 Intel Corporation. All rights reserved. |
| 4 |
|
*** |
| 5 |
|
*** The information and source code contained herein is the exclusive |
| 6 |
|
*** property of Intel Corporation and may not be disclosed, examined |
| 7 |
|
*** or reproduced in whole or in part except as expressly provided |
| 8 |
|
*** by the accompanying LICENSE AGREEMENT |
| 9 |
|
*** |
| 10 |
|
*** cvs_id[] = "$Id: pmmintrin.h,v 1.5 2005/01/03 22:55:01 hhle Exp $"; |
| 11 |
|
*** |
| 12 |
|
**/ |
| 13 |
|
/* |
| 14 |
|
* pmmintrin.h |
| 15 |
|
* |
| 16 |
|
* Principal header file for Intel(R) Pentium(R) 4 processor SSE3 intrinsics |
| 17 |
|
*/ |
| 18 |
|
|
| 19 |
|
#pragma once |
| 20 |
|
#ifndef __midl |
| 21 |
|
#ifndef _INCLUDED_PMM |
| 22 |
|
#define _INCLUDED_PMM |
| 23 |
|
|
| 24 |
|
#if defined(_M_CEE_PURE) |
| 25 |
|
#error ERROR: EMM intrinsics not supported in the pure mode! |
| 26 |
|
#else |
| 27 |
|
|
| 28 |
|
/* |
| 29 |
|
* We need xmmintrin.h, emmintrin.h for the basic type declarations. |
| 30 |
|
*/ |
| 31 |
|
#include <xmmintrin.h> |
| 32 |
|
#include <emmintrin.h> |
| 33 |
|
|
| 34 |
|
/*****************************************************/ |
| 35 |
|
/* MACROS FOR USE WITH INTRINSICS */ |
| 36 |
|
/*****************************************************/ |
| 37 |
|
|
| 38 |
|
/* |
| 39 |
|
* MACRO functions for setting and reading the DAZ bit in the MXCSR |
| 40 |
|
*/ |
| 41 |
|
#define _MM_DENORMALS_ZERO_MASK 0x0040 |
| 42 |
|
#define _MM_DENORMALS_ZERO_ON 0x0040 |
| 43 |
|
#define _MM_DENORMALS_ZERO_OFF 0x0000 |
| 44 |
|
|
| 45 |
|
#define _MM_SET_DENORMALS_ZERO_MODE(mode) \ |
| 46 |
|
_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (mode)) |
| 47 |
|
#define _MM_GET_DENORMALS_ZERO_MODE() \ |
| 48 |
|
(_mm_getcsr() & _MM_DENORMALS_ZERO_MASK) |
| 49 |
|
|
| 50 |
|
|
| 51 |
|
/*****************************************************/ |
| 52 |
|
/* INTRINSICS FUNCTION PROTOTYPES START HERE */ |
| 53 |
|
/*****************************************************/ |
| 54 |
|
|
| 55 |
|
#if defined __cplusplus |
| 56 |
|
extern "C" { /* Begin "C" */ |
| 57 |
|
/* Intrinsics use C name-mangling. */ |
| 58 |
|
#endif /* __cplusplus */ |
| 59 |
|
|
| 60 |
|
/* |
| 61 |
|
* New Single precision vector instructions. |
| 62 |
|
*/ |
| 63 |
|
|
| 64 |
|
extern __m128 _mm_addsub_ps(__m128 a, __m128 b); |
| 65 |
|
extern __m128 _mm_hadd_ps(__m128 a, __m128 b); |
| 66 |
|
extern __m128 _mm_hsub_ps(__m128 a, __m128 b); |
| 67 |
|
extern __m128 _mm_movehdup_ps(__m128 a); |
| 68 |
|
extern __m128 _mm_moveldup_ps(__m128 a); |
| 69 |
|
|
| 70 |
|
/* |
| 71 |
|
* New double precision vector instructions. |
| 82 |
|
*/ |
| 83 |
|
extern __m128i _mm_lddqu_si128(__m128i const *p); |
| 84 |
|
|
| 85 |
|
/* |
| 86 |
|
* Miscellaneous new instructions. |
| 87 |
|
*/ |
| 88 |
|
/* |
| 89 |
|
* For _mm_monitor p goes in eax, extensions goes in ecx, hints goes in edx. |
| 90 |
|
*/ |
| 91 |
|
extern void _mm_monitor(void const *p, unsigned extensions, unsigned hints); |
| 92 |
|
|
| 93 |
|
/* |
| 94 |
|
* For _mm_mwait, extensions goes in ecx, hints goes in eax. |
| 95 |
|
*/ |
| 96 |
|
extern void _mm_mwait(unsigned extensions, unsigned hints); |
| 97 |
|
|
| 98 |
|
#if defined __cplusplus |
| 99 |
|
}; /* End "C" */ |
| 100 |
|
#endif /* __cplusplus */ |
| 101 |
|
|
| 102 |
|
#endif /* defined(_M_CEE_PURE) */ |
| 103 |
|
|
| 104 |
|
#endif |
| 105 |
|
#endif |
| 106 |
|
|
|
|
|