diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lower-subreg-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/sibcall-3.c | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/sibcall-4.c | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 10 |
6 files changed, 53 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4521fe5..d2cf2b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2007-09-20 Richard Sandiford <rsandifo@nildram.co.uk> + + * lib/target-supports.exp (check_effective_target_mips64): New + procedure. + * gcc.dg/lower-subreg-1.c: Require !mips64. + * gcc.dg/sibcall-3.c (ATTR): New macro. + (recurser_void1, recurser_void2): Use it. + * gcc.dg/sibcall-4.c: As for gcc.dg/sibcall-3.c. + * gcc.dg/tree-ssa/ssa-fre-3.c: Require !mips64. + 2007-09-20 Tobias Schlüter <tobi@gcc.gnu.org> * gfortran.dg/g77/19981216-0.f: Remove dg-warning annotation. diff --git a/gcc/testsuite/gcc.dg/lower-subreg-1.c b/gcc/testsuite/gcc.dg/lower-subreg-1.c index f3a29f6..37c884a 100644 --- a/gcc/testsuite/gcc.dg/lower-subreg-1.c +++ b/gcc/testsuite/gcc.dg/lower-subreg-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target { ! mips64 } } } */ /* { dg-options "-O -fdump-rtl-subreg" } */ /* { dg-require-effective-target ilp32 } */ diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c index 0ea5ef3..6e6b3ae 100644 --- a/gcc/testsuite/gcc.dg/sibcall-3.c +++ b/gcc/testsuite/gcc.dg/sibcall-3.c @@ -18,8 +18,16 @@ extern void abort (void); extern void exit (int); -static void recurser_void1 (int); -static void recurser_void2 (int); +/* Sibcalls are not supported in MIPS16 mode, which has direct calls but + not direct jumps. */ +#ifdef __mips +#define ATTR __attribute__((nomips16)) +#else +#define ATTR +#endif + +static ATTR void recurser_void1 (int); +static ATTR void recurser_void2 (int); extern void track (int); int main () @@ -32,7 +40,7 @@ int main () reasonably sure is to make them have the same contents (regarding the n tests). */ -static void __attribute__((noinline)) +static void __attribute__((noinline)) ATTR recurser_void1 (int n) { if (n == 0 || n == 7 || n == 8) @@ -44,7 +52,7 @@ recurser_void1 (int n) recurser_void2 (n + 1); } -static void __attribute__((noinline)) +static void __attribute__((noinline)) ATTR recurser_void2 (int n) { if (n == 0 || n == 7 || n == 8) diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c index f1c1ca6..c852c8a 100644 --- a/gcc/testsuite/gcc.dg/sibcall-4.c +++ b/gcc/testsuite/gcc.dg/sibcall-4.c @@ -18,8 +18,16 @@ extern void abort (void); extern void exit (int); -static void recurser_void1 (void); -static void recurser_void2 (void); +/* Sibcalls are not supported in MIPS16 mode, which has direct calls but + not direct jumps. */ +#ifdef __mips +#define ATTR __attribute__((nomips16)) +#else +#define ATTR +#endif + +static ATTR void recurser_void1 (void); +static ATTR void recurser_void2 (void); extern void track (void); int n = 0; @@ -33,7 +41,7 @@ int main () reasonably sure is to make them have the same contents (regarding the n tests). */ -static void __attribute__((noinline)) +static void __attribute__((noinline)) ATTR recurser_void1 (void) { if (n == 0 || n == 7 || n == 8) @@ -45,7 +53,7 @@ recurser_void1 (void) recurser_void2 (); } -static void __attribute__((noinline)) +static void __attribute__((noinline)) ATTR recurser_void2 (void) { if (n == 0 || n == 7 || n == 8) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c index ebc91e7..3b7a547 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c @@ -1,4 +1,11 @@ -/* { dg-do compile } */ +/* This test requires: + + TRULY_NOOP_TRUNCATION (sizeof (int) * CHAR_BIT, + sizeof (long long) * CHAR_BIT) + + When the condition is true, we distribute "(int) (a + b)" as + "(int) a + (int) b", otherwise we keep the original. */ +/* { dg-do compile { target { ! mips64 } } } */ /* { dg-options "-O -fwrapv -fdump-tree-fre-details" } */ /* From PR14844. */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5a39b86..b744e2e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -617,6 +617,16 @@ proc check_effective_target_mpaired_single { } { } "-mpaired-single"] } +# Return true if the target is a 64-bit MIPS target. + +proc check_effective_target_mips64 { } { + return [check_no_compiler_messages mips64 assembly { + #ifndef __mips64 + #error FOO + #endif + }] +} + # Return 1 if the current multilib does not generate PIC by default. proc check_effective_target_nonpic { } { |