mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 22:41:04 -04:00
clean up dolphin files / work on some rels (#212)
* d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MSL_COMMON_SRC_FLOAT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "fdlibm.h"
|
||||
|
||||
#define FP_SNAN 0
|
||||
#define FP_QNAN 1
|
||||
@@ -42,8 +43,23 @@ inline int __fpclassifyf(float __value) {
|
||||
}
|
||||
|
||||
inline int __fpclassifyd(double __value) {
|
||||
// TODO:
|
||||
return FP_INFINITE;
|
||||
switch (__HI(__value) & 0x7ff00000) {
|
||||
case 0x7ff00000: {
|
||||
if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff))
|
||||
return FP_QNAN;
|
||||
else
|
||||
return FP_INFINITE;
|
||||
break;
|
||||
}
|
||||
case 0: {
|
||||
if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff))
|
||||
return FP_SUBNORMAL;
|
||||
else
|
||||
return FP_ZERO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FP_NORMAL;
|
||||
}
|
||||
|
||||
#endif /* MSL_COMMON_SRC_FLOAT_H */
|
||||
|
||||
@@ -26,7 +26,7 @@ double exp(double);
|
||||
|
||||
extern float __fabsf(float);
|
||||
inline double fabs(double f) {
|
||||
return __fabsf(f);
|
||||
return __fabs(f);
|
||||
}
|
||||
inline double fabsf2(float f) {
|
||||
return __fabsf(f);
|
||||
|
||||
Reference in New Issue
Block a user