| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
#ifndef _INC_FPIEEE |
| 7 |
#define _INC_FPIEEE |
| 8 |
|
| 9 |
#include <crtdefs.h> |
| 10 |
|
| 11 |
#pragma pack(push,_CRT_PACKING) |
| 12 |
|
| 13 |
#ifdef __cplusplus |
| 14 |
extern "C" { |
| 15 |
#endif |
| 16 |
|
| 17 |
typedef enum { |
| 18 |
_FpCompareEqual,_FpCompareGreater,_FpCompareLess,_FpCompareUnordered |
| 19 |
} _FPIEEE_COMPARE_RESULT; |
| 20 |
|
| 21 |
typedef enum { |
| 22 |
_FpFormatFp32,_FpFormatFp64,_FpFormatFp80,_FpFormatFp128,_FpFormatI16,_FpFormatI32, |
| 23 |
_FpFormatI64,_FpFormatU16,_FpFormatU32,_FpFormatU64,_FpFormatBcd80,_FpFormatCompare, |
| 24 |
_FpFormatString, |
| 25 |
#if defined(__ia64__) |
| 26 |
_FpFormatFp82 |
| 27 |
#endif |
| 28 |
} _FPIEEE_FORMAT; |
| 29 |
|
| 30 |
typedef enum { |
| 31 |
_FpCodeUnspecified,_FpCodeAdd,_FpCodeSubtract,_FpCodeMultiply,_FpCodeDivide, |
| 32 |
_FpCodeSquareRoot,_FpCodeRemainder,_FpCodeCompare,_FpCodeConvert,_FpCodeRound, |
| 33 |
_FpCodeTruncate,_FpCodeFloor,_FpCodeCeil,_FpCodeAcos,_FpCodeAsin,_FpCodeAtan, |
| 34 |
_FpCodeAtan2,_FpCodeCabs,_FpCodeCos,_FpCodeCosh,_FpCodeExp,_FpCodeFabs,_FpCodeFmod, |
| 35 |
_FpCodeFrexp,_FpCodeHypot,_FpCodeLdexp,_FpCodeLog,_FpCodeLog10,_FpCodeModf, |
| 36 |
_FpCodePow,_FpCodeSin,_FpCodeSinh,_FpCodeTan,_FpCodeTanh,_FpCodeY0,_FpCodeY1, |
| 37 |
_FpCodeYn,_FpCodeLogb,_FpCodeNextafter,_FpCodeNegate,_FpCodeFmin,_FpCodeFmax, |
| 38 |
_FpCodeConvertTrunc, |
| 39 |
_XMMIAddps,_XMMIAddss,_XMMISubps,_XMMISubss,_XMMIMulps,_XMMIMulss,_XMMIDivps, |
| 40 |
_XMMIDivss,_XMMISqrtps,_XMMISqrtss,_XMMIMaxps,_XMMIMaxss,_XMMIMinps,_XMMIMinss, |
| 41 |
_XMMICmpps,_XMMICmpss,_XMMIComiss,_XMMIUComiss,_XMMICvtpi2ps,_XMMICvtsi2ss, |
| 42 |
_XMMICvtps2pi,_XMMICvtss2si,_XMMICvttps2pi,_XMMICvttss2si,_XMMIAddsubps,_XMMIHaddps, |
| 43 |
_XMMIHsubps,_XMMI2Addpd,_XMMI2Addsd,_XMMI2Subpd,_XMMI2Subsd,_XMMI2Mulpd,_XMMI2Mulsd, |
| 44 |
_XMMI2Divpd,_XMMI2Divsd,_XMMI2Sqrtpd,_XMMI2Sqrtsd,_XMMI2Maxpd,_XMMI2Maxsd,_XMMI2Minpd, |
| 45 |
_XMMI2Minsd,_XMMI2Cmppd,_XMMI2Cmpsd,_XMMI2Comisd,_XMMI2UComisd,_XMMI2Cvtpd2pi, |
| 46 |
_XMMI2Cvtsd2si,_XMMI2Cvttpd2pi,_XMMI2Cvttsd2si,_XMMI2Cvtps2pd,_XMMI2Cvtss2sd, |
| 47 |
_XMMI2Cvtpd2ps,_XMMI2Cvtsd2ss,_XMMI2Cvtdq2ps,_XMMI2Cvttps2dq,_XMMI2Cvtps2dq, |
| 48 |
_XMMI2Cvttpd2dq,_XMMI2Cvtpd2dq,_XMMI2Addsubpd,_XMMI2Haddpd,_XMMI2Hsubpd, |
| 49 |
#if defined(__ia64__) |
| 50 |
_FpCodeFma,_FpCodeFmaSingle,_FpCodeFmaDouble,_FpCodeFms,_FpCodeFmsSingle, |
| 51 |
_FpCodeFmsDouble,_FpCodeFnma,_FpCodeFnmaSingle,_FpCodeFnmaDouble,_FpCodeFamin, |
| 52 |
_FpCodeFamax |
| 53 |
#endif |
| 54 |
} _FP_OPERATION_CODE; |
| 55 |
|
| 56 |
typedef enum { |
| 57 |
_FpRoundNearest,_FpRoundMinusInfinity,_FpRoundPlusInfinity,_FpRoundChopped |
| 58 |
} _FPIEEE_ROUNDING_MODE; |
| 59 |
|
| 60 |
typedef enum { |
| 61 |
_FpPrecisionFull,_FpPrecision53,_FpPrecision24, |
| 62 |
#if defined(__ia64__) |
| 63 |
_FpPrecision64,_FpPrecision113 |
| 64 |
#endif |
| 65 |
} _FPIEEE_PRECISION; |
| 66 |
|
| 67 |
typedef float _FP32; |
| 68 |
typedef double _FP64; |
| 69 |
typedef short _I16; |
| 70 |
typedef int _I32; |
| 71 |
typedef unsigned short _U16; |
| 72 |
typedef unsigned int _U32; |
| 73 |
__MINGW_EXTENSION typedef __int64 _Q64; |
| 74 |
|
| 75 |
typedef struct |
| 76 |
#if defined(__ia64__) |
| 77 |
_CRT_ALIGN(16) |
| 78 |
#endif |
| 79 |
{ |
| 80 |
unsigned short W[5]; |
| 81 |
} _FP80; |
| 82 |
|
| 83 |
typedef struct _CRT_ALIGN(16) { |
| 84 |
unsigned long W[4]; |
| 85 |
} _FP128; |
| 86 |
|
| 87 |
typedef struct _CRT_ALIGN(8) { |
| 88 |
unsigned long W[2]; |
| 89 |
} _I64; |
| 90 |
|
| 91 |
typedef struct _CRT_ALIGN(8) { |
| 92 |
unsigned long W[2]; |
| 93 |
} _U64; |
| 94 |
|
| 95 |
typedef struct |
| 96 |
#if defined(__ia64__) |
| 97 |
_CRT_ALIGN(16) |
| 98 |
#endif |
| 99 |
{ |
| 100 |
unsigned short W[5]; |
| 101 |
} _BCD80; |
| 102 |
|
| 103 |
typedef struct _CRT_ALIGN(16) { |
| 104 |
_Q64 W[2]; |
| 105 |
} _FPQ64; |
| 106 |
|
| 107 |
typedef struct { |
| 108 |
union { |
| 109 |
_FP32 Fp32Value; |
| 110 |
_FP64 Fp64Value; |
| 111 |
_FP80 Fp80Value; |
| 112 |
_FP128 Fp128Value; |
| 113 |
_I16 I16Value; |
| 114 |
_I32 I32Value; |
| 115 |
_I64 I64Value; |
| 116 |
_U16 U16Value; |
| 117 |
_U32 U32Value; |
| 118 |
_U64 U64Value; |
| 119 |
_BCD80 Bcd80Value; |
| 120 |
char *StringValue; |
| 121 |
int CompareValue; |
| 122 |
_Q64 Q64Value; |
| 123 |
_FPQ64 Fpq64Value; |
| 124 |
} Value; |
| 125 |
unsigned int OperandValid : 1; |
| 126 |
unsigned int Format : 4; |
| 127 |
} _FPIEEE_VALUE; |
| 128 |
|
| 129 |
typedef struct { |
| 130 |
unsigned int Inexact : 1; |
| 131 |
unsigned int Underflow : 1; |
| 132 |
unsigned int Overflow : 1; |
| 133 |
unsigned int ZeroDivide : 1; |
| 134 |
unsigned int InvalidOperation : 1; |
| 135 |
} _FPIEEE_EXCEPTION_FLAGS; |
| 136 |
|
| 137 |
typedef struct { |
| 138 |
unsigned int RoundingMode : 2; |
| 139 |
unsigned int Precision : 3; |
| 140 |
unsigned int Operation :12; |
| 141 |
_FPIEEE_EXCEPTION_FLAGS Cause; |
| 142 |
_FPIEEE_EXCEPTION_FLAGS Enable; |
| 143 |
_FPIEEE_EXCEPTION_FLAGS Status; |
| 144 |
_FPIEEE_VALUE Operand1; |
| 145 |
_FPIEEE_VALUE Operand2; |
| 146 |
_FPIEEE_VALUE Result; |
| 147 |
#if defined(__ia64__) |
| 148 |
_FPIEEE_VALUE Operand3; |
| 149 |
#endif |
| 150 |
} _FPIEEE_RECORD,*_PFPIEEE_RECORD; |
| 151 |
|
| 152 |
struct _EXCEPTION_POINTERS; |
| 153 |
|
| 154 |
_CRTIMP int __cdecl _fpieee_flt(unsigned long _ExceptionCode,struct _EXCEPTION_POINTERS *_PtExceptionPtr,int (__cdecl *_Handler)(_FPIEEE_RECORD *)); |
| 155 |
|
| 156 |
#ifdef __cplusplus |
| 157 |
} |
| 158 |
#endif |
| 159 |
|
| 160 |
#pragma pack(pop) |
| 161 |
#endif |