> > I'm not sure this is the right approach here. If we get a jraddiusp then the
> > problem that the test is trying to cover can't possibly happen anyway.
> > (The test is checking if a load and final stack adjustment are ever re-
> ordered
> > from what I can see.)
> >
> > I'd just mark the test as NOCOMPRESSION instead of just NOMIPS16 and
> > update the comment to say that it is avoiding SAVE, RESTORE and
> > JRADDIUSP.
> >
> 
> Another approach would be to add the micromips testcase variant and skip the
> test if code-quality (ie. -O0).
> Catherine

I agree with Matthew here.  The testcase already comments that it is preventing
the use of the MIPS16 save and restore instructions, so it makes sense to 
prevent
jraddiusp as well.

The updated patch and ChangeLog is below.

Ok to commit?


Many thanks,

        

Andrew


testsuite/
        * gcc.target/mips/stack-1.c: Do not build the testcase for micromips.


diff --git a/gcc/testsuite/gcc.target/mips/stack-1.c 
b/gcc/testsuite/gcc.target/mips/stack-1.c
index a28e4bf..5f25c21 100644
--- a/gcc/testsuite/gcc.target/mips/stack-1.c
+++ b/gcc/testsuite/gcc.target/mips/stack-1.c
@@ -2,8 +2,8 @@
 /* { dg-final { scan-assembler "\tlw\t" } } */
 /* { dg-final { scan-assembler-not 
"\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */
 
-/* Avoid use of SAVE and RESTORE.  */
-NOMIPS16 int foo (int y)
+/* Avoid use of SAVE, RESTORE and JRADDIUSP.  */
+NOCOMPRESSION int foo (int y)
 {
   volatile int a = y;
   volatile int *volatile b = &a;

Reply via email to