generic
[Softloat]

Architecture independent parts of FPU software emulation library. More...

Files

file  add.h
file  common.h
file  comparison.h
file  conversion.h
file  div.h
file  mul.h
file  other.h
file  sftypes.h
file  softfloat.h
file  sub.h
file  add.c
file  common.c
file  comparison.c
file  conversion.c
file  div.c
file  mul.c
file  other.c
file  softfloat.c
file  sub.c

Data Structures

union  float32
union  float64

Defines

#define FLOAT32_MAX   0x7f800000
#define FLOAT32_MIN   0xff800000
#define FLOAT64_MAX
#define FLOAT64_MIN
#define FLOAT32_NAN   0x7FC00001
#define FLOAT32_SIGNAN   0x7F800001
#define FLOAT32_INF   0x7F800000
#define FLOAT64_NAN   0x7FF8000000000001ll
#define FLOAT64_SIGNAN   0x7FF0000000000001ll
#define FLOAT64_INF   0x7FF0000000000000ll
#define FLOAT32_FRACTION_SIZE   23
#define FLOAT64_FRACTION_SIZE   52
#define FLOAT32_HIDDEN_BIT_MASK   0x800000
#define FLOAT64_HIDDEN_BIT_MASK   0x10000000000000ll
#define FLOAT32_MAX_EXPONENT   0xFF
#define FLOAT64_MAX_EXPONENT   0x7FF
#define FLOAT32_BIAS   0x7F
#define FLOAT64_BIAS   0x3FF
#define FLOAT80_BIAS   0x3FFF

Functions

float32 addFloat32 (float32 a, float32 b)
float64 addFloat64 (float64 a, float64 b)
float64 finishFloat64 (int32_t cexp, uint64_t cfrac, char sign)
int countZeroes64 (uint64_t i)
int countZeroes32 (uint32_t i)
int countZeroes8 (uint8_t i)
void roundFloat32 (int32_t *exp, uint32_t *fraction)
void roundFloat64 (int32_t *exp, uint64_t *fraction)
int isFloat32NaN (float32 f)
int isFloat32SigNaN (float32 f)
int isFloat32Infinity (float32 f)
int isFloat32Zero (float32 f)
int isFloat64NaN (float64 d)
int isFloat64SigNaN (float64 d)
int isFloat64Infinity (float64 d)
int isFloat64Zero (float64 d)
int isFloat32eq (float32 a, float32 b)
int isFloat32lt (float32 a, float32 b)
int isFloat32gt (float32 a, float32 b)
float64 convertFloat32ToFloat64 (float32 a)
float32 convertFloat64ToFloat32 (float64 a)
uint32_t float32_to_uint32 (float32 a)
int32_t float32_to_int32 (float32 a)
uint64_t float32_to_uint64 (float32 a)
int64_t float32_to_int64 (float32 a)
uint64_t float64_to_uint64 (float64 a)
int64_t float64_to_int64 (float64 a)
uint32_t float64_to_uint32 (float64 a)
int32_t float64_to_int32 (float64 a)
float32 uint32_to_float32 (uint32_t i)
float32 int32_to_float32 (int32_t i)
float32 uint64_to_float32 (uint64_t i)
float32 int64_to_float32 (int64_t i)
float64 uint32_to_float64 (uint32_t i)
float64 int32_to_float64 (int32_t i)
float64 uint64_to_float64 (uint64_t i)
float64 int64_to_float64 (int64_t i)
float32 divFloat32 (float32 a, float32 b)
float64 divFloat64 (float64 a, float64 b)
uint64_t divFloat64estim (uint64_t a, uint64_t b)
float32 mulFloat32 (float32 a, float32 b)
float64 mulFloat64 (float64 a, float64 b)
void mul64integers (uint64_t a, uint64_t b, uint64_t *lo, uint64_t *hi)
float __addsf3 (float a, float b)
double __adddf3 (double a, double b)
long double __addtf3 (long double a, long double b)
long double __addxf3 (long double a, long double b)
float __subsf3 (float a, float b)
double __subdf3 (double a, double b)
long double __subtf3 (long double a, long double b)
long double __subxf3 (long double a, long double b)
float __mulsf3 (float a, float b)
double __muldf3 (double a, double b)
long double __multf3 (long double a, long double b)
long double __mulxf3 (long double a, long double b)
float __divsf3 (float a, float b)
double __divdf3 (double a, double b)
long double __divtf3 (long double a, long double b)
long double __divxf3 (long double a, long double b)
float __negsf2 (float a)
double __negdf2 (double a)
long double __negtf2 (long double a)
long double __negxf2 (long double a)
double __extendsfdf2 (float a)
long double __extendsftf2 (float a)
long double __extendsfxf2 (float a)
long double __extenddftf2 (double a)
long double __extenddfxf2 (double a)
double __truncxfdf2 (long double a)
double __trunctfdf2 (long double a)
float __truncxfsf2 (long double a)
float __trunctfsf2 (long double a)
float __truncdfsf2 (double a)
int __fixsfsi (float a)
int __fixdfsi (double a)
int __fixtfsi (long double a)
int __fixxfsi (long double a)
long __fixsfdi (float a)
long __fixdfdi (double a)
long __fixtfdi (long double a)
long __fixxfdi (long double a)
long long __fixsfti (float a)
long long __fixdfti (double a)
long long __fixtfti (long double a)
long long __fixxfti (long double a)
unsigned int __fixunssfsi (float a)
unsigned int __fixunsdfsi (double a)
unsigned int __fixunstfsi (long double a)
unsigned int __fixunsxfsi (long double a)
unsigned long __fixunssfdi (float a)
unsigned long __fixunsdfdi (double a)
unsigned long __fixunstfdi (long double a)
unsigned long __fixunsxfdi (long double a)
unsigned long long __fixunssfti (float a)
unsigned long long __fixunsdfti (double a)
unsigned long long __fixunstfti (long double a)
unsigned long long __fixunsxfti (long double a)
float __floatsisf (int i)
double __floatsidf (int i)
long double __floatsitf (int i)
long double __floatsixf (int i)
float __floatdisf (long i)
double __floatdidf (long i)
long double __floatditf (long i)
long double __floatdixf (long i)
float __floattisf (long long i)
double __floattidf (long long i)
long double __floattitf (long long i)
long double __floattixf (long long i)
float __floatunsisf (unsigned int i)
double __floatunsidf (unsigned int i)
long double __floatunsitf (unsigned int i)
long double __floatunsixf (unsigned int i)
float __floatundisf (unsigned long i)
double __floatundidf (unsigned long i)
long double __floatunditf (unsigned long i)
long double __floatundixf (unsigned long i)
float __floatuntisf (unsigned long long i)
double __floatuntidf (unsigned long long i)
long double __floatuntitf (unsigned long long i)
long double __floatuntixf (unsigned long long i)
int __cmpsf2 (float a, float b)
int __cmpdf2 (double a, double b)
int __cmptf2 (long double a, long double b)
int __unordsf2 (float a, float b)
int __unorddf2 (double a, double b)
int __unordtf2 (long double a, long double b)
int __eqsf2 (float a, float b)
int __eqdf2 (double a, double b)
int __eqtf2 (long double a, long double b)
int __nesf2 (float a, float b)
int __nedf2 (double a, double b)
int __netf2 (long double a, long double b)
int __gesf2 (float a, float b)
int __gedf2 (double a, double b)
int __getf2 (long double a, long double b)
int __ltsf2 (float a, float b)
int __ltdf2 (double a, double b)
int __lttf2 (long double a, long double b)
int __lesf2 (float a, float b)
int __ledf2 (double a, double b)
int __letf2 (long double a, long double b)
int __gtsf2 (float a, float b)
int __gtdf2 (double a, double b)
int __gttf2 (long double a, long double b)
float __powisf2 (float a, int b)
float32 subFloat32 (float32 a, float32 b)
float64 subFloat64 (float64 a, float64 b)
static uint32_t _float32_to_uint32_helper (float32 a)
static uint64_t _float64_to_uint64_helper (float64 a)
static uint64_t _float32_to_uint64_helper (float32 a)

