include/msvcrt: Define more CPU control word flags.

This commit is contained in:
Alexandre Julliard 2010-11-26 14:51:46 +01:00
parent fa2b7066e5
commit 1ae23af85b
3 changed files with 31 additions and 10 deletions

View File

@ -653,6 +653,12 @@ struct MSVCRT__stat64 {
#define MSVCRT__FPCLASS_PN 0x0100 /* Positive Normal */
#define MSVCRT__FPCLASS_PINF 0x0200 /* Positive Infinity */
#define MSVCRT__MCW_EM 0x0008001f
#define MSVCRT__MCW_IC 0x00040000
#define MSVCRT__MCW_RC 0x00000300
#define MSVCRT__MCW_PC 0x00030000
#define MSVCRT__MCW_DN 0x03000000
#define MSVCRT__EM_INVALID 0x00000010
#define MSVCRT__EM_DENORMAL 0x00080000
#define MSVCRT__EM_ZERODIVIDE 0x00000008
@ -668,6 +674,11 @@ struct MSVCRT__stat64 {
#define MSVCRT__PC_24 0x00020000
#define MSVCRT__PC_53 0x00010000
#define MSVCRT__PC_64 0x00000000
#define MSVCRT__DN_SAVE 0x00000000
#define MSVCRT__DN_FLUSH 0x01000000
#define MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000
#define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
#define MSVCRT__EM_AMBIGUOUS 0x80000000
#define MSVCRT_CLOCKS_PER_SEC 1000

View File

@ -425,7 +425,11 @@ static void test_defines(void)
CHECK_DEF(_FPE_STACKOVERFLOW);
CHECK_DEF(_FPE_STACKUNDERFLOW);
CHECK_DEF(_FPE_EXPLICITGEN);
#ifdef __i386__
CHECK_DEF(_MCW_EM);
CHECK_DEF(_MCW_IC);
CHECK_DEF(_MCW_RC);
CHECK_DEF(_MCW_PC);
CHECK_DEF(_MCW_DN);
CHECK_DEF(_EM_INVALID);
CHECK_DEF(_EM_DENORMAL);
CHECK_DEF(_EM_ZERODIVIDE);
@ -441,7 +445,11 @@ static void test_defines(void)
CHECK_DEF(_PC_24);
CHECK_DEF(_PC_53);
CHECK_DEF(_PC_64);
#endif
CHECK_DEF(_DN_SAVE);
CHECK_DEF(_DN_FLUSH);
CHECK_DEF(_DN_FLUSH_OPERANDS_SAVE_RESULTS);
CHECK_DEF(_DN_SAVE_OPERANDS_FLUSH_RESULTS);
CHECK_DEF(_EM_AMBIGUOUS);
}
#endif /* __WINE_USE_MSVCRT */

View File

@ -60,14 +60,12 @@ extern "C" {
#define LDBL_RADIX _LDBL_RADIX
#define LDBL_ROUNDS _LDBL_ROUNDS
/* _controlfp masks and bitflags - x86 only so far */
#ifdef __i386__
/* Control word masks for unMask */
#define _MCW_EM 0x0008001F /* Error masks */
#define _MCW_IC 0x00040000 /* Infinity */
#define _MCW_RC 0x00000300 /* Rounding */
#define _MCW_PC 0x00030000 /* Precision */
#define _MCW_EM 0x0008001f
#define _MCW_IC 0x00040000
#define _MCW_RC 0x00000300
#define _MCW_PC 0x00030000
#define _MCW_DN 0x03000000
/* Control word values for unNew (use with related unMask above) */
#define _EM_INVALID 0x00000010
@ -85,7 +83,11 @@ extern "C" {
#define _PC_24 0x00020000
#define _PC_53 0x00010000
#define _PC_64 0x00000000
#endif
#define _DN_SAVE 0x00000000
#define _DN_FLUSH 0x01000000
#define _DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000
#define _DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
#define _EM_AMBIGUOUS 0x80000000
/* _statusfp bit flags */
#define _SW_INEXACT 0x00000001 /* inexact (precision) */