Changeset 776f2e6 in mainline for uspace/lib/softfloat/include/sftypes.h
- Timestamp:
- 2008-04-03T20:46:47Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12ab886
- Parents:
- 5d494b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/softfloat/include/sftypes.h
r5d494b3 r776f2e6 36 36 #define __SFTYPES_H__ 37 37 38 #include < endian.h>38 #include <byteorder.h> 39 39 #include <stdint.h> 40 40 … … 44 44 45 45 struct { 46 #if __BYTE_ORDER == __BIG_ENDIAN 46 #if defined(ARCH_IS_BIG_ENDIAN) 47 47 uint32_t sign:1; 48 48 uint32_t exp:8; 49 49 uint32_t fraction:23; 50 #elif __BYTE_ORDER == __LITTLE_ENDIAN 50 #elif defined(ARCH_IS_LITTLE_ENDIAN) 51 51 uint32_t fraction:23; 52 52 uint32_t exp:8; 53 53 uint32_t sign:1; 54 55 56 54 #else 55 #error "Unknown endians." 56 #endif 57 57 } parts __attribute__ ((packed)); 58 58 } float32; … … 63 63 64 64 struct { 65 #if __BYTE_ORDER == __BIG_ENDIAN 65 #if defined(ARCH_IS_BIG_ENDIAN) 66 66 uint64_t sign:1; 67 67 uint64_t exp:11; 68 68 uint64_t fraction:52; 69 #elif __BYTE_ORDER == __LITTLE_ENDIAN 69 #elif defined(ARCH_IS_LITTLE_ENDIAN) 70 70 uint64_t fraction:52; 71 71 uint64_t exp:11; 72 72 uint64_t sign:1; 73 74 75 73 #else 74 #error "Unknown endians." 75 #endif 76 76 } parts __attribute__ ((packed)); 77 77 } float64; … … 82 82 #define FLOAT64_MIN 83 83 84 /* For recognizing NaNs or infinity use isFloat32NaN and is Float32Inf, comparing with this constants is not sufficient */ 84 /* 85 * For recognizing NaNs or infinity use isFloat32NaN and is Float32Inf, 86 * comparing with these constants is not sufficient. 87 */ 85 88 #define FLOAT32_NAN 0x7FC00001 86 89 #define FLOAT32_SIGNAN 0x7F800001
Note:
See TracChangeset
for help on using the changeset viewer.