From patchwork Sun Jul 25 21:56:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 59886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 13640B6EF3 for ; Mon, 26 Jul 2010 07:56:24 +1000 (EST) Received: (qmail 15823 invoked by alias); 25 Jul 2010 21:56:23 -0000 Received: (qmail 15815 invoked by uid 22791); 25 Jul 2010 21:56:22 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 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.43rc1) with ESMTP; Sun, 25 Jul 2010 21:56:09 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 379C7CB0229 for ; Sun, 25 Jul 2010 23:56:04 +0200 (CEST) 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 evx37xj-ZJVa for ; Sun, 25 Jul 2010 23:56:04 +0200 (CEST) Received: from adijon-256-1-164-147.w90-13.abo.wanadoo.fr (ADijon-256-1-164-147.w90-13.abo.wanadoo.fr [90.13.39.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 132B2CB0215 for ; Sun, 25 Jul 2010 23:56:04 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix PR target/44942 Date: Sun, 25 Jul 2010 23:56:09 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201007252356.09847.ebotcazou@adacore.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org We have roughly the same long-standing bug on SPARC64 as on x86-64... Straightforward fix attached but it will require some extensive testing before being installed on the 3 branches like the x86-64 fix. 2010-07-25 Eric Botcazou PR target/44942 * config/sparc/sparc.c (function_arg_advance): Always take into account the padding, if any. Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 162521) +++ config/sparc/sparc.c (working copy) @@ -5814,9 +5814,8 @@ function_arg_advance (struct sparc_args /* We pass 0 for incoming_p here, it doesn't matter. */ slotno = function_arg_slotno (cum, mode, type, named, 0, ®no, &padding); - /* If register required leading padding, add it. */ - if (slotno != -1) - cum->words += padding; + /* If argument requires leading padding, add it. */ + cum->words += padding; if (TARGET_ARCH32) {