Reload Problem
Jim Wilson
wilson@specifixinc.com
Mon May 17 03:06:00 GMT 2004
Konark wrote:
I am having a problem in legitimizing a reload
address.
I assume this means you have defined the LEGITIMIZE_RELOAD_ADDRESS
macro, and are having problems with it. This is one of the most
complicated macros in gcc to define. Getting it right requires an
understanding of how reload works. It may not be worth the trouble.
You haven't provided much useful here info. You haven't shown us the
LEIGITMIZE_RELOAD_ADDRESS macro you wrote. We don't have a copy of your
port. We don't have a list of the reloads being generated. Even if you
did give us all of this info, we may not be able to help you. Solving
reload problems is complicated, and is often more difficult than a
volunteer can do in their free time.
I can over some suggestions. Learn a bit about how reload works. Use
the -da option to generate dumps, and in particular learn how to read
the .greg dump file. This will list instructions that need reloads, and
the reloads that were generated to solve them. In your case, the end of
the file should have a list of reloads that are unsolvable. You then
need to figure out how to generate a different reloads that is solvable.
Be sure to look at other ports that define LEGITIMIZE_RELOAD_ADDRESS.
There probably aren't very many that do, but SH is one, and it handles a
similar case.
You mentioned that you only have available two registers of the right
class. It may be that the instruction needs more than two of these
registers, in which case this is a lost cause. You may not be able to
get this to work in such a limited register class.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list