[Bug target/35408] New: Bad XFmode size and alignment for x86

hjl dot tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 29 17:29:00 GMT 2008


i386-modes.def has

---
/* In ILP32 mode, XFmode has size 12 and alignment 4.
  In LP64 mode, XFmode has size and alignment 16.  */
ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE
                         ? &ieee_extended_intel_128_format
                         : TARGET_96_ROUND_53_LONG_DOUBLE
                         ? &ieee_extended_intel_96_round_53_format
                         : &ieee_extended_intel_96_format));
ADJUST_BYTESIZE  (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12);
ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4);
---

The comment don't match the code.  XFmode is independent of ILP32
and LP64.  However, in i386.h, there is

/* Decide whether a variable of mode MODE should be 128 bit aligned.  */
#define ALIGN_MODE_128(MODE) \
 ((MODE) == XFmode || SSE_REG_MODE_P (MODE))

What is the real alignment of XFmode in ILP32 mode?

According to i386 and x86-64 psABIs,  in LP32 mode, XFmode has
size 12 and alignment 4 and in LP64 mode, XFmode has size and
alignment 16. It doesn't make senses to have XFmode of size 12
and alignment 16 in ILP32 mode since it doesn't work with array
of XFmode.


-- 
           Summary: Bad XFmode size and alignment for x86
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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



More information about the Gcc-bugs mailing list