This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch ARM] Minor testsuite fixups for Thumb2.


Hi

There are a couple of tests that are run spuriously for Thumb2 when they
shouldn't be. These are ARM state only tests for xscale which end up
failing because we end up running these for Thumb2 as they were designed
only for running in ARM state for xscale. 

Fixed thusly and tested by running a test on an automatically configured
thumb2 compiler (i.e. --with-mode=thumb) and making sure these show up
as unsupported and making sure these succeed on a default ARM state
compiler.

Ok to commit on trunk and on the 4.5 branch once it reopens?

cheers
Ramana

P.S.  I haven't done this for the sibcall*.c tests because I know
Julian has a patch in the queue that allows Thumb2 sibling calls and it
seemed pointless to cleanup this test and then take it out once that got
committed.


2010-04-07  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com

        * lib/target-supports.exp (check_effective_target_arm32only):
New.
        * gcc.target/arm/g2.c: Use arm32only.
        * gcc.target/arm/scd42-2.c: Likewise.




Index: testsuite/lib/target-supports.exp
===================================================================
--- testsuite/lib/target-supports.exp	(revision 158041)
+++ testsuite/lib/target-supports.exp	(working copy)
@@ -1575,6 +1575,15 @@ proc check_effective_target_arm32 { } {
     }]
 }
 
+# Return 1 if this is only an ARM target
+proc check_effective_target_arm32only { } {
+    return [check_no_compiler_messages arm32 assembly {
+	#if !defined(__arm__) || defined (__thumb__) || defined(__thumb2__)
+	#error FOO
+	#endif
+    }]
+}
+
 # Return 1 if this is an ARM target supporting -mfpu=vfp
 # -mfloat-abi=softfp.  Some multilibs may be incompatible with these
 # options.
Index: testsuite/gcc.target/arm/g2.c
===================================================================
--- testsuite/gcc.target/arm/g2.c	(revision 158041)
+++ testsuite/gcc.target/arm/g2.c	(working copy)
@@ -1,8 +1,7 @@
-/* Verify that hardware multiply is preferred on XScale. */
-/* { dg-do compile } */
-/* { dg-options "-mcpu=xscale -O2" } */
-/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
-/* { dg-require-effective-target arm32 } */
+/* Verify that hardware multiply is preferred on XScale in ARM state 
+   only. */
+/* { dg-do compile { target { arm32only } } } */
+/* { dg-options "-mcpu=xscale -O2 -marm" } */
 
 /* Brett Gaines' test case. */
 unsigned BCPL(unsigned) __attribute__ ((naked));
Index: testsuite/gcc.target/arm/scd42-2.c
===================================================================
--- testsuite/gcc.target/arm/scd42-2.c	(revision 158041)
+++ testsuite/gcc.target/arm/scd42-2.c	(working copy)
@@ -1,8 +1,7 @@
-/* Verify that mov is preferred on XScale for loading a 2 byte constant. */
-/* { dg-do compile } */
+/* Verify that mov is preferred on XScale for loading a 2 byte constant
+   in ARM state only.  */
+/* { dg-do compile {target { arm32only } } } */
 /* { dg-options "-mcpu=xscale -O" } */
-/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
-/* { dg-require-effective-target arm32 } */
 
 unsigned load2(void) __attribute__ ((naked));
 unsigned load2(void)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]