Changeset 7afd2aca in mainline for softfloat/include


Ignore:
Timestamp:
2005-12-07T22:37:49Z (20 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36aee474
Parents:
ebff5e8
Message:

Softfloat: 32 bit float addition completed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • softfloat/include/softfloat.h

    rebff5e8 r7afd2aca  
    3535        struct  {
    3636                #ifdef __BIG_ENDIAN__
    37                 __u8 sign:1;
    38                 __u8 exp:8;
     37                __u32 sign:1;
     38                __u32 exp:8;
    3939                __u32 mantisa:23;
    40                 #else
    41                 #ifdef __LITTLE_ENDIAN__
     40                #elif defined __LITTLE_ENDIAN__
    4241                __u32 mantisa:23;
    43                 __u8 exp:8;
    44                 __u8 sign:1;
     42                __u32 exp:8;
     43                __u32 sign:1;
    4544                #else
     45                #error "Unknown endians."
    4646                #endif
    4747                } parts __attribute__ ((packed));
    48         } float32_t;
     48        } float32;
    4949       
    5050typedef union {
     
    5252        struct  {
    5353                #ifdef __BIG_ENDIAN__
    54                 __u8 sign:1;
    55                 __u8 exp:11;
    56                 __u32 mantisa:52;
    57                 #else
    58                 #ifdef __LITTLE_ENDIAN__
    59                 __u32 mantisa:52;
    60                 __u8 exp:11;
    61                 __u8 sign:1;
     54                __u64 sign:1;
     55                __u64 exp:11;
     56                __u64 mantisa:52;
     57                #elif defined __LITTLE_ENDIAN__
     58                __u64 mantisa:52;
     59                __u64 exp:11;
     60                __u64 sign:1;
    6261                #else
     62                #error "Unknown endians."
    6363                #endif
    6464                } parts __attribute__ ((packed));
    65         } float64_t;
     65        } float64;
    6666
    6767#define FLOAT32_MAX 0x7f800000
Note: See TracChangeset for help on using the changeset viewer.