Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

floatlib.c File Reference

Go to the source code of this file.

Defines

#define float   long
#define double   long long
#define EXCESS   126
#define SIGNBIT   0x80000000
#define HIDDEN   (1 << 23)
#define SIGN(fp)   ((fp) & SIGNBIT)
#define EXP(fp)   (((fp) >> 23) & 0xFF)
#define MANT(fp)   (((fp) & 0x7FFFFF) | HIDDEN)
#define PACK(s, e, m)   ((s) | ((e) << 23) | (m))
#define EXCESSD   1022
#define HIDDEND   (1 << 20)
#define EXPD(fp)   (((fp.l.upper) >> 20) & 0x7FF)
#define SIGND(fp)   ((fp.l.upper) & SIGNBIT)
#define MANTD(fp)   (((((fp.l.upper) & 0xFFFFF) | HIDDEND) << 10) |(fp.l.lower >> 22))
#define HIDDEND_LL   ((long long)1 << 52)
#define MANTD_LL(fp)   ((fp.ll & (HIDDEND_LL-1)) | HIDDEND_LL)
#define PACKD_LL(s, e, m)   (((long long)((s)+((e)<<20))<<32)|(m))

Functions

long long __negdi2 (long long u)
float __addsf3 (float a1, float a2)
float __subsf3 (float a1, float a2)
long __cmpsf2 (float a1, float a2)
float __mulsf3 (float a1, float a2)
float __divsf3 (float a1, float a2)
float __truncdfsf2 (double a1)
double __floatsidf (register long a1)
double __floatdidf (register long long a1)
float __floatsisf (register long a1)
float __floatdisf (register long long a1)
float __negsf2 (float a1)
double __negdf2 (double a1)
double __extendsfdf2 (float a1)
long __cmpdf2 (double a1, double a2)
long __fixdfsi (double a1)
long __fixsfsi (float a1)
long long __fixdfdi (double a1)
unsigned long __fixunsdfsi (double a1)
unsigned long long __fixunsdfdi (double a1)
double __adddf3 (double a1, double a2)
double __subdf3 (double a1, double a2)
double __muldf3 (double a1, double a2)
double __divdf3 (double a1, double a2)
int __gtdf2 (double a1, double a2)
int __gedf2 (double a1, double a2)
int __ltdf2 (double a1, double a2)
int __ledf2 (double a1, double a2)
int __eqdf2 (double a1, double a2)
int __nedf2 (double a1, double a2)
double __absdf2 (double a1)
float __abssf2 (float a1)


Define Documentation

possible cmpb bgts ddbl double   long long
 

Definition at line 58 of file floatlib.c.

Referenced by _extendsidf(), and _extendsisf().

#define EXCESS   126
 

Definition at line 61 of file floatlib.c.

Referenced by __divsf3(), __extendsfdf2(), __mulsf3(), and __truncdfsf2().

#define EXCESSD   1022
 

Definition at line 70 of file floatlib.c.

Referenced by __divdf3(), __extendsfdf2(), __fixdfdi(), __fixdfsi(), __fixunsdfdi(), __fixunsdfsi(), __floatdidf(), __floatsidf(), __muldf3(), and __truncdfsf2().

#define EXP fp   )     (((fp) >> 23) & 0xFF)
 

Definition at line 65 of file floatlib.c.

#define EXPD fp   )     (((fp.l.upper) >> 20) & 0x7FF)
 

Definition at line 72 of file floatlib.c.

Referenced by __adddf3(), __divdf3(), __fixdfdi(), __fixdfsi(), __fixunsdfdi(), __fixunsdfsi(), __muldf3(), and __truncdfsf2().

#define float   long
 

Definition at line 57 of file floatlib.c.

Referenced by cv64_load_video_mode().

#define HIDDEN   (1 << 23)
 

Definition at line 63 of file floatlib.c.

Referenced by __addsf3(), __divsf3(), __extendsfdf2(), __mulsf3(), and __truncdfsf2().

#define HIDDEND   (1 << 20)
 

Definition at line 71 of file floatlib.c.

Referenced by __fixunsdfsi(), and __floatsidf().

#define HIDDEND_LL   ((long long)1 << 52)
 

Definition at line 75 of file floatlib.c.

Referenced by __adddf3(), __divdf3(), __floatdidf(), and __muldf3().

#define MANT fp   )     (((fp) & 0x7FFFFF) | HIDDEN)
 

Definition at line 66 of file floatlib.c.

