From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50080 invoked by alias); 1 Oct 2015 16:11:46 -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 49382 invoked by uid 89); 1 Oct 2015 16:11:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mx07-00178001.pphosted.com Received: from mx07-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (62.209.51.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 01 Oct 2015 16:11:40 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id t91G8VHT016484; Thu, 1 Oct 2015 18:11:36 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 1x8edrnsww-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Oct 2015 18:11:36 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9823331; Thu, 1 Oct 2015 16:11:16 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas4.st.com [10.75.90.69]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C2D20A72D; Thu, 1 Oct 2015 16:11:34 +0000 (GMT) Received: from [164.129.122.197] (164.129.122.197) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.342.0; Thu, 1 Oct 2015 18:11:34 +0200 Subject: Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2 To: References: <560A90F2.5010708@st.com> <560C31CD.7060009@redhat.com> <560CDCD7.9080108@st.com> From: Christian Bruel X-Enigmail-Draft-Status: N1110 CC: X-No-Archive: yes Message-ID: <560D5B36.2020600@st.com> Date: Thu, 01 Oct 2015 16:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <560CDCD7.9080108@st.com> Content-Type: multipart/mixed; boundary="------------020003050205060207040805" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-10-01_06:2015-10-01,2015-10-01,1970-01-01 signatures=0 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00096.txt.bz2 --------------020003050205060207040805 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Content-length: 1024 > If this is not satisfactory I'll have to think about updating DECL_ALIGN > after the function's attribute are processed and keep using it in > assemble_start_function. > > Come back later > Indeed, I found that resetting DECL_ALIGN in the arm_set_current_function hooks is much cleaner than my previous patch, and, as you said, preserve the case where DECL_USER_ALIGN is 1. First I thought it was weird to change a tree fndecl field in the targetm.set_current_function (fndecl) hook as I haven't seen in any other target and that only the restore_target_globals or cl_target_option_restore functions would switch the states between functions (like align_functions_log, target_flags) thanks to target_reinit. But it seems to be the less intrusive one line fix I found without touching the middle end parts. Other suggestions welcome though. I'm testing with the attached patch to replace the previous (2/2) one and I'll discuss it next week with the arm maintainers after more testing. sorry for the noise. thanks --------------020003050205060207040805 Content-Type: text/x-patch; name="align2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="align2.patch" Content-length: 550 diff '--exclude=3D.svn' -rup gnu_trunk.devs/gcc/gcc/config/arm/arm.c gnu_tr= unk.devs1/gcc/gcc/config/arm/arm.c --- gnu_trunk.devs/gcc/gcc/config/arm/arm.c 2015-10-01 17:50:22.996545547 += 0200 +++ gnu_trunk.devs1/gcc/gcc/config/arm/arm.c 2015-10-01 17:56:01.213272650 = +0200 @@ -29808,6 +29808,9 @@ arm_set_current_function (tree fndecl) =3D save_target_globals_default_opts (); } =20 + /* We don't know yet the optimize_size for this function. */ + DECL_ALIGN (fndecl) =3D FUNCTION_BOUNDARY; + arm_option_params_internal (); } =20 --------------020003050205060207040805--