===================================================================
@@ -1,6 +1,7 @@
/* { dg-skip-if "need at least armv5" { *-*-* } { "-march=armv[234]*"
} { "" } } */
/* { dg-options "-O2 -march=armv5te" } */
/* { dg-final { scan-assembler "blx" } } */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
int (*indirect_func)(int x);
===================================================================
@@ -5,6 +5,7 @@
/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } {
"-mcpu=*" } { "-mcpu=xscale" } } */
/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } {
"-mthumb" } { "" } } */
/* { dg-require-effective-target arm32 } */
+/* { dg-require-effective-target arm_xscale_ok } */
unsigned load2(void) __attribute__ ((naked));
unsigned load2(void)
===================================================================
@@ -3,6 +3,7 @@
/* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } {
"-march=*" } { "-march=xscale" } } */
/* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*"
} { "-mcpu=xscale" } } */
/* { dg-options "-mcpu=xscale -O" } */
+/* { dg-require-effective-target arm_xscale_ok } */
unsigned load4(void) __attribute__ ((naked));
unsigned load4(void)
===================================================================
@@ -5,6 +5,7 @@
/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } {
"-mcpu=*" } { "-mcpu=xscale" } } */
/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } {
"-mthumb" } { "" } } */
/* { dg-require-effective-target arm32 } */
+/* { dg-require-effective-target arm_xscale_ok } */
/* Brett Gaines' test case. */
unsigned BCPL(unsigned) __attribute__ ((naked));
===================================================================
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O -march=armv6" } */
/* { dg-prune-output "switch .* conflicts with" } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
unsigned short foo (unsigned short x)
{
===================================================================
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "" } } */
/* { dg-options "-mcpu=xscale -O" } */
+/* { dg-require-effective-target arm_xscale_ok } */
unsigned load1(void) __attribute__ ((naked));
unsigned load1(void)
===================================================================
@@ -2721,6 +2721,11 @@ foreach { armfunc armflag armdef } { v4
#if !defined (DEF)
#error !DEF
#endif
+ int
+ main (void)
+ {
+ return 0;
+ }
} "FLAG" ]
}
@@ -2948,6 +2953,23 @@ proc check_effective_target_arm_hf_eabi
}]
}
+# Return 1 if this is an ARM target supporting -mcpu=xscale.
+# Some multilibs may be incompatible with this option.
+proc check_effective_target_arm_xscale_ok { } {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_xscale_ok object {
+ int dummy;
+ int
+ main (void)
+ {
+ return 0;
+ }
+ } "-mcpu=xscale"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is an ARM target supporting -mcpu=iwmmxt.
# Some multilibs may be incompatible with this option.