From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22848 invoked by alias); 11 Nov 2008 16:34:56 -0000 Received: (qmail 22691 invoked by uid 22791); 11 Nov 2008 16:34:53 -0000 X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Nov 2008 16:34:14 +0000 Received: by yx-out-1718.google.com with SMTP id 36so1131052yxh.26 for ; Tue, 11 Nov 2008 08:34:11 -0800 (PST) Received: by 10.103.117.9 with SMTP id u9mr4648045mum.55.1226421250373; Tue, 11 Nov 2008 08:34:10 -0800 (PST) Received: by 10.103.131.14 with HTTP; Tue, 11 Nov 2008 08:34:09 -0800 (PST) Message-ID: <84fc9c000811110834r7b91f42fna37680ebde0d2bdf@mail.gmail.com> Date: Tue, 11 Nov 2008 16:51:00 -0000 From: "Richard Guenther" To: "Uros Bizjak" Subject: Re: [PATCH] Fix small structure passing on x86-64 Cc: "Eric Botcazou" , "GCC Patches" In-Reply-To: <490B5E88.3080101@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <490B5E88.3080101@gmail.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg00450.txt.bz2 On Fri, Oct 31, 2008 at 1:37 PM, Uros Bizjak wrote: > Hello! > >> the structure >> >> struct S { char c; char arr[4]; float f; }; >> >> is incorrect passed on x86-64/Linux with every C compiler I tried: only >> the first 4 bytes and the float are passed (in registers), the 5th byte is >> lost. >> That's because the first word has partial integer class >> X86_64_INTEGERSI_CLASS instead of full integer class X86_64_INTEGER_CLASS. >> >> Tested on x86_64-suse-linux and compat-regtested against the system >> compiler, OK for mainline? >> >> >> 2008-10-31 Eric Botcazou >> >> * config/i386/i386.c (classify_argument) : Promote >> partial >> integer class to full integer class if the offset is not >> word-aligned. >> >> >> 2008-10-31 Eric Botcazou >> >> * gcc.c-torture/execute/20081031.c: New test. >> > > This is OK for mainline and all release branches after a couple of days in > mainline without problems. Please do not put this onto the active branches. We're not yet sure the patch is correct. Richard.