public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Terry Guo" <terry.guo@arm.com>
To: "Richard Earnshaw" <Richard.Earnshaw@arm.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: RE: [Patch ARM] Update the test case to differ movs and lsrs for ARM mode and non-ARM mode
Date: Wed, 22 Aug 2012 11:15:00 -0000	[thread overview]
Message-ID: <000401cd8057$8d1b0240$a75106c0$@guo@arm.com> (raw)
In-Reply-To: <5034AF05.2090905@arm.com>


> >
> > Due to the impact of ARM UAL, the Thumb1 and Thumb2 mode use LSRS
> > instruction while the ARM mode uses MOVS instruction. So the
> following case
> > is updated accordingly. Is it OK to trunk?
> >
> > BR,
> > Terry
> >
> > 2012-08-21  Terry Guo  <terry.guo@arm.com>
> >
> >         * gcc.target/arm/combine-movs.c: Check movs for ARM mode
> >         and lsrs for other mode.
> >
> 
> This can't be right.  Thumb1 doesn't use unified syntax.
> 
> R.
> 

oops. You are right. Sorry for making such obvious mistake. 
Here is patch updated to distinguish ARM and Thumb2. 
Tested for Thumb1, Thumb2 and ARM modes. No regression.

Is it OK?

BR,
Terry

2012-08-21  Terry Guo  <terry.guo@arm.com>

        * gcc.target/arm/combine-movs.c: Check movs for ARM mode 
        and lsrs for Thumb2 mode.


diff --git a/gcc/testsuite/gcc.target/arm/combine-movs.c
b/gcc/testsuite/gcc.target/arm/combine-movs.c
index 4209a33..3e36033 100644
--- a/gcc/testsuite/gcc.target/arm/combine-movs.c
+++ b/gcc/testsuite/gcc.target/arm/combine-movs.c
@@ -9,4 +9,5 @@ void foo (unsigned long r[], unsigned int d)
     r[i] = 0;
 }
 
-/* { dg-final { scan-assembler "movs\tr\[0-9\]" } } */
+/* { dg-final { scan-assembler "lsrs\tr\[0-9\]" { target arm_thumb2_ok } }
}  */
+/* { dg-final { scan-assembler "movs\tr\[0-9\]" { target { ! arm_thumb2_ok
} } } } */


  reply	other threads:[~2012-08-22 11:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22  1:18 Terry Guo
2012-08-22 10:06 ` Richard Earnshaw
2012-08-22 11:15   ` Terry Guo [this message]
2012-08-22 14:16     ` Richard Earnshaw
2012-09-04  6:02       ` Terry Guo
2012-09-14 10:14     ` Ulrich Weigand

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='000401cd8057$8d1b0240$a75106c0$@guo@arm.com' \
    --to=terry.guo@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).