public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/35408]  New: Bad XFmode size and alignment for x86
@ 2008-02-29 17:29 hjl dot tools at gmail dot com
  2008-03-07  4:27 ` [Bug target/35408] " hjl dot tools at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-02-29 17:29 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/35408] Bad XFmode size and alignment for x86
  2008-02-29 17:29 [Bug target/35408] New: Bad XFmode size and alignment for x86 hjl dot tools at gmail dot com
@ 2008-03-07  4:27 ` hjl dot tools at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-07  4:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2008-03-07 04:26 -------
There is no problem. TARGET_128BIT_LONG_DOUBLE is enabled in 64bit:

/* By default, 64-bit mode uses 128-bit long double.  */
#undef TARGET_SUBTARGET64_DEFAULT
#define TARGET_SUBTARGET64_DEFAULT \
        MASK_128BIT_LONG_DOUBLE


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-07  4:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 17:29 [Bug target/35408] New: Bad XFmode size and alignment for x86 hjl dot tools at gmail dot com
2008-03-07  4:27 ` [Bug target/35408] " hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).