This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reload problems....
- To: thomas joseph <thomascanny at yahoo dot co dot nz>
- Subject: Re: reload problems....
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- Date: Fri, 20 Jul 2001 10:47:59 -0400
- Cc: gcc at gcc dot gnu dot org
- References: <20010720143033.97700.qmail@web14707.mail.yahoo.com>
At 2:30 AM +1200 7/21/01, thomas joseph wrote:
>Hi All,
> I am working for a new gcc port. I am towards
>finishing the port. I am compiling newlib.
>It has few reload problems. I am just showing you the
>kind of problems that I am facing.....
>
> On my machine I have two index registers.Out of
>them
>one is frame pointer. and I can use the other for
>reloading and similar purposes.
I've done a couple of ports with these kinds of limitations. It is really pushing the
limits of gcc and reload.
First, there are some obvious things you should check, like to make sure that
1/ SMALL_REGISTER_CLASSES is defined
2/ CLASS_LIKELY_SPILLED_P is defined for the class containing your index register.
But, I bet that you've already done that, or you'd have a LOT more failures.
The next thing is to look at defining the LEGITIMIZE_RELOAD_ADDRESS macro and using it
to force the kind of reloads you need.
To actually look at what reload is "thinking", you call run the compiler under gdb and after it
aborts, you call do
call debug_reload()
and it will print out a nicely formatted dump of the current reloads for the instruction.
You may find it necessary to alter your .MD file to prevent creating instructions with
too many reloads.
For example, on one of my ports, we had to change the .md file, so that there were NEVER two
memory operands in any INSN, despite the fact that we we had a two-address machine.
I wonder though if the "fixed or forbidden register" message indicates that you've marked the IX
register as "fixed". In that case, I believe that the compiler won't allocate it and THAT's why
you're crashing.......
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation