Changeset a82695c in mainline for softfloat/generic/softfloat.c


Ignore:
Timestamp:
2006-02-22T11:29:49Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1d83419
Parents:
2cb202e
Message:

Completed conversions from float/double to integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softfloat/generic/softfloat.c

    r2cb202e ra82695c  
    174174int __fixdfsi(double a)
    175175{
     176        float64 da;
     177        da.d = a;
     178       
     179        return float64_to_int(da);
    176180}
    177181 
     
    185189long __fixdfdi(double a)
    186190{
     191        float64 da;
     192        da.d = a;
     193       
     194        return float64_to_long(da);
    187195}
    188196 
    189197long long __fixsfti(float a)
    190198{
     199        float32 fa;
     200        fa.f = a;
     201       
     202        return float32_to_longlong(fa);
    191203}
    192204long long __fixdfti(double a)
    193205{
     206        float64 da;
     207        da.d = a;
     208       
     209        return float64_to_longlong(da);
    194210}
    195211
     
    203219unsigned int __fixunsdfsi(double a)
    204220{
     221        float64 da;
     222        da.d = a;
     223       
     224        return float64_to_uint(da);
    205225}
    206226 
     
    214234unsigned long __fixunsdfdi(double a)
    215235{
     236        float64 da;
     237        da.d = a;
     238       
     239        return float64_to_ulong(da);
    216240}
    217241 
    218242unsigned long long __fixunssfti(float a)
    219243{
     244        float32 fa;
     245        fa.f = a;
     246       
     247        return float32_to_ulonglong(fa);
    220248}
    221249unsigned long long __fixunsdfti(double a)
    222250{
     251        float64 da;
     252        da.d = a;
     253       
     254        return float64_to_ulonglong(da);
    223255}
    224256 
Note: See TracChangeset for help on using the changeset viewer.