-#ifdef SIZEOF_LONG_DOUBLE_8
- mant_val = 52;
- bias_val = 0x3ff;
- sign = (srcval.val.high & 0x80000000) != 0;
- exponent = (srcval.val.high & 0x7FF00000) >> 20;
- mantissa0 = srcval.val.high & 0x000FFFFF;
- mantissa1 = srcval.val.low;
-#else
- mant_val = 63;
- bias_val = 0x3fff;
- sign = (srcval.val.high & 0x00008000) != 0;
- exponent = (srcval.val.high & 0x00007FFF) ;
- mantissa0 = srcval.val.mid;
- mantissa1 = srcval.val.low;
-#endif
+ if (long_double_size == 8) {
+ mant_val = 52;
+ bias_val = 0x3ff;
+ sign = (srcval.val_ld8.high & 0x80000000) != 0;
+ exponent = (srcval.val_ld8.high & 0x7FF00000) >> 20;
+ mantissa0 = srcval.val_ld8.high & 0x000FFFFF;
+ mantissa1 = srcval.val_ld8.low;
+ } else {
+ /* we assume an x86-like 80bit representation of the value... */
+ assert(sizeof(long double)==12 || sizeof(long double)==16);
+ mant_val = 63;
+ bias_val = 0x3fff;
+ sign = (srcval.val_ld12.high & 0x00008000) != 0;
+ exponent = (srcval.val_ld12.high & 0x00007FFF) ;
+ mantissa0 = srcval.val_ld12.mid;
+ mantissa1 = srcval.val_ld12.low;
+ }