Changeset aa59fa0 in mainline for softfloat/generic/div.c


Ignore:
Timestamp:
2006-03-16T00:32:41Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
585819d
Parents:
69cdeec
Message:

SoftFloat integrated into HelenOS uspace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softfloat/generic/div.c

    r69cdeec raa59fa0  
    3838{
    3939        float32 result;
    40         __s32 aexp, bexp, cexp;
    41         __u64 afrac, bfrac, cfrac;
     40        int32_t aexp, bexp, cexp;
     41        uint64_t afrac, bfrac, cfrac;
    4242       
    4343        result.parts.sign = a.parts.sign ^ b.parts.sign;
     
    181181               
    182182        } else {
    183                 result.parts.exp = (__u32)cexp;
     183                result.parts.exp = (uint32_t)cexp;
    184184        }
    185185       
     
    192192{
    193193        float64 result;
    194         __s64 aexp, bexp, cexp;
    195         __u64 afrac, bfrac, cfrac;
    196         __u64 remlo, remhi;
     194        int64_t aexp, bexp, cexp;
     195        uint64_t afrac, bfrac, cfrac;
     196        uint64_t remlo, remhi;
    197197       
    198198        result.parts.sign = a.parts.sign ^ b.parts.sign;
     
    307307                remlo = - remlo;
    308308               
    309                 while ((__s64) remhi < 0) {
     309                while ((int64_t) remhi < 0) {
    310310                        cfrac--;
    311311                        remlo += bfrac;
     
    321321}
    322322
    323 __u64 divFloat64estim(__u64 a, __u64 b)
     323uint64_t divFloat64estim(uint64_t a, uint64_t b)
    324324{
    325         __u64 bhi;
    326         __u64 remhi, remlo;
    327         __u64 result;
     325        uint64_t bhi;
     326        uint64_t remhi, remlo;
     327        uint64_t result;
    328328       
    329329        if ( b <= a ) {
     
    339339
    340340        b <<= 32;
    341         while ( (__s64) remhi < 0 ) {
     341        while ( (int64_t) remhi < 0 ) {
    342342                        result -= 0x1ll << 32; 
    343343                        remlo += b;
Note: See TracChangeset for help on using the changeset viewer.