Variables

char zeroTable [256]

Detailed Description


Define Documentation

#define FLOAT32_MAX   0x7f800000
 

Definition at line 79 of file sftypes.h.

#define FLOAT32_MIN   0xff800000
 

Definition at line 80 of file sftypes.h.

#define FLOAT64_MAX
 

Definition at line 81 of file sftypes.h.

#define FLOAT64_MIN
 

Definition at line 82 of file sftypes.h.

#define FLOAT32_NAN   0x7FC00001
 

Definition at line 85 of file sftypes.h.

Referenced by __powisf2(), divFloat32(), mulFloat32(), and subFloat32().

#define FLOAT32_SIGNAN   0x7F800001
 

Definition at line 86 of file sftypes.h.

#define FLOAT32_INF   0x7F800000
 

Definition at line 87 of file sftypes.h.

Referenced by mulFloat32().

#define FLOAT64_NAN   0x7FF8000000000001ll
 

Definition at line 89 of file sftypes.h.

Referenced by divFloat64(), mulFloat64(), and subFloat64().

#define FLOAT64_SIGNAN   0x7FF0000000000001ll
 

Definition at line 90 of file sftypes.h.

#define FLOAT64_INF   0x7FF0000000000000ll
 

Definition at line 91 of file sftypes.h.

#define FLOAT32_FRACTION_SIZE   23
 

Definition at line 93 of file sftypes.h.

Referenced by _float32_to_uint32_helper(), _float32_to_uint64_helper(), addFloat32(), convertFloat32ToFloat64(), convertFloat64ToFloat32(), divFloat32(), mulFloat32(), and subFloat32().

