This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/36667] Incorrect XFmode emulation in soft-fp



------- Comment #2 from ubizjak at gmail dot com  2008-06-29 16:45 -------
(In reply to comment #0)
> extended.h in soft-fp assumes the size 80bit XFmode is 16byte.
> It is only correct for x86-64. For ia32, it is 12byte.

I don't think so. From extended.h:

...
#if _FP_W_TYPE_SIZE < 64

union _FP_UNION_E
{
   XFtype flt;
   struct 
   {
#if __BYTE_ORDER == __BIG_ENDIAN
      unsigned long pad1 : _FP_W_TYPE_SIZE;
      unsigned long pad2 : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
      unsigned long sign : 1;
      unsigned long exp : _FP_EXPBITS_E;
      unsigned long frac1 : _FP_W_TYPE_SIZE;
      unsigned long frac0 : _FP_W_TYPE_SIZE;
#else
      unsigned long frac0 : _FP_W_TYPE_SIZE;
      unsigned long frac1 : _FP_W_TYPE_SIZE;
      unsigned exp : _FP_EXPBITS_E;
      unsigned sign : 1;
#endif /* not bigendian */
   } bits __attribute__((packed));
};

So, the size of the struct is 32+32+15+1 = 80bits.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36667


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]