Changeset 96197 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Aug 14, 2022 1:04:34 AM (2 years ago)
- Location:
- trunk/src/VBox/Runtime/common/math
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/math/__fpclassifyd.cpp
r96093 r96197 43 43 u.rd = rd; 44 44 if (RTFLOAT64U_IS_ZERO(&u)) 45 return FP_ZERO;45 return RT_NOCRT_FP_ZERO; 46 46 if (RTFLOAT64U_IS_NORMAL(&u)) 47 return FP_NORMAL;47 return RT_NOCRT_FP_NORMAL; 48 48 if (RTFLOAT64U_IS_NAN(&u)) 49 return FP_NAN;49 return RT_NOCRT_FP_NAN; 50 50 if (RTFLOAT64U_IS_INF(&u)) 51 return FP_INFINITE;51 return RT_NOCRT_FP_INFINITE; 52 52 Assert(RTFLOAT64U_IS_SUBNORMAL(&u)); 53 return FP_SUBNORMAL;53 return RT_NOCRT_FP_SUBNORMAL; 54 54 } 55 55 RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL_WITHOUT_UNDERSCORE(__fpclassifyd); -
trunk/src/VBox/Runtime/common/math/__fpclassifyf.cpp
r96093 r96197 43 43 u.r = r32; 44 44 if (RTFLOAT32U_IS_ZERO(&u)) 45 return FP_ZERO;45 return RT_NOCRT_FP_ZERO; 46 46 if (RTFLOAT32U_IS_NORMAL(&u)) 47 return FP_NORMAL;47 return RT_NOCRT_FP_NORMAL; 48 48 if (RTFLOAT32U_IS_NAN(&u)) 49 return FP_NAN;49 return RT_NOCRT_FP_NAN; 50 50 if (RTFLOAT32U_IS_INF(&u)) 51 return FP_INFINITE;51 return RT_NOCRT_FP_INFINITE; 52 52 Assert(RTFLOAT32U_IS_SUBNORMAL(&u)); 53 return FP_SUBNORMAL;53 return RT_NOCRT_FP_SUBNORMAL; 54 54 } 55 55 RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL_WITHOUT_UNDERSCORE(__fpclassifyf); -
trunk/src/VBox/Runtime/common/math/__fpclassifyl.cpp
r96093 r96197 39 39 int RT_NOCRT(__fpclassifyl)(long double lrd) 40 40 { 41 #ifdef RT_COMPILER_WITH_80BIT_LONG_DOUBLE 42 AssertCompile(sizeof(lrd) == sizeof(uint64_t)); 41 #ifdef RT_COMPILER_WITH_128BIT_LONG_DOUBLE 42 RTFLOAT128U u; 43 u.rd = lrd; 44 if (RTFLOAT128U_IS_ZERO(&u)) 45 return RT_NOCRT_FP_ZERO; 46 if (RTFLOAT128U_IS_NORMAL(&u)) 47 return RT_NOCRT_FP_NORMAL; 48 if (RTFLOAT128U_IS_NAN(&u)) 49 return RT_NOCRT_FP_NAN; 50 if (RTFLOAT128U_IS_INF(&u)) 51 return RT_NOCRT_FP_INFINITE; 52 Assert(RTFLOAT128U_IS_SUBNORMAL(&u)); 53 return RT_NOCRT_FP_SUBNORMAL; 54 55 #elif defined(RT_COMPILER_WITH_80BIT_LONG_DOUBLE) 43 56 RTFLOAT80U2 u; 44 57 u.lrd = lrd; 45 58 if (RTFLOAT80U_IS_ZERO(&u)) 46 return FP_ZERO;59 return RT_NOCRT_FP_ZERO; 47 60 if (RTFLOAT80U_IS_NORMAL(&u)) 48 return FP_NORMAL;61 return RT_NOCRT_FP_NORMAL; 49 62 if (RTFLOAT80U_IS_NAN(&u)) 50 return FP_NAN;63 return RT_NOCRT_FP_NAN; 51 64 if (RTFLOAT80U_IS_INF(&u)) 52 return FP_INFINITE;65 return RT_NOCRT_FP_INFINITE; 53 66 if (RTFLOAT80U_IS_DENORMAL_OR_PSEUDO_DENORMAL(&u)) 54 return FP_SUBNORMAL;67 return RT_NOCRT_FP_SUBNORMAL; 55 68 56 69 /* Following i387 invalid operand rules here. Adjust as needed for 57 70 other architectures. */ 58 71 Assert(RTFLOAT80U_IS_387_INVALID(&u)); 59 return FP_NAN;72 return RT_NOCRT_FP_NAN; 60 73 61 74 #else … … 64 77 u.rd = lrd; 65 78 if (RTFLOAT64U_IS_ZERO(&u)) 66 return FP_ZERO;79 return RT_NOCRT_FP_ZERO; 67 80 if (RTFLOAT64U_IS_NORMAL(&u)) 68 return FP_NORMAL;81 return RT_NOCRT_FP_NORMAL; 69 82 if (RTFLOAT64U_IS_NAN(&u)) 70 return FP_NAN;83 return RT_NOCRT_FP_NAN; 71 84 if (RTFLOAT64U_IS_INF(&u)) 72 return FP_INFINITE;85 return RT_NOCRT_FP_INFINITE; 73 86 Assert(RTFLOAT64U_IS_SUBNORMAL(&u)); 74 return FP_SUBNORMAL;87 return RT_NOCRT_FP_SUBNORMAL; 75 88 #endif 76 89 }
Note:
See TracChangeset
for help on using the changeset viewer.