#define FLOAT64_FRACTION_SIZE   52
 

Definition at line 94 of file sftypes.h.

Referenced by _float64_to_uint64_helper(), convertFloat32ToFloat64(), convertFloat64ToFloat32(), divFloat64(), finishFloat64(), mulFloat64(), and subFloat64().

#define FLOAT32_HIDDEN_BIT_MASK   0x800000
 

Definition at line 96 of file sftypes.h.

Referenced by _float32_to_uint32_helper(), _float32_to_uint64_helper(), addFloat32(), divFloat32(), mulFloat32(), roundFloat32(), and subFloat32().

#define FLOAT64_HIDDEN_BIT_MASK   0x10000000000000ll
 

Definition at line 97 of file sftypes.h.

Referenced by _float64_to_uint64_helper(), divFloat64(), finishFloat64(), mulFloat64(), roundFloat64(), and subFloat64().

#define FLOAT32_MAX_EXPONENT   0xFF
 

Definition at line 99 of file sftypes.h.

Referenced by addFloat32(), divFloat32(), mulFloat32(), roundFloat32(), and subFloat32().

#define FLOAT64_MAX_EXPONENT   0x7FF
 

Definition at line 100 of file sftypes.h.

Referenced by addFloat64(), roundFloat64(), and subFloat64().

#define FLOAT32_BIAS   0x7F
 

Definition at line 102 of file sftypes.h.

Referenced by _float32_to_uint32_helper(), _float32_to_uint64_helper(), convertFloat32ToFloat64(), convertFloat64ToFloat32(), divFloat32(), float32_to_int32(), float32_to_int64(), float32_to_uint32(), float32_to_uint64(), mulFloat32(), uint32_to_float32(), and uint64_to_float32().

#define FLOAT64_BIAS   0x3FF
 

Definition at line 103 of file sftypes.h.

Referenced by _float64_to_uint64_helper(), convertFloat32ToFloat64(), convertFloat64ToFloat32(), divFloat64(), float64_to_int32(), float64_to_int64(), float64_to_uint32(), float64_to_uint64(), mulFloat64(), uint32_to_float64(), and uint64_to_float64().

#define FLOAT80_BIAS   0x3FFF
 

Definition at line 104 of file sftypes.h.


Function Documentation

float32 addFloat32 float32  a,
float32  b
 

Add two Float32 numbers with same signs

Definition at line 41 of file add.c.

References float32::exp, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, FLOAT32_MAX_EXPONENT, float32::fraction, isFloat32NaN(), and isFloat32SigNaN().

Referenced by __addsf3(), and __subsf3().

Here is the call graph for this function:

float64 addFloat64 float64  a,
float64  b
 

Add two Float64 numbers with same signs

Definition at line 149 of file add.c.

References float64::exp, FLOAT64_MAX_EXPONENT, float64::fraction, isFloat64NaN(), and isFloat64SigNaN().

Referenced by __adddf3(), and __subdf3().

Here is the call graph for this function:

float64 finishFloat64 int32_t  cexp,
uint64_t  cfrac,
char  sign
 

Take fraction shifted by 10 bits to left, round it, normalize it and detect exceptions

Parameters:
cexp exponent with bias
cfrac fraction shifted 10 places left with added hidden bit
sign 
Returns:
valied float64

Definition at line 66 of file common.c.

References float64::exp, FLOAT64_FRACTION_SIZE, FLOAT64_HIDDEN_BIT_MASK, float64::fraction, and float64::sign.

Referenced by divFloat64(), and mulFloat64().

int countZeroes64 uint64_t  i  ) 
 

Counts leading zeroes in 64bit unsigned integer

Parameters:
i 

Definition at line 128 of file common.c.

References countZeroes8().

Referenced by uint64_to_float32(), and uint64_to_float64().

Here is the call graph for this function:

int countZeroes32 uint32_t  i  ) 
 

Counts leading zeroes in 32bit unsigned integer

Parameters:
i 

Definition at line 143 of file common.c.

References countZeroes8().

Referenced by uint32_to_float32(), and uint32_to_float64().

Here is the call graph for this function:

int countZeroes8 uint8_t  i  ) 
 

Counts leading zeroes in byte

Parameters:
i 

Definition at line 158 of file common.c.

References zeroTable.

Referenced by countZeroes32(), and countZeroes64().

void roundFloat32 int32_t exp,
uint32_t fraction
 

Round and normalize number expressed by exponent and fraction with first bit (equal to hidden bit) at 30. bit

Parameters:
exp exponent
fraction part with hidden bit shifted to 30. bit

Definition at line 167 of file common.c.

References FLOAT32_HIDDEN_BIT_MASK, and FLOAT32_MAX_EXPONENT.

Referenced by uint32_to_float32(), and uint64_to_float32().

void roundFloat64 int32_t exp,
uint64_t fraction
 

