This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] MIPS: Update stack-1.c testcase to match micromips jraddiusp instruction.



> -----Original Message-----
> From: Matthew Fortune [mailto:Matthew.Fortune@imgtec.com]
> Sent: Monday, July 06, 2015 11:00 AM
> To: Andrew Bennett; gcc-patches@gcc.gnu.org
> Cc: Moore, Catherine
> Subject: RE: [PATCH] MIPS: Update stack-1.c testcase to match micromips
> jraddiusp instruction.
> 
> Andrew Bennett <Andrew.Bennett@imgtec.com> writes:
> > The stack-1.c testcase fails when being compiled for micromips with
> > the
> > -O0 optimization level.  The reason is the testcase is expecting the
> > following sequence at the end of the function:
> >
> >        addiu   $sp,$sp,16
> >        jrc     $31
> >
> > But for micromips it generates the following:
> >
> >        jraddiusp       16
> >
> >
> > As the failure only happens at one optimization level I have decided
> > to just change the expected output rather than creating a separate
> > micromips testcase.
> 
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]