+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
/* { dg-do assemble } */
-/* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
+/* { dg-options "-Os -fdump-tree-ivopts -save-temps" } */
extern void foo2 (short*);
/* { 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" } } */
/* { 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));
/* { 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" } } */
/* { 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));
/* { 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" } } */
/* { 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));
/* { 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" } } */
/* { 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)
}
/* { 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" } } */
}]
}
+# 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 {
} "-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.