From patchwork Thu Nov 24 22:27:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 84008 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp257231qgi; Thu, 24 Nov 2016 14:28:28 -0800 (PST) X-Received: by 10.99.144.65 with SMTP id a62mr8207565pge.103.1480026508593; Thu, 24 Nov 2016 14:28:28 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o4si12612131plb.25.2016.11.24.14.28.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 14:28:28 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-442598-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-442598-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-442598-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:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=ukOsWRd2t8xOHNuN Ud1dUuQqwvAHFkzRpB1uH5Va01AWcpGqd41NhQEeUE+hjviw6/yTXDbgaPJuVPDV 5id17JzwWpHtKLEN4aCj9nYN/h+fnOGQgiYal+Xtt3ZfBdSsXHkU6pG658DxavPI 7wImF60G9EvqhW+gpWkQClJ/A4A= 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; s=default; bh=X+F5DCio5xg0+jvmNcQCTd Yt2Uw=; b=UnV+VhY81OPIx8KD3WhGT8bEWANt5oORJfjw72yY86tJGlGt9qzEyL OpBHdSrmVNOACronwef35S68LiKVuuJvuYM9aXdXF0jhfGpnKGAollLLzdhxs9JB jW4U0GsKwk5gNWpz5irnoNA3YJVz7/OnxJ16gJ1w8rs/fIyCqx1jM= Received: (qmail 130164 invoked by alias); 24 Nov 2016 22:28:16 -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 130150 invoked by uid 89); 24 Nov 2016 22:28:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:LMTP, Hx-languages-length:1624 X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 22:28:05 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 229F6A79; Thu, 24 Nov 2016 23:28:03 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OyxXXJkiXw+L; Thu, 24 Nov 2016 23:27:59 +0100 (CET) Received: from fuego.CeBiTec.Uni-Bielefeld.DE (p5DCE3560.dip0.t-ipconnect.de [93.206.53.96]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id BB807A78; Thu, 24 Nov 2016 23:27:58 +0100 (CET) From: Rainer Orth To: Jeff Law Cc: Bernd Schmidt , Denys Vlasenko , GCC Patches Subject: Re: New option -flimit-function-alignment References: <0105be2b-46da-1e48-87cc-a88b46825cf0@redhat.com> <3da48583-d19b-ac0e-46c8-eb25e5b89ad3@redhat.com> <797cae7c-18bb-503b-d775-db5447b00ee3@redhat.com> <7ae116b8-2750-36b2-96d7-b242630078d7@redhat.com> Date: Thu, 24 Nov 2016 23:27:57 +0100 In-Reply-To: <7ae116b8-2750-36b2-96d7-b242630078d7@redhat.com> (Jeff Law's message of "Wed, 16 Nov 2016 11:23:06 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Hi Jeff, >> gcc/ >> * common.opt (flimit-function-alignment): New. >> * doc/invoke.texi (-flimit-function-alignment): Document. >> * emit-rtl.h (struct rtl_data): Add max_insn_address field. >> * final.c (shorten_branches): Set it. >> * varasm.c (assemble_start_function): Limit alignment if >> requested. >> >> gcc/testsuite/ >> * gcc.target/i386/align-limit.c: New test. > OK. Sorry for the long delay. unfortunately, this broke Solaris 12/SPARC bootstrap with /bin/as: /vol/gcc/src/hg/trunk/local/gcc/varasm.c: In function 'void assemble_start_function(tree, const char*)': /vol/gcc/src/hg/trunk/local/gcc/varasm.c:1794:11: error: unused variable 'align_log' [-Werror=unused-variable] int align_log = align_functions_log; ^~~~~~~~~ The following fixes it and allowed bootstrap to complete successfully. I'm going to commit it as obvious. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2016-11-24 Rainer Orth * varasm.c (assemble_start_function): Wrap align_log definition in ASM_OUTPUT_MAX_SKIP_ALIGN. diff --git a/gcc/varasm.c b/gcc/varasm.c --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1791,7 +1791,9 @@ assemble_start_function (tree decl, cons && align_functions_log > align && optimize_function_for_speed_p (cfun)) { +#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN int align_log = align_functions_log; +#endif int max_skip = align_functions - 1; if (flag_limit_function_alignment && crtl->max_insn_address > 0 && max_skip >= crtl->max_insn_address)