From: Janis Johnson <janis_johnson@mentor.com>
To: Joey Ye <joey.ye@arm.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [testsuite] [arm] Test thumb1 far jump
Date: Thu, 17 Jan 2013 02:39:00 -0000 [thread overview]
Message-ID: <50F764B9.7000906@mentor.com> (raw)
In-Reply-To: <000001cdf457$23711cc0$6a535640$@ye@arm.com>
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
next prev parent reply other threads:[~2013-01-17 2:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 2:06 Joey Ye
2013-01-17 2:39 ` Janis Johnson [this message]
2013-01-17 2:47 ` Joey Ye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F764B9.7000906@mentor.com \
--to=janis_johnson@mentor.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=janisjo@codesourcery.com \
--cc=joey.ye@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).