Changeset 750636a in mainline


Ignore:
Timestamp:
2011-05-06T14:21:25Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7b90778d, b5e68c8
Parents:
042fbe0
Message:

softfloat: slightly improve coding style (no change in functionality)

Location:
uspace/lib/softfloat
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/softfloat/generic/add.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<add.h>
    37 #include<comparison.h>
     35#include <sftypes.h>
     36#include <add.h>
     37#include <comparison.h>
    3838
    3939/** Add two Float32 numbers with same signs
     
    139139        a.parts.exp = exp1;
    140140       
    141         /*Clear hidden bit and shift */
     141        /* Clear hidden bit and shift */
    142142        a.parts.fraction = ((frac1 >> 6) & (~FLOAT32_HIDDEN_BIT_MASK)) ;
    143143        return a;
    144144}
    145 
    146145
    147146/** Add two Float64 numbers with same signs
     
    250249       
    251250        a.parts.exp = exp1;
    252         /*Clear hidden bit and shift */
     251        /* Clear hidden bit and shift */
    253252        a.parts.fraction = ( (frac1 >> 6 ) & (~FLOAT64_HIDDEN_BIT_MASK));
    254253       
  • uspace/lib/softfloat/generic/common.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<common.h>
     35#include <sftypes.h>
     36#include <common.h>
    3737
    3838/* Table for fast leading zeroes counting */
     
    213213/** @}
    214214 */
    215 
  • uspace/lib/softfloat/generic/comparison.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<comparison.h>
     35#include <sftypes.h>
     36#include <comparison.h>
    3737
    38 inline int isFloat32NaN(float32 f)
    39 {       /* NaN : exp = 0xff and nonzero fraction */
    40         return ((f.parts.exp==0xFF)&&(f.parts.fraction));
     38/* NaN : exp = 0xff and nonzero fraction */
     39int isFloat32NaN(float32 f)
     40{
     41        return ((f.parts.exp == 0xFF) && (f.parts.fraction));
    4142}
    4243
    43 inline int isFloat64NaN(float64 d)
    44 {       /* NaN : exp = 0x7ff and nonzero fraction */
    45         return ((d.parts.exp==0x7FF)&&(d.parts.fraction));
     44/* NaN : exp = 0x7ff and nonzero fraction */
     45int isFloat64NaN(float64 d)
     46{
     47        return ((d.parts.exp == 0x7FF) && (d.parts.fraction));
    4648}
    4749
    48 inline int isFloat32SigNaN(float32 f)
    49 {       /* SigNaN : exp = 0xff fraction = 0xxxxx..x (binary), where at least one x is nonzero */
    50         return ((f.parts.exp==0xFF)&&(f.parts.fraction<0x400000)&&(f.parts.fraction));
     50/* SigNaN : exp = 0xff fraction = 0xxxxx..x (binary), where at least one x is nonzero */
     51int isFloat32SigNaN(float32 f)
     52{
     53        return ((f.parts.exp == 0xFF) && (f.parts.fraction < 0x400000) && (f.parts.fraction));
    5154}
    5255
    53 inline int isFloat64SigNaN(float64 d)
    54 {       /* SigNaN : exp = 0x7ff fraction = 0xxxxx..x (binary), where at least one x is nonzero */
    55         return ((d.parts.exp==0x7FF)&&(d.parts.fraction)&&(d.parts.fraction<0x8000000000000ll));
     56/* SigNaN : exp = 0x7ff fraction = 0xxxxx..x (binary), where at least one x is nonzero */
     57int isFloat64SigNaN(float64 d)
     58{
     59        return ((d.parts.exp == 0x7FF) && (d.parts.fraction) && (d.parts.fraction < 0x8000000000000ll));
    5660}
    5761
    58 inline int isFloat32Infinity(float32 f)
     62int isFloat32Infinity(float32 f)
    5963{
    60         return ((f.parts.exp==0xFF)&&(f.parts.fraction==0x0));
     64        return ((f.parts.exp == 0xFF) && (f.parts.fraction == 0x0));
    6165}
    6266
    63 inline int isFloat64Infinity(float64 d)
     67int isFloat64Infinity(float64 d)
    6468{
    65         return ((d.parts.exp==0x7FF)&&(d.parts.fraction==0x0));
     69        return ((d.parts.exp == 0x7FF) && (d.parts.fraction == 0x0));
    6670}
    6771
    68 inline int isFloat32Zero(float32 f)
     72int isFloat32Zero(float32 f)
    6973{
    7074        return (((f.binary) & 0x7FFFFFFF) == 0);
    7175}
    7276
    73 inline int isFloat64Zero(float64 d)
     77int isFloat64Zero(float64 d)
    7478{
    7579        return (((d.binary) & 0x7FFFFFFFFFFFFFFFll) == 0);
     
    7781
    7882/**
    79  * @return 1, if both floats are equal - but NaNs are not recognized
     83 * @return 1 if both floats are equal - but NaNs are not recognized
    8084 */
    81 inline int isFloat32eq(float32 a, float32 b)
     85int isFloat32eq(float32 a, float32 b)
    8286{
    83         return ((a.binary==b.binary)||(((a.binary| b.binary)&0x7FFFFFFF)==0)); /* a equals to b or both are zeros (with any sign) */
     87        /* a equals to b or both are zeros (with any sign) */
     88        return ((a.binary==b.binary) || (((a.binary | b.binary) & 0x7FFFFFFF) == 0));
    8489}
    8590
    8691/**
    87  * @return 1, if a<b - but NaNs are not recognized
     92 * @return 1 if a < b - but NaNs are not recognized
    8893 */
    89 inline int isFloat32lt(float32 a, float32 b)
     94int isFloat32lt(float32 a, float32 b)
    9095{
    91         if (((a.binary| b.binary)&0x7FFFFFFF)==0) {
     96        if (((a.binary | b.binary) & 0x7FFFFFFF) == 0)
    9297                return 0; /* +- zeroes */
    93         };
    9498       
    95         if ((a.parts.sign)&&(b.parts.sign)) {
    96                 /*if both are negative, smaller is that with greater binary value*/
    97                 return (a.binary>b.binary);
    98                 };
     99        if ((a.parts.sign) && (b.parts.sign))
     100                /* if both are negative, smaller is that with greater binary value */
     101                return (a.binary > b.binary);
    99102       
    100         /* lets negate signs - now will be positive numbers allways bigger than negative (first bit will be set for unsigned integer comparison)*/
    101         a.parts.sign=!a.parts.sign;
    102         b.parts.sign=!b.parts.sign;
    103         return (a.binary<b.binary);
    104                        
     103        /* lets negate signs - now will be positive numbers allways bigger than negative (first bit will be set for unsigned integer comparison) */
     104        a.parts.sign = !a.parts.sign;
     105        b.parts.sign = !b.parts.sign;
     106        return (a.binary < b.binary);
    105107}
    106108
    107109/**
    108  * @return 1, if a>b - but NaNs are not recognized
     110 * @return 1 if a > b - but NaNs are not recognized
    109111 */
    110 inline int isFloat32gt(float32 a, float32 b)
     112int isFloat32gt(float32 a, float32 b)
    111113{
    112         if (((a.binary| b.binary)&0x7FFFFFFF)==0) {
     114        if (((a.binary | b.binary) & 0x7FFFFFFF) == 0)
    113115                return 0; /* zeroes are equal with any sign */
    114         };
    115116       
    116         if ((a.parts.sign)&&(b.parts.sign)) {
    117                 /*if both are negative, greater is that with smaller binary value*/
    118                 return (a.binary<b.binary);
    119                 };
     117        if ((a.parts.sign) && (b.parts.sign))
     118                /* if both are negative, greater is that with smaller binary value */
     119                return (a.binary < b.binary);
    120120       
    121         /* lets negate signs - now will be positive numbers allways bigger than negative (first bit will be set for unsigned integer comparison)*/
    122         a.parts.sign=!a.parts.sign;
    123         b.parts.sign=!b.parts.sign;
    124         return (a.binary>b.binary);
    125                        
     121        /* lets negate signs - now will be positive numbers allways bigger than negative (first bit will be set for unsigned integer comparison) */
     122        a.parts.sign = !a.parts.sign;
     123        b.parts.sign = !b.parts.sign;
     124        return (a.binary > b.binary);
    126125}
    127126
  • uspace/lib/softfloat/generic/div.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<add.h>
    37 #include<div.h>
    38 #include<comparison.h>
    39 #include<mul.h>
    40 #include<common.h>
    41 
     35#include <sftypes.h>
     36#include <add.h>
     37#include <div.h>
     38#include <comparison.h>
     39#include <mul.h>
     40#include <common.h>
    4241
    4342float32 divFloat32(float32 a, float32 b)
  • uspace/lib/softfloat/generic/mul.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<mul.h>
    37 #include<comparison.h>
    38 #include<common.h>
     35#include <sftypes.h>
     36#include <mul.h>
     37#include <comparison.h>
     38#include <common.h>
    3939
    4040/** Multiply two 32 bit float numbers
  • uspace/lib/softfloat/generic/other.c

    r042fbe0 r750636a  
    2727 */
    2828
    29 /** @addtogroup softfloat       
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
  • uspace/lib/softfloat/generic/softfloat.c

    r042fbe0 r750636a  
    3535 */
    3636
    37 #include<softfloat.h>
    38 #include<sftypes.h>
    39 
    40 #include<add.h>
    41 #include<sub.h>
    42 #include<mul.h>
    43 #include<div.h>
    44 
    45 #include<conversion.h>
    46 #include<comparison.h>
    47 #include<other.h>
    48 
    49 #include<functions.h>
     37#include <softfloat.h>
     38#include <sftypes.h>
     39
     40#include <add.h>
     41#include <sub.h>
     42#include <mul.h>
     43#include <div.h>
     44
     45#include <conversion.h>
     46#include <comparison.h>
     47#include <other.h>
     48
     49#include <functions.h>
    5050
    5151/* Arithmetic functions */
     
    494494}
    495495
    496 
    497496/** @}
    498497 */
    499 
  • uspace/lib/softfloat/generic/sub.c

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include<sftypes.h>
    36 #include<sub.h>
    37 #include<comparison.h>
     35#include <sftypes.h>
     36#include <sub.h>
     37#include <comparison.h>
    3838
    3939/** Subtract two float32 numbers with same signs
     
    260260}
    261261
    262 
    263  /** @}
    264  */
    265 
     262/** @}
     263 */
  • uspace/lib/softfloat/include/add.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __ADD_H__
    3737
    38 float32 addFloat32(float32 a, float32 b);
    39 
    40 float64 addFloat64(float64 a, float64 b);
     38extern float32 addFloat32(float32, float32);
     39extern float64 addFloat64(float64, float64);
    4140
    4241#endif
    4342
    44 
    45  /** @}
     43/** @}
    4644 */
    47 
  • uspace/lib/softfloat/include/common.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __COMMON_H__
    3737
    38 #include<sftypes.h>
     38#include <sftypes.h>
    3939
    40 float64 finishFloat64(int32_t cexp, uint64_t cfrac, char sign);
     40extern float64 finishFloat64(int32_t, uint64_t, char);
    4141
    42 int countZeroes64(uint64_t i);
    43 int countZeroes32(uint32_t i);
    44 int countZeroes8(uint8_t i);
     42extern int countZeroes64(uint64_t);
     43extern int countZeroes32(uint32_t);
     44extern int countZeroes8(uint8_t);
    4545
    46 void roundFloat32(int32_t *exp, uint32_t *fraction);
    47 void roundFloat64(int32_t *exp, uint64_t *fraction);
     46extern void roundFloat32(int32_t *, uint32_t *);
     47extern void roundFloat64(int32_t *, uint64_t *);
    4848
    4949#endif
    5050
    51  /** @}
     51/** @}
    5252 */
    53 
  • uspace/lib/softfloat/include/comparison.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __COMPARISON_H__
    3737
    38 inline int isFloat32NaN(float32 f);
    39 inline int isFloat32SigNaN(float32 f);
     38extern int isFloat32NaN(float32);
     39extern int isFloat32SigNaN(float32);
    4040
    41 inline int isFloat32Infinity(float32 f);
    42 inline int isFloat32Zero(float32 f);
     41extern int isFloat32Infinity(float32);
     42extern int isFloat32Zero(float32);
    4343
    44 inline int isFloat64NaN(float64 d);
    45 inline int isFloat64SigNaN(float64 d);
     44extern int isFloat64NaN(float64);
     45extern int isFloat64SigNaN(float64);
    4646
    47 inline int isFloat64Infinity(float64 d);
    48 inline int isFloat64Zero(float64 d);
     47extern int isFloat64Infinity(float64);
     48extern int isFloat64Zero(float64);
    4949
    50 inline int isFloat32eq(float32 a, float32 b);
    51 inline int isFloat32lt(float32 a, float32 b);
    52 inline int isFloat32gt(float32 a, float32 b);
     50extern int isFloat32eq(float32, float32);
     51extern int isFloat32lt(float32, float32);
     52extern int isFloat32gt(float32, float32);
    5353
    5454#endif
    5555
    56 
    57  /** @}
     56/** @}
    5857 */
    59 
  • uspace/lib/softfloat/include/conversion.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29 /** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __CONVERSION_H__
    3737
    38 float64 convertFloat32ToFloat64(float32 a);
     38extern float64 convertFloat32ToFloat64(float32);
     39extern float32 convertFloat64ToFloat32(float64);
    3940
    40 float32 convertFloat64ToFloat32(float64 a);
     41extern uint32_t float32_to_uint32(float32);
     42extern int32_t float32_to_int32(float32);
    4143
    42 uint32_t float32_to_uint32(float32 a);
    43 int32_t float32_to_int32(float32 a);
     44extern uint64_t float32_to_uint64(float32);
     45extern int64_t float32_to_int64(float32);
    4446
    45 uint64_t float32_to_uint64(float32 a);
    46 int64_t float32_to_int64(float32 a);
     47extern uint64_t float64_to_uint64(float64);
     48extern int64_t float64_to_int64(float64);
    4749
    48 uint64_t float64_to_uint64(float64 a);
    49 int64_t float64_to_int64(float64 a);
     50extern uint32_t float64_to_uint32(float64);
     51extern int32_t float64_to_int32(float64);
    5052
    51 uint32_t float64_to_uint32(float64 a);
    52 int32_t float64_to_int32(float64 a);
     53extern float32 uint32_to_float32(uint32_t);
     54extern float32 int32_to_float32(int32_t);
    5355
    54 float32 uint32_to_float32(uint32_t i);
    55 float32 int32_to_float32(int32_t i);
     56extern float32 uint64_to_float32(uint64_t);
     57extern float32 int64_to_float32(int64_t);
    5658
    57 float32 uint64_to_float32(uint64_t i);
    58 float32 int64_to_float32(int64_t i);
     59extern float64 uint32_to_float64(uint32_t);
     60extern float64 int32_to_float64(int32_t);
    5961
    60 float64 uint32_to_float64(uint32_t i);
    61 float64 int32_to_float64(int32_t i);
    62 
    63 float64 uint64_to_float64(uint64_t i);
    64 float64 int64_to_float64(int64_t i);
     62extern float64 uint64_to_float64(uint64_t);
     63extern float64 int64_to_float64(int64_t);
    6564
    6665#endif
    6766
    68 
    69  /** @}
     67/** @}
    7068 */
    71 
  • uspace/lib/softfloat/include/div.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __DIV_H__
    3737
    38 float32 divFloat32(float32 a, float32 b);
    39 float64 divFloat64(float64 a, float64 b);
     38extern float32 divFloat32(float32, float32);
     39extern float64 divFloat64(float64, float64);
    4040
    41 uint64_t divFloat64estim(uint64_t a, uint64_t b);
     41extern uint64_t divFloat64estim(uint64_t, uint64_t);
    4242
    4343#endif
    4444
    45 
    46  /** @}
     45/** @}
    4746 */
    48 
  • uspace/lib/softfloat/include/mul.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __MUL_H__
    3737
    38 float32 mulFloat32(float32 a, float32 b);
     38extern float32 mulFloat32(float32, float32);
     39extern float64 mulFloat64(float64, float64);
    3940
    40 float64 mulFloat64(float64 a, float64 b);
    41 
    42 void mul64integers(uint64_t a,uint64_t b, uint64_t *lo, uint64_t *hi);
     41extern void mul64integers(uint64_t, uint64_t, uint64_t *, uint64_t *);
    4342
    4443#endif
    4544
    46 
    47  /** @}
     45/** @}
    4846 */
    49 
  • uspace/lib/softfloat/include/other.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3838#endif
    3939
    40 
    41  /** @}
     40/** @}
    4241 */
    43 
  • uspace/lib/softfloat/include/sftypes.h

    r042fbe0 r750636a  
    5555        #error Unknown endianess
    5656#endif
    57                 } parts __attribute__ ((packed));
     57        } parts __attribute__ ((packed));
    5858} float32;
    5959
     
    7777} float64;
    7878
    79 #define FLOAT32_MAX 0x7f800000
    80 #define FLOAT32_MIN 0xff800000
     79#define FLOAT32_MAX  0x7f800000
     80#define FLOAT32_MIN  0xff800000
    8181#define FLOAT64_MAX
    8282#define FLOAT64_MIN
     
    8686 * comparing with these constants is not sufficient.
    8787 */
    88 #define FLOAT32_NAN 0x7FC00001
    89 #define FLOAT32_SIGNAN 0x7F800001
    90 #define FLOAT32_INF 0x7F800000
    9188
    92 #define FLOAT64_NAN 0x7FF8000000000001ll
    93 #define FLOAT64_SIGNAN 0x7FF0000000000001ll
    94 #define FLOAT64_INF 0x7FF0000000000000ll
     89#define FLOAT32_NAN     0x7FC00001
     90#define FLOAT32_SIGNAN  0x7F800001
     91#define FLOAT32_INF     0x7F800000
    9592
    96 #define FLOAT32_FRACTION_SIZE 23
    97 #define FLOAT64_FRACTION_SIZE 52
     93#define FLOAT64_NAN     0x7FF8000000000001ll
     94#define FLOAT64_SIGNAN  0x7FF0000000000001ll
     95#define FLOAT64_INF     0x7FF0000000000000ll
    9896
    99 #define FLOAT32_HIDDEN_BIT_MASK 0x800000
    100 #define FLOAT64_HIDDEN_BIT_MASK 0x10000000000000ll
     97#define FLOAT32_FRACTION_SIZE  23
     98#define FLOAT64_FRACTION_SIZE  52
    10199
    102 #define FLOAT32_MAX_EXPONENT 0xFF
    103 #define FLOAT64_MAX_EXPONENT 0x7FF
     100#define FLOAT32_HIDDEN_BIT_MASK  0x800000
     101#define FLOAT64_HIDDEN_BIT_MASK  0x10000000000000ll
    104102
    105 #define FLOAT32_BIAS 0x7F
    106 #define FLOAT64_BIAS 0x3FF
    107 #define FLOAT80_BIAS 0x3FFF
     103#define FLOAT32_MAX_EXPONENT  0xFF
     104#define FLOAT64_MAX_EXPONENT  0x7FF
    108105
     106#define FLOAT32_BIAS  0x7F
     107#define FLOAT64_BIAS  0x3FF
     108#define FLOAT80_BIAS  0x3FFF
    109109
    110110#endif
  • uspace/lib/softfloat/include/softfloat.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __SOFTFLOAT_H__
    3737
    38 float __addsf3(float a, float b);
    39 double __adddf3(double a, double b);
    40 long double __addtf3(long double a, long double b);
    41 long double __addxf3(long double a, long double b);
    42  
    43 float __subsf3(float a, float b);
    44 double __subdf3(double a, double b);
    45 long double __subtf3(long double a, long double b);
    46 long double __subxf3(long double a, long double b);
    47  
    48 float __mulsf3(float a, float b);
    49 double __muldf3(double a, double b);
    50 long double __multf3(long double a, long double b);
    51 long double __mulxf3(long double a, long double b);
    52  
    53 float __divsf3(float a, float b);
    54 double __divdf3(double a, double b);
    55 long double __divtf3(long double a, long double b);
    56 long double __divxf3(long double a, long double b);
    57  
    58 float __negsf2(float a);
    59 double __negdf2(double a);
    60 long double __negtf2(long double a);
    61 long double __negxf2(long double a);
    62  
    63 double __extendsfdf2(float a);
    64 long double __extendsftf2(float a);
    65 long double __extendsfxf2(float a);
    66 long double __extenddftf2(double a);
    67 long double __extenddfxf2(double a);
    68  
    69 double __truncxfdf2(long double a);
    70 double __trunctfdf2(long double a);
    71 float __truncxfsf2(long double a);
    72 float __trunctfsf2(long double a);
    73 float __truncdfsf2(double a);
    74  
    75 int __fixsfsi(float a);
    76 int __fixdfsi(double a);
    77 int __fixtfsi(long double a);
    78 int __fixxfsi(long double a);
    79  
    80 long __fixsfdi(float a);
    81 long __fixdfdi(double a);
    82 long __fixtfdi(long double a);
    83 long __fixxfdi(long double a);
    84  
    85 long long __fixsfti(float a);
    86 long long __fixdfti(double a);
    87 long long __fixtfti(long double a);
    88 long long __fixxfti(long double a);
    89  
    90 unsigned int __fixunssfsi(float a);
    91 unsigned int __fixunsdfsi(double a);
    92 unsigned int __fixunstfsi(long double a);
    93 unsigned int __fixunsxfsi(long double a);
    94  
    95 unsigned long __fixunssfdi(float a);
    96 unsigned long __fixunsdfdi(double a);
    97 unsigned long __fixunstfdi(long double a);
    98 unsigned long __fixunsxfdi(long double a);
    99  
    100 unsigned long long __fixunssfti(float a);
    101 unsigned long long __fixunsdfti(double a);
    102 unsigned long long __fixunstfti(long double a);
    103 unsigned long long __fixunsxfti(long double a);
    104  
    105 float __floatsisf(int i);
    106 double __floatsidf(int i);
    107 long double __floatsitf(int i);
    108 long double __floatsixf(int i);
    109  
    110 float __floatdisf(long i);
    111 double __floatdidf(long i);
    112 long double __floatditf(long i);
    113 long double __floatdixf(long i);
    114  
    115 float __floattisf(long long i);
    116 double __floattidf(long long i);
    117 long double __floattitf(long long i);
    118 long double __floattixf(long long i);
    119  
    120 float __floatunsisf(unsigned int i);
    121 double __floatunsidf(unsigned int i);
    122 long double __floatunsitf(unsigned int i);
    123 long double __floatunsixf(unsigned int i);
    124  
    125 float __floatundisf(unsigned long i);
    126 double __floatundidf(unsigned long i);
    127 long double __floatunditf(unsigned long i);
    128 long double __floatundixf(unsigned long i);
    129  
    130 float __floatuntisf(unsigned long long i);
    131 double __floatuntidf(unsigned long long i);
    132 long double __floatuntitf(unsigned long long i);
    133 long double __floatuntixf(unsigned long long i);
    134  
    135 int __cmpsf2(float a, float b);
    136 int __cmpdf2(double a, double b);
    137 int __cmptf2(long double a, long double b);
    138  
    139 int __unordsf2(float a, float b);
    140 int __unorddf2(double a, double b);
    141 int __unordtf2(long double a, long double b);
    142  
    143 int __eqsf2(float a, float b);
    144 int __eqdf2(double a, double b);
    145 int __eqtf2(long double a, long double b);
    146  
    147 int __nesf2(float a, float b);
    148 int __nedf2(double a, double b);
    149 int __netf2(long double a, long double b);
    150  
    151 int __gesf2(float a, float b);
    152 int __gedf2(double a, double b);
    153 int __getf2(long double a, long double b);
    154  
    155 int __ltsf2(float a, float b);
    156 int __ltdf2(double a, double b);
    157 int __lttf2(long double a, long double b);
    158 int __lesf2(float a, float b);
    159 int __ledf2(double a, double b);
    160 int __letf2(long double a, long double b);
    161  
    162 int __gtsf2(float a, float b);
    163 int __gtdf2(double a, double b);
    164 int __gttf2(long double a, long double b);
    165  
    166 /* Not implemented yet*/
    167 float __powisf2(float a, int b);
     38extern float __addsf3(float, float);
     39extern double __adddf3(double, double);
     40extern long double __addtf3(long double, long double);
     41extern long double __addxf3(long double, long double);
     42
     43extern float __subsf3(float, float);
     44extern double __subdf3(double, double);
     45extern long double __subtf3(long double, long double);
     46extern long double __subxf3(long double, long double);
     47
     48extern float __mulsf3(float, float);
     49extern double __muldf3(double, double);
     50extern long double __multf3(long double, long double);
     51extern long double __mulxf3(long double, long double);
     52
     53extern float __divsf3(float, float);
     54extern double __divdf3(double, double);
     55extern long double __divtf3(long double, long double);
     56extern long double __divxf3(long double, long double);
     57
     58extern float __negsf2(float);
     59extern double __negdf2(double);
     60extern long double __negtf2(long double);
     61extern long double __negxf2(long double);
     62
     63extern double __extendsfdf2(float);
     64extern long double __extendsftf2(float);
     65extern long double __extendsfxf2(float);
     66extern long double __extenddftf2(double);
     67extern long double __extenddfxf2(double);
     68
     69extern double __truncxfdf2(long double);
     70extern double __trunctfdf2(long double);
     71extern float __truncxfsf2(long double);
     72extern float __trunctfsf2(long double);
     73extern float __truncdfsf2(double);
     74
     75extern int __fixsfsi(float);
     76extern int __fixdfsi(double);
     77extern int __fixtfsi(long double);
     78extern int __fixxfsi(long double);
     79
     80extern long __fixsfdi(float);
     81extern long __fixdfdi(double);
     82extern long __fixtfdi(long double);
     83extern long __fixxfdi(long double);
     84
     85extern long long __fixsfti(float);
     86extern long long __fixdfti(double);
     87extern long long __fixtfti(long double);
     88extern long long __fixxfti(long double);
     89
     90extern unsigned int __fixunssfsi(float);
     91extern unsigned int __fixunsdfsi(double);
     92extern unsigned int __fixunstfsi(long double);
     93extern unsigned int __fixunsxfsi(long double);
     94
     95extern unsigned long __fixunssfdi(float);
     96extern unsigned long __fixunsdfdi(double);
     97extern unsigned long __fixunstfdi(long double);
     98extern unsigned long __fixunsxfdi(long double);
     99
     100extern unsigned long long __fixunssfti(float);
     101extern unsigned long long __fixunsdfti(double);
     102extern unsigned long long __fixunstfti(long double);
     103extern unsigned long long __fixunsxfti(long double);
     104
     105extern float __floatsisf(int);
     106extern double __floatsidf(int);
     107extern long double __floatsitf(int);
     108extern long double __floatsixf(int);
     109
     110extern float __floatdisf(long);
     111extern double __floatdidf(long);
     112extern long double __floatditf(long);
     113extern long double __floatdixf(long);
     114
     115extern float __floattisf(long long);
     116extern double __floattidf(long long);
     117extern long double __floattitf(long long);
     118extern long double __floattixf(long long);
     119
     120extern float __floatunsisf(unsigned int);
     121extern double __floatunsidf(unsigned int);
     122extern long double __floatunsitf(unsigned int);
     123extern long double __floatunsixf(unsigned int);
     124
     125extern float __floatundisf(unsigned long);
     126extern double __floatundidf(unsigned long);
     127extern long double __floatunditf(unsigned long);
     128extern long double __floatundixf(unsigned long);
     129
     130extern float __floatuntisf(unsigned long long);
     131extern double __floatuntidf(unsigned long long);
     132extern long double __floatuntitf(unsigned long long);
     133extern long double __floatuntixf(unsigned long long);
     134
     135extern int __cmpsf2(float, float);
     136extern int __cmpdf2(double, double);
     137extern int __cmptf2(long double, long double);
     138
     139extern int __unordsf2(float, float);
     140extern int __unorddf2(double, double);
     141extern int __unordtf2(long double, long double);
     142
     143extern int __eqsf2(float, float);
     144extern int __eqdf2(double, double);
     145extern int __eqtf2(long double, long double);
     146
     147extern int __nesf2(float, float);
     148extern int __nedf2(double, double);
     149extern int __netf2(long double, long double);
     150
     151extern int __gesf2(float, float);
     152extern int __gedf2(double, double);
     153extern int __getf2(long double, long double);
     154
     155extern int __ltsf2(float, float);
     156extern int __ltdf2(double, double);
     157extern int __lttf2(long double, long double);
     158extern int __lesf2(float, float);
     159extern int __ledf2(double, double);
     160extern int __letf2(long double, long double);
     161
     162extern int __gtsf2(float, float);
     163extern int __gtdf2(double, double);
     164extern int __gttf2(long double, long double);
     165
     166/* Not implemented yet */
     167extern float __powisf2(float, int);
    168168
    169169#endif
    170170
    171 
    172  /** @}
     171/** @}
    173172 */
    174 
  • uspace/lib/softfloat/include/sub.h

    r042fbe0 r750636a  
    2727 */
    2828
    29  /** @addtogroup softfloat     
     29/** @addtogroup softfloat
    3030 * @{
    3131 */
     
    3636#define __SUB_H__
    3737
    38 float32 subFloat32(float32 a, float32 b);
    39 
    40 float64 subFloat64(float64 a, float64 b);
     38extern float32 subFloat32(float32, float32);
     39extern float64 subFloat64(float64, float64);
    4140
    4241#endif
    4342
    44 
    45  /** @}
     43/** @}
    4644 */
    47 
Note: See TracChangeset for help on using the changeset viewer.