This is the mail archive of the
mailing list for the GCC project.
Re: Reloading failes
- From: Jim Wilson <wilson at tuliptree dot org>
- To: andersa at tiscali dot no
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 07 Jul 2003 19:18:57 -0700
- Subject: Re: Reloading failes
- References: <3EF9FB000000191A@cpfe5.be.tisc.dk>
(set (reg:SI 2 r3)
(mem/s:SI (plus:SI (mem:SI (plus:SI (reg/f:SI 6 r7)
This looks like a REG_OK_STRICT bug in your port.
Normally, pseudo registers can be treated just like a hard register.
However, during reload, any pseudo register remaining will be converted
to a stack slot, so they must be treated like a MEM instead of like a
REG. This is handled via REG_OK_STRICT. When REG_OK_STRICT is true, we
don't accept pseudo registers. When REG_OK_STRICT is false, we do
accept pseudo registers.
This is handled for you if you things like GO_IF_LEGITIMATE_ADDRESS are
macros in the tm.h file. However, if this calls a function in the
target .c file, then you need to manually pass the value of
REG_OK_STRICT to the function in the target .c file, and then check the
value in that function. There are many ports that do this already. I
suggest you look at one of them to see how this is done.