diff mbox

[ARM,tests] Add -march=armv6 to tests that have -mapcs

Message ID 54B64723.7070706@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Jan. 14, 2015, 10:38 a.m. UTC
Hi all,

I'm proposing a gas patch to add warnings for deprecated forms of ldm in 
ARMv7-A.
(https://sourceware.org/ml/binutils/2015-01/msg00158.html)
Unfortunately, GCC generates these deprecated forms with -mapcs-frame.
Since the deprecation happens only from armv7-a onwards, this patch adds 
-march=armv6 to the tests that use -mapcs so that the assembler doesn't 
complain. -mapcs is a pretty old option that was not intended to be used 
with newer architecture levels anyway, as far as I can tell.

Ok for trunk?

Thanks,
Kyrill

2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.target/arm/neon-nested-apcs.c: Add -march=armv6 to options.
     * gcc.target/arm/nested-apcs.c: Likewise.
     * gcc.target/arm/pr60264.c: Likewise.

Comments

Richard Earnshaw Jan. 14, 2015, 11:16 a.m. UTC | #1
On 14/01/15 10:38, Kyrill Tkachov wrote:
> Hi all,
> 
> I'm proposing a gas patch to add warnings for deprecated forms of ldm in 
> ARMv7-A.
> (https://sourceware.org/ml/binutils/2015-01/msg00158.html)
> Unfortunately, GCC generates these deprecated forms with -mapcs-frame.
> Since the deprecation happens only from armv7-a onwards, this patch adds 
> -march=armv6 to the tests that use -mapcs so that the assembler doesn't 
> complain. -mapcs is a pretty old option that was not intended to be used 
> with newer architecture levels anyway, as far as I can tell.
> 
> Ok for trunk?
> 

This is sort of reason why I think we should be careful about the GAS
patch you recently posted.

In particular, the pr60264 change means that it doesn't test the same
thing on compilers configured for architectures prior to v6.

R.

> Thanks,
> Kyrill
> 
> 2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>      * gcc.target/arm/neon-nested-apcs.c: Add -march=armv6 to options.
>      * gcc.target/arm/nested-apcs.c: Likewise.
>      * gcc.target/arm/pr60264.c: Likewise.
> 
> 
> arm-mapcs-tests.patch
> 
> 
> diff --git a/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
> index cd92d7d..453096f 100644
> --- a/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
> +++ b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
> @@ -1,6 +1,6 @@
>  /* { dg-do run } */
>  /* { dg-require-effective-target arm_neon_hw } */
> -/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" }
> +/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O -march=armv6" } */
>  /* { dg-add-options arm_neon } */
>  
>  extern void abort (void);
> diff --git a/gcc/testsuite/gcc.target/arm/nested-apcs.c b/gcc/testsuite/gcc.target/arm/nested-apcs.c
> index 9dac304..ee89b3c 100644
> --- a/gcc/testsuite/gcc.target/arm/nested-apcs.c
> +++ b/gcc/testsuite/gcc.target/arm/nested-apcs.c
> @@ -1,5 +1,5 @@
>  /* { dg-do run } */
> -/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" } */
> +/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O -march=armv6" } */
>  
>  extern void abort (void);
>  
> diff --git a/gcc/testsuite/gcc.target/arm/pr60264.c b/gcc/testsuite/gcc.target/arm/pr60264.c
> index 4fe6aed..b25ef2a 100644
> --- a/gcc/testsuite/gcc.target/arm/pr60264.c
> +++ b/gcc/testsuite/gcc.target/arm/pr60264.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-mapcs -g" } */
> +/* { dg-options "-mapcs -g -march=armv6" } */
>  
>  double bar(void);
>  
>
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
index cd92d7d..453096f 100644
--- a/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
+++ b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
@@ -1,6 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target arm_neon_hw } */
-/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" }
+/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O -march=armv6" } */
 /* { dg-add-options arm_neon } */
 
 extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/arm/nested-apcs.c b/gcc/testsuite/gcc.target/arm/nested-apcs.c
index 9dac304..ee89b3c 100644
--- a/gcc/testsuite/gcc.target/arm/nested-apcs.c
+++ b/gcc/testsuite/gcc.target/arm/nested-apcs.c
@@ -1,5 +1,5 @@ 
 /* { dg-do run } */
-/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" } */
+/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O -march=armv6" } */
 
 extern void abort (void);
 
diff --git a/gcc/testsuite/gcc.target/arm/pr60264.c b/gcc/testsuite/gcc.target/arm/pr60264.c
index 4fe6aed..b25ef2a 100644
--- a/gcc/testsuite/gcc.target/arm/pr60264.c
+++ b/gcc/testsuite/gcc.target/arm/pr60264.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-mapcs -g" } */
+/* { dg-options "-mapcs -g -march=armv6" } */
 
 double bar(void);