From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23853 invoked by alias); 4 Apr 2011 12:14:37 -0000 Received: (qmail 23839 invoked by uid 22791); 4 Apr 2011 12:14:33 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 12:13:59 +0000 Received: by wye20 with SMTP id 20so5376751wye.20 for ; Mon, 04 Apr 2011 05:13:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.182.135 with SMTP id cc7mr7237212wbb.91.1301919238157; Mon, 04 Apr 2011 05:13:58 -0700 (PDT) Received: by 10.227.0.140 with HTTP; Mon, 4 Apr 2011 05:13:57 -0700 (PDT) In-Reply-To: References: <4D94C603.7080505@codesourcery.com> <4D94C6FB.1080309@codesourcery.com> <4D95E523.1050800@codesourcery.com> <1301671135.4104.11.camel@e102346-lin.cambridge.arm.com> <4D95F802.80003@codesourcery.com> <4D97576C.9090306@codesourcery.com> <4D98A86A.6090905@codesourcery.com> Date: Mon, 04 Apr 2011 12:14:00 -0000 Message-ID: Subject: Re: [PATCH, PR43920, 1/9] ARM specific part. From: Richard Guenther To: Sergey Ostanevich Cc: Tom de Vries , Richard Earnshaw , gcc-patches@gcc.gnu.org, Mike Stump , Rainer Orth Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00203.txt.bz2 On Sun, Apr 3, 2011 at 9:34 PM, Sergey Ostanevich wr= ote: > I would recommend to use 'nm -S a.out' that gives > > [...] > 00000000004004a4 0000000000000054 T main > [...] > > then you can provide a name for the routine you want to test for the size. That also sounds reasonable. Is nm -S more portable than size? Richard. > Regards, > Sergos > > > > 2011/4/3 Tom de Vries >> >> On 04/03/2011 09:38 AM, Richard Guenther wrote: >> > On Sat, Apr 2, 2011 at 7:05 PM, Tom de Vries >> > wrote: >> >> On 04/02/2011 09:47 AM, Richard Guenther wrote: >> >>> On Fri, Apr 1, 2011 at 6:06 PM, Tom de Vries >> >>> wrote: >> >>>> On 04/01/2011 05:18 PM, Richard Earnshaw wrote: >> >>>>> >> >>>>> On Fri, 2011-04-01 at 16:45 +0200, Tom de Vries wrote: >> >>>>>> Reposting, with ChangeLog. >> >>>>> >> >>>>> =A0#define BRANCH_COST(speed_p, predictable_p) \ >> >>>>> - =A0(TARGET_32BIT ? 4 : (optimize > 0 ? 2 : 0)) >> >>>>> + =A0(TARGET_32BIT ? (TARGET_THUMB2 && optimize_size ? 1 : 4) \ >> >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 : (optimize > 0 ? 2 : 0)) >> >>>>> >> >>>>> Don't use optimize_size here, use !speed_p. >> >>>>> >> >>>>> Otherwise OK. >> >>>>> >> >>>> >> >>>> Replaced optimize_size by !speed_p. >> >>> >> >>> I wonder if we can add a code-size test harness. =A0Using GNU size >> >>> for examle, if available and a new dg-final { object-size SIZE } that >> >>> fails when the size is greater than the specified one (of course all >> >>> object-size tests with specific target restrictions). >> >> >> >> like this? >> > >> > Yes! >> > >> > I'm not sure finding the size binary is ok, >> >> Me neither. I just copied what I saw done for c++filt in >> scan-assembler-dem-not, and found that it works for me. >> >> > and maybe we need to >> > verify that size output actually matches our expectation. >> >> Changes since previous post: >> - split output of size into lines >> - check format of first and second line >> - replaced 'switch $what' with 'lsearch $what' >> >> > Other than that it's exactly what I meant. >> > >> >> Great. >> >> > Mike? =A0Rainer? >> > >> >> Thanks, >> - Tom > >