Message ID | 000001cb630a$3bd5c800$b3815800$@Naci@arm.com |
---|---|
State | New |
Headers | show |
On Sun, 2010-10-03 at 15:49 +0100, Sofiane Naci wrote: > Hi, > > This patch enables 9 testcases that were believed to work on Thumb1 only to > be run on Thumb2 targets as well. > > Thanks > Sofiane > > > gcc/testsuite > > 2010-09-28 Sofiane Naci <sofiane.naci@arm.com> > > * gcc.target/arm/pr40657-1.c: Test can be run on any Thumb1 or Thumb2 > supporting target. > * gcc.target/arm/pr40657-2.c: Likewise. > * gcc.target/arm/pr40670.c: Likewise. > * gcc.target/arm/pr40956.c: Likewise. > * gcc.target/arm/pr42495.c: Likewise. > * gcc.target/arm/pr42505.c: Likewise. > * gcc.target/arm/thumb-comparisons.c: Likewise. > * gcc.target/arm/thumb-stackframe.c: Likewise. > * gcc.target/arm/thumb1-mul-moves.c: Likewise. > * lib/target-supports.exp (check_effective_target_arm_any_thumb_ok): new ^^ Capital letter here. > procedure. Otherwise OK. R.
Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-1.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-1.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-Os -march=armv5te -mthumb" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-final { scan-assembler "pop.*r1.*pc" } } */ /* { dg-final { scan-assembler-not "sub\[\\t \]*sp,\[\\t \]*sp" } } */ /* { dg-final { scan-assembler-not "add\[\\t \]*sp,\[\\t \]*sp" } } */ Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-2.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-2.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40657-2.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-Os -march=armv4t -mthumb" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-final { scan-assembler-not "sub\[\\t \]*sp,\[\\t \]*sp" } } */ /* { dg-final { scan-assembler-not "add\[\\t \]*sp,\[\\t \]*sp" } } */ Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40670.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40670.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40670.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-mthumb -O2" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-final { scan-assembler-not "ldr" } } */ float foo (void) Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40956.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40956.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr40956.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-mthumb -Os -fpic -march=armv5te" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-require-effective-target fpic } */ /* Make sure the constant "0" is loaded into register only once. */ /* { dg-final { scan-assembler-times "mov\[\\t \]*r., #0" 1 } } */ Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42505.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42505.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42505.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-mthumb -Os -march=armv5te" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-final { scan-assembler-not "str\[\\t \]*r.,\[\\t \]*.sp," } } */ struct A { Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-comparisons.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-comparisons.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-comparisons.c (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mthumb -Os" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ int foo(char ch) { Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-stackframe.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-stackframe.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb-stackframe.c (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mthumb -Os" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ extern void bar(int*); int foo() Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb1-mul-moves.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb1-mul-moves.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/thumb1-mul-moves.c (working copy) @@ -1,6 +1,6 @@ /* Check for unnecessary register moves. */ /* { dg-options "-mthumb -Os" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ int f(int x) { Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42495.c =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42495.c (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/gcc.target/arm/pr42495.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-mthumb -Os -fpic -march=armv5te -fdump-rtl-hoist" } */ -/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_any_thumb_ok } */ /* { dg-require-effective-target fpic } */ /* Make sure all calculations of gObj's address get hoisted to one location. */ /* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */ Index: /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/lib/target-supports.exp =================================================================== --- /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/lib/target-supports.exp (revision 163954) +++ /home/sofnac01/work/sandboxes/devt/trunk/source/gcc/testsuite/lib/target-supports.exp (working copy) @@ -1905,6 +1905,17 @@ } "-mthumb"] } +# Return 1 if this is an ARM target where -mthumb causes either Thumb-1 +# or Thumb-2 to be used. + +proc check_effective_target_arm_any_thumb_ok { } { + return [check_no_compiler_messages arm_any_thumb_ok assembly { + #if !defined(__thumb__) + #error FOO + #endif + } "-mthumb"] +} + # Return 1 if the target supports executing NEON instructions, 0 # otherwise. Cache the result.