Round and normalize number expressed by exponent and fraction with first bit (equal to hidden bit) at 62. bit

Parameters:
exp exponent
fraction part with hidden bit shifted to 62. bit

Definition at line 192 of file common.c.

References FLOAT64_HIDDEN_BIT_MASK, and FLOAT64_MAX_EXPONENT.

Referenced by uint32_to_float64(), and uint64_to_float64().

int isFloat32NaN float32  f  ) 
 

Definition at line 38 of file comparison.c.

References float32::exp, and float32::fraction.

Referenced by __cmpsf2(), __eqsf2(), __gesf2(), __gtsf2(), __lesf2(), __ltsf2(), __unordsf2(), addFloat32(), convertFloat32ToFloat64(), divFloat32(), float32_to_int32(), float32_to_int64(), float32_to_uint32(), float32_to_uint64(), mulFloat32(), and subFloat32().

int isFloat32SigNaN float32  f  ) 
 

Definition at line 48 of file comparison.c.

References float32::exp, and float32::fraction.

Referenced by addFloat32(), divFloat32(), mulFloat32(), and subFloat32().

int isFloat32Infinity float32  f  ) 
 

Definition at line 58 of file comparison.c.

References float32::exp, and float32::fraction.

Referenced by convertFloat32ToFloat64(), divFloat32(), float32_to_int32(), float32_to_int64(), float32_to_uint32(), float32_to_uint64(), and mulFloat32().

int isFloat32Zero float32  f  ) 
 

Definition at line 68 of file comparison.c.

References float32::binary.

Referenced by divFloat32(), and mulFloat32().

int isFloat64NaN float64  d  ) 
 

Definition at line 43 of file comparison.c.

References float64::exp, and float64::fraction.

Referenced by addFloat64(), convertFloat64ToFloat32(), divFloat64(), float64_to_int32(), float64_to_int64(), float64_to_uint32(), float64_to_uint64(), mulFloat64(), and subFloat64().

int isFloat64SigNaN float64  d  ) 
 

Definition at line 53 of file comparison.c.

References float64::exp, and float64::fraction.

Referenced by addFloat64(), convertFloat64ToFloat32(), divFloat64(), mulFloat64(), and subFloat64().

int isFloat64Infinity float64  d  ) 
 

Definition at line 63 of file comparison.c.

References float64::exp, and float64::fraction.

Referenced by convertFloat64ToFloat32(), divFloat64(), float64_to_int32(), float64_to_int64(), float64_to_uint32(), float64_to_uint64(), and mulFloat64().

int isFloat64Zero float64  d  ) 
 

Definition at line 73 of file comparison.c.

References float64::binary.

Referenced by divFloat64(), and mulFloat64().

int isFloat32eq float32  a,
float32  b
 

Returns:
1, if both floats are equal - but NaNs are not recognized

Definition at line 81 of file comparison.c.

References float32::binary.

Referenced by __cmpsf2(), __eqsf2(), __gesf2(), and __lesf2().

int isFloat32lt float32  a,
float32  b
 

Returns:
1, if a<b - but NaNs are not recognized

Definition at line 89 of file comparison.c.

References float32::binary, and float32::sign.

Referenced by __cmpsf2(), __lesf2(), and __ltsf2().

int isFloat32gt float32  a,
float32  b
 

Returns:
1, if a>b - but NaNs are not recognized

Definition at line 110 of file comparison.c.

References float32::binary, and float32::sign.

Referenced by __gesf2(), and __gtsf2().

float64 convertFloat32ToFloat64 float32  a  ) 
 

Definition at line 40 of file conversion.c.

References float32::exp, float64::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT64_BIAS, FLOAT64_FRACTION_SIZE, float32::fraction, float64::fraction, isFloat32Infinity(), isFloat32NaN(), float32::sign, and float64::sign.

Referenced by __extendsfdf2().

Here is the call graph for this function:

float32 convertFloat64ToFloat32 float64  a  ) 
 

Definition at line 79 of file conversion.c.

References float64::exp, float32::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT64_BIAS, FLOAT64_FRACTION_SIZE, float64::fraction, float32::fraction, isFloat64Infinity(), isFloat64NaN(), isFloat64SigNaN(), float64::sign, and float32::sign.

Referenced by __truncdfsf2().

Here is the call graph for this function:

uint32_t float32_to_uint32 float32  a  ) 
 

Definition at line 181 of file conversion.c.

References _float32_to_uint32_helper(), float32::exp, FLOAT32_BIAS, isFloat32Infinity(), isFloat32NaN(), MAX_UINT32, MIN_UINT32, and float32::sign.

Here is the call graph for this function:

int32_t float32_to_int32 float32  a  ) 
 

Definition at line 201 of file conversion.c.

References _float32_to_uint32_helper(), float32::exp, FLOAT32_BIAS, isFloat32Infinity(), isFloat32NaN(), MAX_INT32, MIN_INT32, and float32::sign.

