From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28542 invoked by alias); 17 Jan 2013 02:39:01 -0000 Received: (qmail 28529 invoked by uid 22791); 17 Jan 2013 02:38:58 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Jan 2013 02:38:53 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TvfNT-0003O2-QQ from Janis_Johnson@mentor.com ; Wed, 16 Jan 2013 18:38:51 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 Jan 2013 18:38:40 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Wed, 16 Jan 2013 18:38:39 -0800 Message-ID: <50F764B9.7000906@mentor.com> Date: Thu, 17 Jan 2013 02:39:00 -0000 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Joey Ye CC: Subject: Re: [PATCH] [testsuite] [arm] Test thumb1 far jump References: <000001cdf457$23711cc0$6a535640$@ye@arm.com> In-Reply-To: <000001cdf457$23711cc0$6a535640$@ye@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit 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: 2013-01/txt/msg00893.txt.bz2 On 01/16/2013 06:05 PM, Joey Ye wrote: > Test cases for previous patch "no lr save for non-far branches in leaf > function". > > * gcc.target/arm/thumb1-far-jump-1.c: New. > * gcc.target/arm/thumb1-far-jump-2.c: New. > > Index: gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c > =================================================================== > --- gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c (revision 0) > +++ gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c (revision 0) > @@ -0,0 +1,58 @@ > +/* Check for thumb1 far jump. This is the extreme case that far jump > + * will be used with minimum number of instructions. By passing this case > + * it means the heuristic of saving lr for far jump meets the most extreme > + * requirement. */ > +/* { dg-require-effective-target arm_thumb1_ok } */ > +/* { dg-options "-Os" } */ > +/* { dg-skip-if "" { ! { arm_thumb1 } } } */ The effective target arm_thumb1_ok returns 1 if it's OK to add -mthumb to the current multilib flags and together they generate code for Thumb-1. arm_thumb1 says that the current multilib flags generate code for Thumb-1. If you want to add -mthumb to the test then use: /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-Os -mthumb" } */ Otherwise use /* { dg-skip-if "" { ! arm_thumb1 } } */ /* { dg-options "-Os" } */ > +/* { dg-final { scan-assembler "push.*lr" } } */ > Index: gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c > =================================================================== > --- gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c (revision 0) > +++ gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c (revision 0) > @@ -0,0 +1,35 @@ > +/* Check for thumb1 far jump. Shouldn't save lr for small leaf functions > + * even with a branch in it. */ > +/* { dg-require-effective-target arm_thumb1_ok } */ > +/* { dg-options "-Os" } */ > +/* { dg-skip-if "" { ! { arm_thumb1 } } } */ Same here. The tests are OK with those changes, but please wait a day or two for other comments or a clear OK from an ARM maintainer. Janis