Changeset a35b458 in mainline for uspace/lib/softfloat/common.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/softfloat/common.c

    r3061bc1 ra35b458  
    7878                /* TODO: fix underflow */
    7979        }
    80        
     80
    8181        if ((cexp < 0) || (cexp == 0 &&
    8282            (!(cfrac & (FLOAT64_HIDDEN_BIT_MASK << (64 - FLOAT64_FRACTION_SIZE - 1)))))) {
     
    8787                        return result;
    8888                }
    89                
     89
    9090                while (cexp < 0) {
    9191                        cexp++;
    9292                        cfrac >>= 1;
    9393                }
    94        
     94
    9595                cfrac += (0x1 << (64 - FLOAT64_FRACTION_SIZE - 3));
    96                
     96
    9797                if (!(cfrac & (FLOAT64_HIDDEN_BIT_MASK << (64 - FLOAT64_FRACTION_SIZE - 1)))) {
    9898                        result.parts.fraction =
     
    103103                cfrac += (0x1 << (64 - FLOAT64_FRACTION_SIZE - 3));
    104104        }
    105        
     105
    106106        ++cexp;
    107107
     
    120120
    121121        result.parts.exp = (uint32_t) cexp;
    122        
     122
    123123        result.parts.fraction =
    124124            ((cfrac >> (64 - FLOAT64_FRACTION_SIZE - 2)) & (~FLOAT64_HIDDEN_BIT_MASK));
    125        
     125
    126126        return result;
    127127}
     
    289289        /* rounding - if first bit after fraction is set then round up */
    290290        (*fraction) += (0x1 << (32 - FLOAT32_FRACTION_SIZE - 3));
    291        
     291
    292292        if ((*fraction) &
    293293            (FLOAT32_HIDDEN_BIT_MASK << (32 - FLOAT32_FRACTION_SIZE - 1))) {
     
    296296                (*fraction) >>= 1;
    297297        }
    298        
     298
    299299        if (((*exp) >= FLOAT32_MAX_EXPONENT) || ((*exp) < 0)) {
    300300                /* overflow - set infinity as result */
     
    322322         */
    323323        (*fraction) += (0x1 << (64 - FLOAT64_FRACTION_SIZE - 3));
    324        
     324
    325325        /* See if there was a carry to bit 63. */
    326326        if ((*fraction) &
     
    330330                (*fraction) >>= 1;
    331331        }
    332        
     332
    333333        if (((*exp) >= FLOAT64_MAX_EXPONENT) || ((*exp) < 0)) {
    334334                /* overflow - set infinity as result */
     
    677677        mul64(b, result, &tmp_hi, &tmp_lo);
    678678        sub128(a_hi, a_lo, tmp_hi, tmp_lo, &rem_hi, &rem_lo);
    679        
     679
    680680        while ((int64_t) rem_hi < 0) {
    681681                result -= 0x1ll << 32;
Note: See TracChangeset for help on using the changeset viewer.