[ARM] Update the test case to differ movs and lsrs for ARM mode and non-ARM mode

Submitted by Terry Guo on Aug. 22, 2012, 1:20 a.m.

Details

Message ID 000001cd8004$485ab0e0$d91012a0$@guo@arm.com
State New
Headers show

Commit Message

Terry Guo Aug. 22, 2012, 1:20 a.m.
Hi,

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.

+/* { dg-final { scan-assembler "lsrs\tr\[0-9\]" { target { ! arm_nothumb }
} } } */

Comments

Richard Earnshaw Aug. 22, 2012, 10:05 a.m.
On 22/08/12 02:20, Terry Guo wrote:
> Hi,
> 
> 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.

> diff --git a/gcc/testsuite/gcc.target/arm/combine-movs.c
> b/gcc/testsuite/gcc.target/arm/combine-movs.c
> index 4209a33..fbef9df 100644
> --- a/gcc/testsuite/gcc.target/arm/combine-movs.c
> +++ b/gcc/testsuite/gcc.target/arm/combine-movs.c
> @@ -1,5 +1,4 @@
>  /* { dg-do compile } */
> -/* { dg-skip-if "" { arm_thumb1 } } */
>  /* { dg-options "-O" }  */
> 
>  void foo (unsigned long r[], unsigned int d)
> @@ -9,4 +8,5 @@ void foo (unsigned long r[], unsigned int d)
>      r[i] = 0;
>  }
> 
> -/* { dg-final { scan-assembler "movs\tr\[0-9\]" } } */
> +/* { dg-final { scan-assembler "movs\tr\[0-9\]" { target arm_nothumb } } }
> */
> +/* { dg-final { scan-assembler "lsrs\tr\[0-9\]" { target { ! arm_nothumb }
> } } } */
> 
> 
> 
>

Patch hide | download patch | download mbox

diff --git a/gcc/testsuite/gcc.target/arm/combine-movs.c
b/gcc/testsuite/gcc.target/arm/combine-movs.c
index 4209a33..fbef9df 100644
--- a/gcc/testsuite/gcc.target/arm/combine-movs.c
+++ b/gcc/testsuite/gcc.target/arm/combine-movs.c
@@ -1,5 +1,4 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "" { arm_thumb1 } } */
 /* { dg-options "-O" }  */

 void foo (unsigned long r[], unsigned int d)
@@ -9,4 +8,5 @@  void foo (unsigned long r[], unsigned int d)
     r[i] = 0;
 }

-/* { dg-final { scan-assembler "movs\tr\[0-9\]" } } */
+/* { dg-final { scan-assembler "movs\tr\[0-9\]" { target arm_nothumb } } }
*/