Referenced by __addsf3(), __divsf3(), __extendsfdf2(), and __mulsf3().

#define MANTD fp   )     (((((fp.l.upper) & 0xFFFFF) | HIDDEND) << 10) |(fp.l.lower >> 22))
 

Definition at line 74 of file floatlib.c.

Referenced by __fixdfsi(), and __truncdfsf2().

#define MANTD_LL fp   )     ((fp.ll & (HIDDEND_LL-1)) | HIDDEND_LL)
 

Definition at line 76 of file floatlib.c.

Referenced by __adddf3(), __divdf3(), __fixdfdi(), and __muldf3().

#define PACK s,
e,
m   )     ((s) | ((e) << 23) | (m))
 

Definition at line 67 of file floatlib.c.

Referenced by __addsf3(), __divsf3(), __mulsf3(), and __truncdfsf2().

#define PACKD_LL s,
e,
m   )     (((long long)((s)+((e)<<20))<<32)|(m))
 

Definition at line 77 of file floatlib.c.

Referenced by __adddf3(), __divdf3(), and __muldf3().

#define SIGN fp   )     ((fp) & SIGNBIT)
 

Definition at line 64 of file floatlib.c.

Referenced by __addsf3(), __cmpsf2(), __divsf3(), __extendsfdf2(), __mulsf3(), _vsnprintf(), number(), and SkNumber().

#define SIGNBIT   0x80000000
 

Definition at line 62 of file floatlib.c.

Referenced by __adddf3(), __addsf3(), __cmpdf2(), __cmpsf2(), __floatdidf(), __floatsidf(), __negdf2(), __negsf2(), __subdf3(), and __subsf3().

#define SIGND fp   )     ((fp.l.upper) & SIGNBIT)
 

Definition at line 73 of file floatlib.c.

Referenced by __adddf3(), __cmpdf2(), __divdf3(), __fixdfdi(), __fixdfsi(), __muldf3(), and __truncdfsf2().


Function Documentation

double __absdf2 double  a1  ) 
 

Definition at line 1005 of file floatlib.c.

References __cmpdf2(), and __negdf2().

Referenced by emu_lpdbr().

Here is the call graph for this function:

float __abssf2 float  a1  ) 
 

Definition at line 1015 of file floatlib.c.

References __cmpsf2(), and __negsf2().

Referenced by emu_lpebr().

Here is the call graph for this function:

double __adddf3 double  a1,
double  a2
 

Definition at line 734 of file floatlib.c.

References double_long::d, EXPD, HIDDEND_LL, double_long::ll, MANTD_LL, PACKD_LL, SIGNBIT, SIGND, and test_done.

Referenced by __subdf3(), emu_adb(), and emu_adbr().

float __addsf3 float  a1,
float  a2
 

Definition at line 125 of file floatlib.c.

References EXP, float_long::f, HIDDEN, float_long::l, MANT, PACK, SIGN, SIGNBIT, and test_done.

Referenced by __subsf3(), emu_aeb(), and emu_aebr().

long __cmpdf2 double  a1,
double  a2
 

Definition at line 575 of file floatlib.c.

References double_long::d, SIGNBIT, and SIGND.

Referenced by __absdf2(), __gedf2(), __gtdf2(), __ledf2(), __ltdf2(), and set_CC_df().

long __cmpsf2 float  a1,
float  a2
 

Definition at line 242 of file floatlib.c.

References float_long::f, float_long::l, SIGN, and SIGNBIT.

Referenced by __abssf2(), and set_CC_sf().

double __divdf3 double  a1,
double  a2
 

Definition at line 896 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, HIDDEND_LL, double_long::ll, long, MANTD_LL, mask, PACKD_LL, result, SIGND, and test_done.

Referenced by emu_ddb(), and emu_ddbr().

float __divsf3 float  a1,
float  a2
 

Definition at line 326 of file floatlib.c.

References EXCESS, EXP, exp, float_long::f, HIDDEN, float_long::l, MANT, mask, PACK, result, SIGN, and xFFFFFFFF.

Referenced by emu_deb(), and emu_debr().

int __eqdf2 double  a1,
double  a2
 

Definition at line 992 of file floatlib.c.

double __extendsfdf2 float  a1  ) 
 

Definition at line 549 of file floatlib.c.

References double_long::d, EXCESS, EXCESSD, EXP, exp, float_long::f, HIDDEN, double_long::l, float_long::l, MANT, and SIGN.

