diff mbox

MIPS: Update stack-1.c testcase to match micromips jraddiusp instruction.

Message ID 0DA23CC379F5F945ACB41CF394B98277210F005D@LEMAIL01.le.imgtec.org
State New
Headers show

Commit Message

Andrew Bennett July 7, 2015, 4:14 p.m. UTC
> > 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.

Comments

Moore, Catherine July 7, 2015, 5:49 p.m. UTC | #1
> -----Original Message-----
> From: Andrew Bennett [mailto:Andrew.Bennett@imgtec.com]
> Sent: Tuesday, July 07, 2015 12:14 PM
> To: Moore, Catherine; Matthew Fortune; gcc-patches@gcc.gnu.org
> Subject: RE: [PATCH] MIPS: Update stack-1.c testcase to match micromips
> jraddiusp instruction.
> 
> > > 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?
> 
> 
> 
> testsuite/
> 	* gcc.target/mips/stack-1.c: Do not build the testcase for micromips.
> 
> 
Yes, this is OK.
Andrew Bennett July 8, 2015, 8:37 a.m. UTC | #2
> Yes, this is OK.

Committed as SVN 225536.

Regards,


Andrew
diff mbox

Patch

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;