From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22126 invoked by alias); 10 Nov 2008 12:31:28 -0000 Received: (qmail 22011 invoked by uid 22791); 10 Nov 2008 12:31:26 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 12:30:44 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id CB7BC29003A; Mon, 10 Nov 2008 13:30:41 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kvcSqIhw0pkE; Mon, 10 Nov 2008 13:30:41 +0100 (CET) Received: from [192.168.1.3] (83-155-198-60.rev.libertysurf.net [83.155.198.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id EBFAE290039; Mon, 10 Nov 2008 13:30:40 +0100 (CET) From: Eric Botcazou To: "Richard Guenther" Subject: Re: [PATCH] Fix unaligned load on the IA-64 Date: Mon, 10 Nov 2008 12:55:00 -0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: gcc-patches@gcc.gnu.org References: <200810311225.59610.ebotcazou@adacore.com> <84fc9c000810310446y5e4e40fav9baf52ce441a4371@mail.gmail.com> In-Reply-To: <84fc9c000810310446y5e4e40fav9baf52ce441a4371@mail.gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_RnCGJy67ax86hM3" Message-Id: <200811101332.17968.ebotcazou@adacore.com> 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/msg00359.txt.bz2 --Boundary-00=_RnCGJy67ax86hM3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-length: 443 > I wonder if after the args[i].mode == BLKmode check we always have a MEM_P? > Or, if not, if we only ever need the unaligned handling for MEM_Ps? The following appears to work, tested on SPARC and IA-64. OK for mainline? 2008-11-10  Eric Botcazou           * calls.c (store_unaligned_arguments_into_pseudos): Deal only with values living in memory and use more precise alignment information. -- Eric Botcazou --Boundary-00=_RnCGJy67ax86hM3 Content-Type: text/x-diff; charset="iso-8859-1"; name="p.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.diff" Content-length: 568 Index: calls.c =================================================================== --- calls.c (revision 141707) +++ calls.c (working copy) @@ -837,7 +837,8 @@ store_unaligned_arguments_into_pseudos ( for (i = 0; i < num_actuals; i++) if (args[i].reg != 0 && ! args[i].pass_on_stack && args[i].mode == BLKmode - && (TYPE_ALIGN (TREE_TYPE (args[i].tree_value)) + && MEM_P (args[i].value) + && (MEM_ALIGN (args[i].value) < (unsigned int) MIN (BIGGEST_ALIGNMENT, BITS_PER_WORD))) { int bytes = int_size_in_bytes (TREE_TYPE (args[i].tree_value)); --Boundary-00=_RnCGJy67ax86hM3--