2011-06-28 Janis Johnson <janisjo@codesourcery.com>

Tom de Vries  <tom@codesourcery.com>

	* lib/target-supports.exp (check_effective_target_arm_nothumb)
	(check_effective_target_arm_thumb2): New effective targets.
	* gcc.target/arm/ivopts.c: Remove -mthumb/-marm.  Guard object-size
	properly.  Clean up temporary files.
	* gcc.target/arm/ivopts-2.c: Likewise.
	* gcc.target/arm/ivopts-3.c: Likewise.
	* gcc.target/arm/ivopts-4.c: Likewise.
	* gcc.target/arm/ivopts-5.c: Likewise.
	* gcc.target/arm/ivopts-6.c: Remove duplicate of ivopts.c.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r175596
This commit is contained in:
Janis Johnson 2011-06-28 19:33:06 +00:00 committed by Janis Johnson
parent 19b76346c0
commit 3b99e63522
7 changed files with 49 additions and 10 deletions

View File

@ -1,3 +1,16 @@
2011-06-28 Janis Johnson <janisjo@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm_nothumb)
(check_effective_target_arm_thumb2): New effective targets.
* gcc.target/arm/ivopts.c: Remove -mthumb/-marm. Guard object-size
properly. Clean up temporary files.
* gcc.target/arm/ivopts-2.c: Likewise.
* gcc.target/arm/ivopts-3.c: Likewise.
* gcc.target/arm/ivopts-4.c: Likewise.
* gcc.target/arm/ivopts-5.c: Likewise.
* gcc.target/arm/ivopts-6.c: Remove duplicate of ivopts.c.
2011-06-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/49479

View File

@ -1,5 +1,5 @@
/* { dg-do assemble } */
/* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
extern void foo2 (short*);
@ -14,5 +14,6 @@ tr4 (short array[], int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
/* { dg-final { object-size text <= 26 { target arm_thumb2_ok } } } */
/* { dg-final { object-size text <= 26 { target arm_thumb2 } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
/* { dg-final { cleanup-saved-temps "ivopts" } } */

View File

@ -1,5 +1,5 @@
/* { dg-do assemble } */
/* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
extern unsigned int foo2 (short*) __attribute__((pure));
@ -16,5 +16,6 @@ tr3 (short array[], unsigned int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
/* { dg-final { object-size text <= 30 { target arm_thumb2_ok } } } */
/* { dg-final { object-size text <= 30 { target arm_thumb2 } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
/* { dg-final { cleanup-saved-temps "ivopts" } } */

View File

@ -1,5 +1,5 @@
/* { dg-do assemble } */
/* { dg-options "-mthumb -Os -fdump-tree-ivopts -save-temps" } */
/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
extern unsigned int foo (int*) __attribute__((pure));
@ -17,5 +17,6 @@ tr2 (int array[], int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
/* { dg-final { object-size text <= 36 { target arm_thumb2_ok } } } */
/* { dg-final { object-size text <= 36 { target arm_thumb2 } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
/* { dg-final { cleanup-saved-temps "ivopts" } } */

View File

@ -1,5 +1,5 @@
/* { dg-do assemble } */
/* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
extern unsigned int foo (int*) __attribute__((pure));
@ -16,5 +16,6 @@ tr1 (int array[], unsigned int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
/* { dg-final { object-size text <= 30 { target arm_thumb2_ok } } } */
/* { dg-final { object-size text <= 30 { target arm_thumb2 } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
/* { dg-final { cleanup-saved-temps "ivopts" } } */

View File

@ -1,5 +1,5 @@
/* { dg-do assemble } */
/* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
void
tr5 (short array[], int n)
@ -11,5 +11,8 @@ tr5 (short array[], int n)
}
/* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
/* { dg-final { object-size text <= 20 { target arm_thumb2_ok } } } */
/* { dg-final { object-size text <= 20 { target arm_thumb2 } } } */
/* { dg-final { object-size text <= 32 { target { arm_nothumb && { ! arm_iwmmxt_ok } } } } } */
/* { dg-final { object-size text <= 36 { target { arm_nothumb && arm_iwmmxt_ok } } } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
/* { dg-final { cleanup-saved-temps "ivopts" } } */

View File

@ -1862,6 +1862,15 @@ proc check_effective_target_arm32 { } {
}]
}
# Return 1 is this is an arm target not using Thumb
proc check_effective_target_arm_nothumb { } {
return [check_no_compiler_messages arm_nothumb assembly {
#if (defined(__thumb__) || defined(__thumb2__))
#error FOO
#endif
}]
}
# Return 1 if this is an ARM target that only supports aligned vector accesses
proc check_effective_target_arm_vect_no_misalign { } {
return [check_no_compiler_messages arm_vect_no_misalign assembly {
@ -2018,6 +2027,16 @@ proc check_effective_target_arm_thumb2_ok { } {
} "-mthumb"]
}
# Return 1 is this is an ARM target where is Thumb-2 used.
proc check_effective_target_arm_thumb2 { } {
return [check_no_compiler_messages arm_thumb2 assembly {
#if !defined(__thumb2__)
#error FOO
#endif
} ""]
}
# Return 1 if the target supports executing NEON instructions, 0
# otherwise. Cache the result.