From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7462 invoked by alias); 19 Jul 2010 09:55:41 -0000 Received: (qmail 7450 invoked by uid 22791); 19 Jul 2010 09:55:40 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Jul 2010 09:55:36 +0000 Received: (qmail 20474 invoked from network); 19 Jul 2010 09:55:34 -0000 Received: from unknown (HELO ?84.152.201.232?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 Jul 2010 09:55:34 -0000 Message-ID: <4C4420F2.5010807@codesourcery.com> Date: Mon, 19 Jul 2010 09:55:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100625 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jeff Law CC: GCC Patches , John David Anglin Subject: Re: Emit more REG_EQUIV notes for function args (PR42235) References: <4C3D9C06.60901@codesourcery.com> <4C3E07EF.1030306@redhat.com> <4C3E2C62.40808@codesourcery.com> <4C3E39F0.7050208@redhat.com> <4C3F41BA.7070905@codesourcery.com> In-Reply-To: <4C3F41BA.7070905@codesourcery.com> Content-Type: multipart/mixed; boundary="------------090203020301090605090503" 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: 2010-07/txt/msg01473.txt.bz2 This is a multi-part message in MIME format. --------------090203020301090605090503 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 918 On 07/15/2010 07:13 PM, Bernd Schmidt wrote: > On 07/15/2010 12:28 AM, Jeff Law wrote: >> On 07/14/10 15:30, Bernd Schmidt wrote: >>> If necessary I can try to test for a single insn with single_set and >>> push it to the sequence otherwise. >>> >> For the mn103, the conversions were single insns... >> >> Ultimately, I think you have to peek at the insn(s) and see what >> registers they set/clobber. > > How's this? Bootstrapped and tested on i686-linux. ARM tests in progress. This seems to have caused a bootstrap failure on hppa. A QImode value is passed in a SImode reg and then should get extended to DImode; we must make sure we use a qidi extension. The following patch does that; I've not heard back whether it fixes the hppa bootstrap, but it seems to work on arm-linux (one extra testsuite failure caused by an unrelated change in the same tree). Also bootstrapped on i686-linux. Ok? Bernd --------------090203020301090605090503 Content-Type: text/plain; name="entrymode.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="entrymode.diff" Content-length: 1376 * function.c (assign_parm_setup_reg): Use nominal_mode as the source mode for extensions. Index: function.c =================================================================== --- function.c (revision 162277) +++ function.c (working copy) @@ -2940,18 +2940,18 @@ assign_parm_setup_reg (struct assign_par First, we try to emit an insn which performs the necessary conversion. We verify that this insn does not clobber any hard registers. */ - + enum machine_mode entry_mode = data->nominal_mode; enum insn_code icode; rtx op0, op1; - icode = can_extend_p (promoted_nominal_mode, data->passed_mode, + icode = can_extend_p (promoted_nominal_mode, entry_mode, unsignedp); op0 = parmreg; op1 = validated_mem; if (icode != CODE_FOR_nothing && insn_data[icode].operand[0].predicate (op0, promoted_nominal_mode) - && insn_data[icode].operand[1].predicate (op1, data->passed_mode)) + && insn_data[icode].operand[1].predicate (op1, entry_mode)) { enum rtx_code code = unsignedp ? ZERO_EXTEND : SIGN_EXTEND; rtx insn, insns; @@ -2959,7 +2959,7 @@ assign_parm_setup_reg (struct assign_par start_sequence (); insn = gen_extend_insn (op0, op1, promoted_nominal_mode, - data->passed_mode, unsignedp); + entry_mode, unsignedp); emit_insn (insn); insns = get_insns (); --------------090203020301090605090503--