Here is the call graph for this function:

uint64_t float32_to_uint64 float32  a  ) 
 

Definition at line 320 of file conversion.c.

References _float32_to_uint64_helper(), float32::exp, FLOAT32_BIAS, isFloat32Infinity(), isFloat32NaN(), MAX_UINT64, MIN_UINT64, and float32::sign.

Here is the call graph for this function:

int64_t float32_to_int64 float32  a  ) 
 

Definition at line 340 of file conversion.c.

References _float32_to_uint64_helper(), float32::exp, FLOAT32_BIAS, isFloat32Infinity(), isFloat32NaN(), MAX_INT64, MIN_INT64, and float32::sign.

Here is the call graph for this function:

uint64_t float64_to_uint64 float64  a  ) 
 

Definition at line 249 of file conversion.c.

References _float64_to_uint64_helper(), float64::exp, FLOAT64_BIAS, isFloat64Infinity(), isFloat64NaN(), MAX_UINT64, MIN_UINT64, and float64::sign.

Here is the call graph for this function:

int64_t float64_to_int64 float64  a  ) 
 

Definition at line 269 of file conversion.c.

References _float64_to_uint64_helper(), float64::exp, FLOAT64_BIAS, isFloat64Infinity(), isFloat64NaN(), MAX_INT64, MIN_INT64, and float64::sign.

Here is the call graph for this function:

uint32_t float64_to_uint32 float64  a  ) 
 

Definition at line 360 of file conversion.c.

References _float64_to_uint64_helper(), float64::exp, FLOAT64_BIAS, isFloat64Infinity(), isFloat64NaN(), MAX_UINT32, MIN_UINT32, and float64::sign.

Here is the call graph for this function:

int32_t float64_to_int32 float64  a  ) 
 

Definition at line 380 of file conversion.c.

References _float64_to_uint64_helper(), float64::exp, FLOAT64_BIAS, isFloat64Infinity(), isFloat64NaN(), MAX_INT32, MIN_INT32, and float64::sign.

Here is the call graph for this function:

float32 uint32_to_float32 uint32_t  i  ) 
 

Convert unsigned integer to float32

Definition at line 399 of file conversion.c.

References float32::binary, countZeroes32(), float32::exp, FLOAT32_BIAS, float32::fraction, roundFloat32(), and float32::sign.

Referenced by int32_to_float32().

Here is the call graph for this function:

float32 int32_to_float32 int32_t  i  ) 
 

Definition at line 431 of file conversion.c.

References float32::sign, and uint32_to_float32().

Here is the call graph for this function:

float32 uint64_to_float32 uint64_t  i  ) 
 

Definition at line 447 of file conversion.c.

References float32::binary, countZeroes64(), float32::exp, FLOAT32_BIAS, float32::fraction, roundFloat32(), and float32::sign.

Referenced by int64_to_float32().

Here is the call graph for this function:

float32 int64_to_float32 int64_t  i  ) 
 

Definition at line 481 of file conversion.c.

References float32::sign, and uint64_to_float32().

Here is the call graph for this function:

float64 uint32_to_float64 uint32_t  i  ) 
 

Convert unsigned integer to float64

Definition at line 500 of file conversion.c.

References float64::binary, countZeroes32(), float64::exp, FLOAT64_BIAS, float64::fraction, roundFloat64(), and float64::sign.

Referenced by int32_to_float64().

Here is the call graph for this function:

float64 int32_to_float64 int32_t  i  ) 
 

Definition at line 530 of file conversion.c.

References float64::sign, and uint32_to_float64().

Here is the call graph for this function:

float64 uint64_to_float64 uint64_t  i  ) 
 

Definition at line 546 of file conversion.c.

References float64::binary, countZeroes64(), float64::exp, FLOAT64_BIAS, float64::fraction, roundFloat64(), and float64::sign.

Referenced by int64_to_float64().

Here is the call graph for this function:

float64 int64_to_float64 int64_t  i  ) 
 

Definition at line 577 of file conversion.c.

References float64::sign, and uint64_to_float64().

Here is the call graph for this function:

float32 divFloat32 float32  a,
float32  b
 

Definition at line 43 of file div.c.

References float32::binary, float32::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, FLOAT32_MAX_EXPONENT, FLOAT32_NAN, float32::fraction, isFloat32Infinity(), isFloat32NaN(), isFloat32SigNaN(), isFloat32Zero(), and float32::sign.

Referenced by __divsf3().

Here is the call graph for this function:

float64 divFloat64 float64  a,
float64  b
 

Definition at line 197 of file div.c.

References float64::binary, divFloat64estim(), float64::exp, finishFloat64(), FLOAT64_BIAS, FLOAT64_FRACTION_SIZE, FLOAT64_HIDDEN_BIT_MASK, FLOAT64_NAN, float64::fraction, isFloat64Infinity(), isFloat64NaN(), isFloat64SigNaN(), isFloat64Zero(), mul64integers(), and float64::sign.

