Hi, The call-saved-{4-6}.c tests in the mips testsuite fail for micromips. The reason is that micromips uses the swm and lwm instructions to save/restore the call-saved registers rather than using the sw and lw instructions. The swm and lwm instructions only list the range of registers to use ie. $16-$25 and hence some of the scan-assembler patterns fail. This fix adds the NO_COMPRESSION attribute to the foo function to force the tests to always compile as mips. I have tested this for both mips and micromips, and the tests now pass successfully. The ChangeLog and patch are below.
Ok to commit? Many thanks, Andrew testsuite/ * gcc.target/mips/call-saved-4.c: Add NO_COMPRESSION attribute. * gcc.target/mips/call-saved-5.c: Likewise. * gcc.target/mips/call-saved-6.c: Likewise. diff --git a/gcc/testsuite/gcc.target/mips/call-saved-4.c b/gcc/testsuite/gcc.target/mips/call-saved-4.c index 846ea32..92881c4 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 2937b31..152b28f 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 0d1a4c8..a384d4a 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 ();