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]

Re: AM30/AM33 SP handling



  In message <oraein9nmk.fsf@zecarneiro.lsd.ic.unicamp.br>you write:
  > On Apr 21, 2000, Jeffrey A Law <law@cygnus.com> wrote:
  > 
  > >   In message <orpurj9run.fsf@zecarneiro.lsd.ic.unicamp.br>you write:
  > >> * config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return
  > >> EXTENDED_REGS only if TARGET_AM33.
  > >> 
  > >> * config/mn10300/mn10300.md (movsi): Move SP handling to
  > >> separate patterns.
  > 
  > > I fail to see the benefit of the movsi change.
  > 
  > Unfortunately, it's necessary to avoid a reload failure.  When GCC
  > gets to `xy' but no `x' registers are available, it tries to spill
  > `sp' and fails:
  > 
  >   [(set (match_operand:SI 0 "general_operand"
  > 				"=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,y"
  > )
  > 	(match_operand:SI 1 "general_operand"
  > 				"0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,xy,axR
  > "))]
  >                                                                          ^^
  > 
  > It might work to simply remove the `x' from this entry (it's clearly
  > redundant), but breaking the SP handling allows us to use data
  > registers to copy from/to SP on AM33.
I would like to see a more detailed analysis of this problem -- testcases,
rtl dumps and analysis.


  > > It may also be dangerous -- at one time the movXX patterns were
  > > special in that they needed to support all the possible movXX
  > > alternatives in a single pattern.  I do not know if the movXX
  > > patterns are still special in that respect.
  > 
  > They don't seem to be.  I've had no regressions in the testsuite with
  > this patch.
That's not generally enough to make that kind of assertion.  While the
testsuite is reasonably good at finding bugs, you can't assume that because
the testsuite shows no regressions that everything is OK. 

jeff



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