Referenced by __divdf3().

Here is the call graph for this function:

uint64_t divFloat64estim uint64_t  a,
uint64_t  b
 

Definition at line 329 of file div.c.

References mul64integers().

Referenced by divFloat64().

Here is the call graph for this function:

float32 mulFloat32 float32  a,
float32  b
 

Multiply two 32 bit float numbers

Definition at line 43 of file mul.c.

References float32::binary, float32::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, FLOAT32_INF, FLOAT32_MAX_EXPONENT, FLOAT32_NAN, float32::fraction, isFloat32Infinity(), isFloat32NaN(), isFloat32SigNaN(), isFloat32Zero(), and float32::sign.

Referenced by __mulsf3().

Here is the call graph for this function:

float64 mulFloat64 float64  a,
float64  b
 

Multiply two 64 bit float numbers

Definition at line 179 of file mul.c.

References float64::binary, float64::exp, finishFloat64(), FLOAT64_BIAS, FLOAT64_FRACTION_SIZE, FLOAT64_HIDDEN_BIT_MASK, FLOAT64_NAN, float64::fraction, isFloat64Infinity(), isFloat64NaN(), isFloat64SigNaN(), isFloat64Zero(), mul64integers(), and float64::sign.

Referenced by __muldf3().

Here is the call graph for this function:

void mul64integers uint64_t  a,
uint64_t  b,
uint64_t lo,
uint64_t hi
 

Multiply two 64 bit numbers and return result in two parts

Parameters:
a first operand
b second operand
lo lower part from result
hi higher part of result

Definition at line 266 of file mul.c.

Referenced by divFloat64(), divFloat64estim(), and mulFloat64().

float __addsf3 float  a,
float  b
 

Definition at line 53 of file softfloat.c.

References addFloat32(), float32::f, float32::sign, and subFloat32().

Here is the call graph for this function:

double __adddf3 double  a,
double  b
 

Definition at line 69 of file softfloat.c.

References addFloat64(), float64::d, float64::sign, and subFloat64().

Here is the call graph for this function:

long double __addtf3 long double  a,
long double  b
 

long double __addxf3 long double  a,
long double  b
 

float __subsf3 float  a,
float  b
 

Definition at line 85 of file softfloat.c.

References addFloat32(), float32::f, float32::sign, and subFloat32().

Here is the call graph for this function:

double __subdf3 double  a,
double  b
 

Definition at line 97 of file softfloat.c.

References addFloat64(), float64::d, float64::sign, and subFloat64().

Here is the call graph for this function:

long double __subtf3 long double  a,
long double  b
 

long double __subxf3 long double  a,
long double  b
 

float __mulsf3 float  a,
float  b
 

Definition at line 109 of file softfloat.c.

References float32::f, and mulFloat32().

Here is the call graph for this function:

double __muldf3 double  a,
double  b
 

Definition at line 117 of file softfloat.c.

References float64::d, and mulFloat64().

Here is the call graph for this function:

long double __multf3 long double  a,
long double  b
 

long double __mulxf3 long double  a,
long double  b
 

float __divsf3 float  a,
float  b
 

Definition at line 125 of file softfloat.c.

References divFloat32(), and float32::f.

Here is the call graph for this function:

double __divdf3 double  a,
double  b
 

Definition at line 133 of file softfloat.c.

References float64::d, and divFloat64().

Here is the call graph for this function:

long double __divtf3 long double  a,
long double  b
 

long double __divxf3 long double  a,
long double  b
 

float __negsf2 float  a  ) 
 

Definition at line 141 of file softfloat.c.

References float32::f, and float32::sign.

double __negdf2 double  a  ) 
 

Definition at line 149 of file softfloat.c.

References float64::d, and float64::sign.

long double __negtf2 long double  a  ) 
 

long double __negxf2 long double  a  ) 
 

double __extendsfdf2 float  a  ) 
 

Definition at line 159 of file softfloat.c.

References convertFloat32ToFloat64(), float64::d, and float32::f.

Here is the call graph for this function:

long double __extendsftf2 float  a  ) 
 

long double __extendsfxf2 float  a  ) 
 

long double __extenddftf2 double  a  ) 
 

long double __extenddfxf2 double  a  ) 
 

double __truncxfdf2 long double  a  ) 
 

double __trunctfdf2 long double  a  ) 
 

float __truncxfsf2 long double  a  ) 
 

float __trunctfsf2 long double  a  ) 
 

float __truncdfsf2 double  a  ) 
 

Definition at line 166 of file softfloat.c.

References convertFloat64ToFloat32(), float64::d, and float32::f.

Here is the call graph for this function:

int __fixsfsi float  a  ) 
 

Definition at line 173 of file softfloat.c.

References float32::f, and float32_to_int.

int __fixdfsi double  a  ) 
 

Definition at line 180 of file softfloat.c.

References float64::d, and float64_to_int.

int __fixtfsi long double  a  ) 
 

int __fixxfsi long double  a  ) 
 

long __fixsfdi float  a  ) 
 

Definition at line 188 of file softfloat.c.

References float32::f, and float32_to_long.

long __fixdfdi double  a  ) 
 

Definition at line 195 of file softfloat.c.

References float64::d, and float64_to_long.

long __fixtfdi long double  a  ) 
 

long __fixxfdi long double  a  ) 
 

long long __fixsfti float  a  ) 
 

Definition at line 203 of file softfloat.c.

References float32::f, and float32_to_longlong.

long long __fixdfti double  a  ) 
 

Definition at line 210 of file softfloat.c.

References float64::d, and float64_to_longlong.

long long __fixtfti long double  a  ) 
 

long long __fixxfti long double  a  ) 
 

unsigned int __fixunssfsi float  a  ) 
 

Definition at line 218 of file softfloat.c.

References float32::f, and float32_to_uint.

unsigned int __fixunsdfsi double  a  ) 
 

Definition at line 225 of file softfloat.c.

References float64::d, and float64_to_uint.

unsigned int __fixunstfsi long double  a  ) 
 

unsigned int __fixunsxfsi long double  a  ) 
 

unsigned long __fixunssfdi float  a  ) 
 

Definition at line 233 of file softfloat.c.

References float32::f, and float32_to_ulong.

unsigned long __fixunsdfdi double  a  ) 
 

Definition at line 240 of file softfloat.c.

References float64::d, and float64_to_ulong.

unsigned long __fixunstfdi long double  a  ) 
 

unsigned long __fixunsxfdi long double  a  ) 
 

unsigned long long __fixunssfti float  a  ) 
 

Definition at line 248 of file softfloat.c.

References float32::f, and float32_to_ulonglong.

unsigned long long __fixunsdfti double  a  ) 
 

Definition at line 255 of file softfloat.c.

References float64::d, and float64_to_ulonglong.

unsigned long long __fixunstfti long double  a  ) 
 

unsigned long long __fixunsxfti long double  a  ) 
 

float __floatsisf int  i  ) 
 

Definition at line 263 of file softfloat.c.

References float32::f, and int_to_float32.

double __floatsidf int  i  ) 
 

Definition at line 270 of file softfloat.c.

References float64::d, and int_to_float64.

long double __floatsitf int  i  ) 
 

long double __floatsixf int  i  ) 
 

float __floatdisf long  i  ) 
 

Definition at line 278 of file softfloat.c.

References float32::f, and long_to_float32.

double __floatdidf long  i  ) 
 

Definition at line 285 of file softfloat.c.

References float64::d, and long_to_float64.

long double __floatditf long  i  ) 
 

long double __floatdixf long  i  ) 
 

float __floattisf long long  i  ) 
 

Definition at line 293 of file softfloat.c.

References float32::f, and longlong_to_float32.

double __floattidf long long  i  ) 
 

Definition at line 300 of file softfloat.c.

References float64::d, and longlong_to_float64.

long double __floattitf long long  i  ) 
 

long double __floattixf long long  i  ) 
 

float __floatunsisf unsigned int  i  ) 
 

Definition at line 308 of file softfloat.c.

References float32::f, and uint_to_float32.

double __floatunsidf unsigned int  i  ) 
 

Definition at line 315 of file softfloat.c.

References float64::d, and uint_to_float64.

long double __floatunsitf unsigned int  i  ) 
 

long double __floatunsixf unsigned int  i  ) 
 

float __floatundisf unsigned long  i  ) 
 

Definition at line 323 of file softfloat.c.

References float32::f, and ulong_to_float32.

double __floatundidf unsigned long  i  ) 
 

Definition at line 330 of file softfloat.c.

References float64::d, and ulong_to_float64.

long double __floatunditf unsigned long  i  ) 
 

long double __floatundixf unsigned long  i  ) 
 

float __floatuntisf unsigned long long  i  ) 
 

Definition at line 338 of file softfloat.c.

References float32::f, and ulonglong_to_float32.

double __floatuntidf unsigned long long  i  ) 
 

Definition at line 345 of file softfloat.c.

References float64::d, and ulonglong_to_float64.

long double __floatuntitf unsigned long long  i  ) 
 

long double __floatuntixf unsigned long long  i  ) 
 

int __cmpsf2 float  a,
float  b
 

Definition at line 361 of file softfloat.c.

References float32::f, isFloat32eq(), isFloat32lt(), and isFloat32NaN().

Here is the call graph for this function:

int __cmpdf2 double  a,
double  b
 

int __cmptf2 long double  a,
long double  b
 

int __unordsf2 float  a,
float  b
 

Definition at line 381 of file softfloat.c.

References float32::f, and isFloat32NaN().

