From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26022 invoked by alias); 29 Feb 2008 17:29:48 -0000 Received: (qmail 25189 invoked by uid 48); 29 Feb 2008 17:29:04 -0000 Date: Fri, 29 Feb 2008 17:29:00 -0000 Subject: [Bug target/35408] New: Bad XFmode size and alignment for x86 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02993.txt.bz2 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