This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: unable to find a register to spill in class
- From: Jim Wilson <wilson at specifix dot com>
- To: Nemanja Popov <nemanja dot popov at micronasnit dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 28 Nov 2005 19:53:19 -0800
- Subject: Re: unable to find a register to spill in class
- References: <03e601c5ef5d$20b99f40$c900a8c0@micronasnit.com>
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