Here is the call graph for this function:

int __unorddf2 double  a,
double  b
 

int __unordtf2 long double  a,
long double  b
 

int __eqsf2 float  a,
float  b
 

Returns:
zero, if neither argument is a NaN and are equal

Definition at line 392 of file softfloat.c.

References float32::f, isFloat32eq(), and isFloat32NaN().

Referenced by __nesf2().

Here is the call graph for this function:

int __eqdf2 double  a,
double  b
 

int __eqtf2 long double  a,
long double  b
 

int __nesf2 float  a,
float  b
 

Definition at line 405 of file softfloat.c.

References __eqsf2().

Here is the call graph for this function:

int __nedf2 double  a,
double  b
 

int __netf2 long double  a,
long double  b
 

int __gesf2 float  a,
float  b
 

Definition at line 411 of file softfloat.c.

References float32::f, isFloat32eq(), isFloat32gt(), and isFloat32NaN().

Here is the call graph for this function:

int __gedf2 double  a,
double  b
 

int __getf2 long double  a,
long double  b
 

int __ltsf2 float  a,
float  b
 

Return negative value, if a<b and neither is NaN

Definition at line 433 of file softfloat.c.

References float32::f, isFloat32lt(), and isFloat32NaN().

Here is the call graph for this function:

int __ltdf2 double  a,
double  b
 

int __lttf2 long double  a,
long double  b
 

int __lesf2 float  a,
float  b
 

Definition at line 449 of file softfloat.c.

References float32::f, isFloat32eq(), isFloat32lt(), and isFloat32NaN().

Here is the call graph for this function:

int __ledf2 double  a,
double  b
 

int __letf2 long double  a,
long double  b
 

int __gtsf2 float  a,
float  b
 

Return positive value, if a>b and neither is NaN

Definition at line 471 of file softfloat.c.

References float32::f, isFloat32gt(), and isFloat32NaN().

Here is the call graph for this function:

int __gtdf2 double  a,
double  b
 

int __gttf2 long double  a,
long double  b
 

float __powisf2 float  a,
int  b
 

Definition at line 488 of file softfloat.c.

References float32::binary, float32::f, and FLOAT32_NAN.

float32 subFloat32 float32  a,
float32  b
 

Subtract two float32 numbers with same signs

Definition at line 41 of file sub.c.

References float32::binary, float32::exp, float32::f, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, FLOAT32_MAX_EXPONENT, FLOAT32_NAN, float32::fraction, isFloat32NaN(), isFloat32SigNaN(), and float32::sign.

Referenced by __addsf3(), and __subsf3().

Here is the call graph for this function:

float64 subFloat64 float64  a,
float64  b
 

Subtract two float64 numbers with same signs

Definition at line 152 of file sub.c.

References float64::binary, float64::d, float64::exp, FLOAT64_FRACTION_SIZE, FLOAT64_HIDDEN_BIT_MASK, FLOAT64_MAX_EXPONENT, FLOAT64_NAN, float64::fraction, isFloat64NaN(), isFloat64SigNaN(), and float64::sign.

Referenced by __adddf3(), and __subdf3().

Here is the call graph for this function:

static uint32_t _float32_to_uint32_helper float32  a  )  [static]
 

Helping procedure for converting float32 to uint32

Parameters:
a floating point number in normalized form (no NaNs or Inf are checked )
Returns:
unsigned integer

Definition at line 153 of file conversion.c.

References float32::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, float32::fraction, and float32::sign.

Referenced by float32_to_int32(), and float32_to_uint32().

static uint64_t _float64_to_uint64_helper float64  a  )  [static]
 

Helping procedure for converting float64 to uint64

Parameters:
a floating point number in normalized form (no NaNs or Inf are checked )
Returns:
unsigned integer

Definition at line 221 of file conversion.c.

References float64::exp, FLOAT64_BIAS, FLOAT64_FRACTION_SIZE, FLOAT64_HIDDEN_BIT_MASK, float64::fraction, and float64::sign.

Referenced by float64_to_int32(), float64_to_int64(), float64_to_uint32(), and float64_to_uint64().

static uint64_t _float32_to_uint64_helper float32  a  )  [static]
 

Helping procedure for converting float32 to uint64

Parameters:
a floating point number in normalized form (no NaNs or Inf are checked )
Returns:
unsigned integer

Definition at line 292 of file conversion.c.

References float32::exp, FLOAT32_BIAS, FLOAT32_FRACTION_SIZE, FLOAT32_HIDDEN_BIT_MASK, float32::fraction, and float32::sign.

Referenced by float32_to_int64(), and float32_to_uint64().


Variable Documentation

char zeroTable[256]
 

Initial value:

 {
        8, 7, 7, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 39 of file common.c.

Referenced by countZeroes8().


Generated on Sun Jun 18 18:05:24 2006 for HelenOS Userspace (ia64) by  doxygen 1.4.6