123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- // ===== 描述long double 的数据比特结构
- union ldshape
- {
- long double f;
- struct
- {
- uint64_t m;
- uint16_t se;
- } i;
- };
- union ldshape
- {
- long double f;
- struct
- {
- uint64_t lo;
- uint32_t mid;
- uint16_t top;
- uint16_t se;
- } i;
- struct
- {
- uint64_t lo;
- uint64_t hi;
- } i2;
- };
- union ldshape
- {
- long double f;
- struct
- {
- uint16_t se;
- uint16_t top;
- uint32_t mid;
- uint64_t lo;
- } i;
- struct
- {
- uint64_t hi;
- uint64_t lo;
- } i2;
- };
- do \
- { \
- if (sizeof(x) == sizeof(float)) \
- { \
- volatile float __x; \
- __x = (x); \
- (void)__x; \
- } \
- else if (sizeof(x) == sizeof(double)) \
- { \
- volatile double __x; \
- __x = (x); \
- (void)__x; \
- } \
- else \
- { \
- volatile long double __x; \
- __x = (x); \
- (void)__x; \
- } \
- } while (0)
|