Referenced by __fixsfsi(), emu_ldeb(), and emu_ldebr().

long long __fixdfdi double  a1  ) 
 

Definition at line 645 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, double_long::l, l, long, MANTD_LL, and SIGND.

long __fixdfsi double  a1  ) 
 

Definition at line 610 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, double_long::l, l, MANTD, and SIGND.

Referenced by __fixsfsi(), and emu_cfdbr().

long __fixsfsi float  a1  ) 
 

Definition at line 638 of file floatlib.c.

References __extendsfdf2(), and __fixdfsi().

Referenced by emu_cfebr().

Here is the call graph for this function:

unsigned long long __fixunsdfdi double  a1  ) 
 

Definition at line 705 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, l, and double_long::ll.

unsigned long __fixunsdfsi double  a1  ) 
 

Definition at line 677 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, HIDDEND, double_long::l, and l.

double __floatdidf register long long  a1  ) 
 

Definition at line 478 of file floatlib.c.

References double_long::d, EXCESSD, exp, HIDDEND_LL, double_long::l, double_long::ll, and SIGNBIT.

Referenced by __floatdisf().

float __floatdisf register long long  a1  ) 
 

Definition at line 514 of file floatlib.c.

References __floatdidf().

Here is the call graph for this function:

double __floatsidf register long  a1  ) 
 

Definition at line 429 of file floatlib.c.

References double_long::d, EXCESSD, exp, HIDDEND, double_long::l, SIGNBIT, x40000000, and x80000000.

Referenced by __floatsisf(), and emu_cdfbr().

float __floatsisf register long  a1  ) 
 

Definition at line 508 of file floatlib.c.

References __floatsidf(), and __truncdfsf2().

Referenced by emu_cefbr().

Here is the call graph for this function:

int __gedf2 double  a1,
double  a2
 

Definition at line 974 of file floatlib.c.

References __cmpdf2().

Here is the call graph for this function:

int __gtdf2 double  a1,
double  a2
 

Definition at line 968 of file floatlib.c.

References __cmpdf2().

Here is the call graph for this function:

int __ledf2 double  a1,
double  a2
 

Definition at line 986 of file floatlib.c.

References __cmpdf2().

Here is the call graph for this function:

int __ltdf2 double  a1,
double  a2
 

Definition at line 980 of file floatlib.c.

References __cmpdf2().

Here is the call graph for this function:

double __muldf3 double  a1,
double  a2
 

Definition at line 842 of file floatlib.c.

References double_long::d, EXCESSD, exp, EXPD, HIDDEND_LL, double_long::ll, MANTD_LL, PACKD_LL, result, SIGND, and test_done.

Referenced by emu_mdb(), and emu_mdbr().

float __mulsf3 float  a1,
float  a2
 

Definition at line 269 of file floatlib.c.

References EXCESS, EXP, exp, float_long::f, HIDDEN, float_long::l, MANT, PACK, result, SIGN, and test_done.

Referenced by emu_meeb(), and emu_meebr().

int __nedf2 double  a1,
double  a2
 

Definition at line 998 of file floatlib.c.

double __negdf2 double  a1  ) 
 

Definition at line 534 of file floatlib.c.

References double_long::d, double_long::l, and SIGNBIT.

Referenced by __absdf2(), and emu_lcdbr().

long long __negdi2 long long  u  ) 
 

Definition at line 103 of file floatlib.c.

References s.

float __negsf2 float  a1  ) 
 

Definition at line 520 of file floatlib.c.

References float_long::f, float_long::l, and SIGNBIT.

Referenced by __abssf2(), and emu_lcebr().

double __subdf3 double  a1,
double  a2
 

Definition at line 823 of file floatlib.c.

References __adddf3(), double_long::d, double_long::l, double_long::ll, and SIGNBIT.

Referenced by emu_sdb(), and emu_sdbr().

Here is the call graph for this function:

float __subsf3 float  a1,
float  a2
 

Definition at line 221 of file floatlib.c.

References __addsf3(), float_long::f, float_long::l, and SIGNBIT.

Referenced by emu_seb(), and emu_sebr().

Here is the call graph for this function:

float __truncdfsf2 double  a1  ) 
 

Definition at line 392 of file floatlib.c.

References double_long::d, EXCESS, EXCESSD, exp, EXPD, float_long::f, HIDDEN, float_long::l, double_long::l, MANTD, PACK, and SIGND.

Referenced by __floatsisf(), and emu_ledbr().