This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Defining LEGITIMIZE_ADDRESS?
- From: Anders Ådland <aaadland at atmel dot no>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 23 Aug 2003 15:27:41 +0200
- Subject: Defining LEGITIMIZE_ADDRESS?
I'm still porting GCC to a new CPU and have a question.
When storing to (mem (pseudo reg)), the pseudo register is replaced by a
stack slot, (mem (plus (reg fp) (const_int -32776))). Normally this is
correct, but in this particular example the index is too large for the load
instruction and therefore not accepted by GO_IF_LEGITIMATE_ADDRESS. This
results in a "unable to generate reloads" error message.
It would be possible to move the index into a register to make (mem (plus
(reg fp) (reg))) in LEGITIMIZE_ADDRESS, but is this the right place to do
it, or am I doing something wrong somewhere else? The documentation is
telling that "It is safe for this macro (LEGITIMIZE_ADDRESS) to do
nothing". In my case it's not.
Anders