From patchwork Wed Mar 29 08:12:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 744656 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vtL9D2H2yz9s0Z for ; Wed, 29 Mar 2017 19:12:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Hkp6ooI6"; dkim-atps=neutral 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:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=C46EGq4F24sY2UHk0S/uf4AEWwTYj5xZ7b+Lo2CTSsTeCjeLeSgRj U8kqaWkpc8TFF1pSms1GNSIQiwQFCUw3JFktUhABN61j/ERfunC7ULd3wkyVpguw MeiTNvjGCafx5pZhhzQImLGdjrvr5TivJRWhqG4rzAYGnemB4vcSmQ= 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:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=4JUWPcTTgS8IAo8djfXVbxqxC68=; b=Hkp6ooI6LuAkUgYOCRnTi6HFle15 w4R8eOoSLoDed166GAS4+DHm9+PiMv36XMVayeExzBzE7qrS5UqIZyx/bkCydMUc 4gRad7JY5JIwMn7me2nCrhutOTVY3BbprD6hFWx/1lQ9g1dV0/RqT/kt5JpevKFV 3R4Qb+PD/B9qygY= 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-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 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:12:29 +0200 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 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);