From 63ecaca0c0af13acd9ab25ec23ea18fc952c2c8b Mon Sep 17 00:00:00 2001 From: Andrew Bennett Date: Thu, 15 Jan 2015 11:20:12 +0000 Subject: [PATCH] Update the call-saved tests for micromips output gcc/testsuite/ * gcc.target/mips/call-saved-4.c (foo): Add NOCOMPRESSION. * gcc.target/mips/call-saved-5.c (foo): Likewise. * gcc.target/mips/call-saved-6.c (foo): Likewise. * gcc.target/mips/call-saved-7.c: New file. * gcc.target/mips/call-saved-8.c: New file. * gcc.target/mips/call-saved-9.c: New file. Co-Authored-By: Matthew Fortune From-SVN: r219640 --- gcc/testsuite/ChangeLog | 10 ++++++++ gcc/testsuite/gcc.target/mips/call-saved-4.c | 2 +- gcc/testsuite/gcc.target/mips/call-saved-5.c | 2 +- gcc/testsuite/gcc.target/mips/call-saved-6.c | 2 +- gcc/testsuite/gcc.target/mips/call-saved-7.c | 25 ++++++++++++++++++++ gcc/testsuite/gcc.target/mips/call-saved-8.c | 25 ++++++++++++++++++++ gcc/testsuite/gcc.target/mips/call-saved-9.c | 25 ++++++++++++++++++++ 7 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/mips/call-saved-7.c create mode 100644 gcc/testsuite/gcc.target/mips/call-saved-8.c create mode 100644 gcc/testsuite/gcc.target/mips/call-saved-9.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b73d3159fb..1285633cb34 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2015-01-15 Andrew Bennett + Matthew Fortune + + * gcc.target/mips/call-saved-4.c (foo): Add NOCOMPRESSION. + * gcc.target/mips/call-saved-5.c (foo): Likewise. + * gcc.target/mips/call-saved-6.c (foo): Likewise. + * gcc.target/mips/call-saved-7.c: New file. + * gcc.target/mips/call-saved-8.c: New file. + * gcc.target/mips/call-saved-9.c: New file. + 2015-01-14 Matthew Fortune * gcc.target/mips/lsa.c: New file. diff --git a/gcc/testsuite/gcc.target/mips/call-saved-4.c b/gcc/testsuite/gcc.target/mips/call-saved-4.c index 846ea321e7c..92881c4dbf0 100644 --- a/gcc/testsuite/gcc.target/mips/call-saved-4.c +++ b/gcc/testsuite/gcc.target/mips/call-saved-4.c @@ -3,7 +3,7 @@ void bar (void); -void +NOCOMPRESSION void foo (int x) { __builtin_unwind_init (); diff --git a/gcc/testsuite/gcc.target/mips/call-saved-5.c b/gcc/testsuite/gcc.target/mips/call-saved-5.c index 2937b316dc7..152b28fed6f 100644 --- a/gcc/testsuite/gcc.target/mips/call-saved-5.c +++ b/gcc/testsuite/gcc.target/mips/call-saved-5.c @@ -3,7 +3,7 @@ void bar (void); -void +NOCOMPRESSION void foo (int x) { __builtin_unwind_init (); diff --git a/gcc/testsuite/gcc.target/mips/call-saved-6.c b/gcc/testsuite/gcc.target/mips/call-saved-6.c index 0d1a4c845c9..a384d4a5f40 100644 --- a/gcc/testsuite/gcc.target/mips/call-saved-6.c +++ b/gcc/testsuite/gcc.target/mips/call-saved-6.c @@ -3,7 +3,7 @@ void bar (void); -void +NOCOMPRESSION void foo (int x) { __builtin_unwind_init (); diff --git a/gcc/testsuite/gcc.target/mips/call-saved-7.c b/gcc/testsuite/gcc.target/mips/call-saved-7.c new file mode 100644 index 00000000000..2ebc2f1e421 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/call-saved-7.c @@ -0,0 +1,25 @@ +/* Check that we save the correct call-saved GPRs and FPRs. */ +/* { dg-options "(HAS_LDC) -mmicromips -mabi=32 -mfp32" } */ + +void bar (void); + +void +foo (int x) +{ + __builtin_unwind_init (); + __builtin_eh_return (x, bar); +} +/* { dg-final { scan-assembler "\\\$16-\\\$23" } } */ +/* { dg-final { scan-assembler "\\\$(30|fp)" } } */ +/* { dg-final { scan-assembler "\\\$f20" } } */ +/* { dg-final { scan-assembler "\\\$f22" } } */ +/* { dg-final { scan-assembler "\\\$f24" } } */ +/* { dg-final { scan-assembler "\\\$f26" } } */ +/* { dg-final { scan-assembler "\\\$f28" } } */ +/* { dg-final { scan-assembler "\\\$f30" } } */ +/* { dg-final { scan-assembler-not "\\\$f21" } } */ +/* { dg-final { scan-assembler-not "\\\$f23" } } */ +/* { dg-final { scan-assembler-not "\\\$f25" } } */ +/* { dg-final { scan-assembler-not "\\\$f27" } } */ +/* { dg-final { scan-assembler-not "\\\$f29" } } */ +/* { dg-final { scan-assembler-not "\\\$f31" } } */ diff --git a/gcc/testsuite/gcc.target/mips/call-saved-8.c b/gcc/testsuite/gcc.target/mips/call-saved-8.c new file mode 100644 index 00000000000..4e8f8d7aa5d --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/call-saved-8.c @@ -0,0 +1,25 @@ +/* Check that we save the correct call-saved GPRs and FPRs. */ +/* { dg-options "-mmicromips -mabi=32 -mfpxx" } */ + +void bar (void); + +void +foo (int x) +{ + __builtin_unwind_init (); + __builtin_eh_return (x, bar); +} +/* { dg-final { scan-assembler "\\\$16-\\\$23" } } */ +/* { dg-final { scan-assembler "\\\$(30|fp)" } } */ +/* { dg-final { scan-assembler "\\\$f20" } } */ +/* { dg-final { scan-assembler "\\\$f22" } } */ +/* { dg-final { scan-assembler "\\\$f24" } } */ +/* { dg-final { scan-assembler "\\\$f26" } } */ +/* { dg-final { scan-assembler "\\\$f28" } } */ +/* { dg-final { scan-assembler "\\\$f30" } } */ +/* { dg-final { scan-assembler-not "\\\$f21" } } */ +/* { dg-final { scan-assembler-not "\\\$f23" } } */ +/* { dg-final { scan-assembler-not "\\\$f25" } } */ +/* { dg-final { scan-assembler-not "\\\$f27" } } */ +/* { dg-final { scan-assembler-not "\\\$f29" } } */ +/* { dg-final { scan-assembler-not "\\\$f31" } } */ diff --git a/gcc/testsuite/gcc.target/mips/call-saved-9.c b/gcc/testsuite/gcc.target/mips/call-saved-9.c new file mode 100644 index 00000000000..91ebc0b17cd --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/call-saved-9.c @@ -0,0 +1,25 @@ +/* Check that we save the correct call-saved GPRs and FPRs. */ +/* { dg-options "-mmicromips -mabi=32 -mfp64" } */ + +void bar (void); + +void +foo (int x) +{ + __builtin_unwind_init (); + __builtin_eh_return (x, bar); +} +/* { dg-final { scan-assembler "\\\$16-\\\$23" } } */ +/* { dg-final { scan-assembler "\\\$(30|fp)" } } */ +/* { dg-final { scan-assembler "\\\$f20" } } */ +/* { dg-final { scan-assembler "\\\$f22" } } */ +/* { dg-final { scan-assembler "\\\$f24" } } */ +/* { dg-final { scan-assembler "\\\$f26" } } */ +/* { dg-final { scan-assembler "\\\$f28" } } */ +/* { dg-final { scan-assembler "\\\$f30" } } */ +/* { dg-final { scan-assembler-not "\\\$f21" } } */ +/* { dg-final { scan-assembler-not "\\\$f23" } } */ +/* { dg-final { scan-assembler-not "\\\$f25" } } */ +/* { dg-final { scan-assembler-not "\\\$f27" } } */ +/* { dg-final { scan-assembler-not "\\\$f29" } } */ +/* { dg-final { scan-assembler-not "\\\$f31" } } */ -- 2.30.2