This is the mail archive of the gcc@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: unable to find a register to spill in class


Nemanja Popov wrote:
.../../gcc/libgcc2.c:535: error: unable to find a register to spill in class GR_REGS

Reload is one of the hardest parts to get right with an initial port. You will probably have to spend some time learning the basics of what reload does.


There are many different things that could be wrong here. It is hard to provide help without some additional info about the port.

The place to start is in the greg file. There should be a section near that top that says "Reloads for insn # 6". This will be followed by a description of the reloads that were generated for this insn. Also, of interest here is the movsi_general pattern, particularly its constraints. And the GR_REGS class, how many registers are in it, how many are allocatable, etc.

You may need to set breakpoints in reload to debug this. Put a break point in find_reloads() conditional on the insn uid if the problem appears to be there. Also, check find_regs and figure out why it failed.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



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