From patchwork Tue Dec 6 17:52:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 86883 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2144407qgi; Tue, 6 Dec 2016 09:53:02 -0800 (PST) X-Received: by 10.99.207.17 with SMTP id j17mr111104222pgg.57.1481046782119; Tue, 06 Dec 2016 09:53:02 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q13si20326428pfg.158.2016.12.06.09.53.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 09:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443622-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443622-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443622-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=x0OAgD5cszqWBf4HLCVCjraSlnWN4629YoDRl2CQtwFuNcA0PDIOj s0OJh46qWQsToLlYygoMdqkbuSUQTMmmGp88dAxUXjzkBRiKDWu7qh+DK9MDLoSF Nark3zl6ZIHx808gu5wqi16VMI07jI0952L0eQKY+1cXXeenrnFm8Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=DOiaa9LFZdHVBDJaeE8nrjMTrEI=; b=MPSIZHUmE+a+LAbYqKFWVAaTHius ywOPLBfi4QPflKSZngx2cvR4u2Imsm2MIWk/ChRtaQIQabDE9Ez1hyXSu5GtZ8Da vvddd/E3aprGPXl22BGjmkr9MEd0XBUZFdI+JSwo3Z5h5UWWDNOYAQLZOOP0UBmU /k6TRJZRDwoxxx8= Received: (qmail 116286 invoked by alias); 6 Dec 2016 17:52:50 -0000 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 Received: (qmail 116275 invoked by uid 89); 6 Dec 2016 17:52:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1475, extensively X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Dec 2016 17:52:49 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0EA01814CF; Tue, 6 Dec 2016 18:52:47 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fpLdyMZNNpVT; Tue, 6 Dec 2016 18:52:46 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id DA97F814C9; Tue, 6 Dec 2016 18:52:46 +0100 (CET) From: Eric Botcazou To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, "Lynn A. Boger" Subject: Re: [patch v2] Get rid of stack trampolines for nested functions (1/4) Date: Tue, 06 Dec 2016 18:52:46 +0100 Message-ID: <10247773.6SAYMWXB7c@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-48-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <3049494.GQlGFrCAi9@polaris> References: <1518726.5fkcUnkpqM@arcturus.home> <3049494.GQlGFrCAi9@polaris> MIME-Version: 1.0 > There are a couple of changes to the RTL expander for calls; they are > supposed to be transparent but they might have tripped on a latent issue. Tentative fix attached, I need to test it extensively in Ada though. Btw, Ian, if the heap trampoline support is no longer used by the Go compiler, you might want to remove it from the middle-end. -- Eric Botcazou Index: calls.c =================================================================== --- calls.c (revision 243245) +++ calls.c (working copy) @@ -3427,13 +3427,6 @@ expand_call (tree exp, rtx target, int i if (STRICT_ALIGNMENT) store_unaligned_arguments_into_pseudos (args, num_actuals); - /* Prepare the address of the call. This must be done before any - register parameters is loaded for find_first_parameter_load to - work properly in the presence of descriptors. */ - funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp, - static_chain_value, &call_fusage, - reg_parm_seen, flags); - /* Now store any partially-in-registers parm. This is the last place a block-move can happen. */ if (reg_parm_seen) @@ -3544,6 +3537,9 @@ expand_call (tree exp, rtx target, int i } after_args = get_last_insn (); + funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp, + static_chain_value, &call_fusage, + reg_parm_seen, flags); load_register_parameters (args, num_actuals, &call_fusage, flags, pass == 0, &sibcall_failure);