From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114053 invoked by alias); 29 Mar 2017 08:12:34 -0000 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 Received: (qmail 114033 invoked by uid 89); 29 Mar 2017 08:12:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*ebotcazou, 2122, U*ebotcazou, 2069 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Mar 2017 08:12:31 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 01C49ABC9; Wed, 29 Mar 2017 08:12:29 +0000 (UTC) From: Andreas Schwab To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [patch v2] Get rid of stack trampolines for nested functions (1/4) References: <1518726.5fkcUnkpqM@arcturus.home> <8467344.X3JSntxAug@arcturus.home> <3070523.YO2h7Gyp6i@polaris> X-Yow: YOW!! What should the entire human race DO?? Consume a fifth of CHIVAS REGAL, ski NUDE down MT. EVEREST, and have a wild SEX WEEKEND! Date: Wed, 29 Mar 2017 10:05:00 -0000 In-Reply-To: <3070523.YO2h7Gyp6i@polaris> (Eric Botcazou's message of "Tue, 28 Mar 2017 18:34:55 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-03/txt/msg01466.txt.bz2 On Mär 28 2017, Eric Botcazou wrote: >> That needs to use ptr_mode, not Pmode. > > I don't think so, the whole computation is in Pmode. Could you try something > similar to what is done in the 'else' arm of the big surrounding conditional? Thanks, this gets me further, the ada library now compiles with -mabi=ilp32. But I still see some ICEs while running the testsuite, which I haven't investigated yet. And the original comment before this hunk doesn't make sense at this point. Andreas. diff --git a/gcc/calls.c b/gcc/calls.c index 61caf4ca75..c92e35ea5a 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -206,6 +206,9 @@ prepare_call_address (tree fndecl_or_type, rtx funexp, rtx static_chain_value, DECL_STATIC_CHAIN (fndecl_or_type) = 1; rtx chain = targetm.calls.static_chain (fndecl_or_type, false); + if (GET_MODE (funexp) != Pmode) + funexp = convert_memory_address (Pmode, funexp); + /* Avoid long live ranges around function calls. */ funexp = copy_to_mode_reg (Pmode, funexp); -- 2.12.2 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."