This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: where are caller-save addresses legitimized?
- From: Greg McGary <greg dot mcgary at ericsson dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 5 May 2010 20:34:46 -0700
- Subject: Re: where are caller-save addresses legitimized?
- References: <4BE20304.6020906@ericsson.com> <4BE235A2.6050900@redhat.com>
On 05/05/10 20:21, Jeff Law wrote:
On 05/05/10 17:45, Greg McGary wrote:
reload()> setup_save_areas()> assign_stack_local_1() creates a mem
address whose offset too large to fit into the machine insn's offset
operand. Later, reload()> save_call_clobbered_regs()> insert_save()
adjust_address_1()> change_address_1() asserts because the address
is not legitimate.
My port defines all the address legitimizing target hooks, but none
are called with the address in question. Where/how is the address
supposed to be fixed-up in this case? Or, where/how does gcc avoid
producing an illegitimate address in the first place?
I'm not sure they are ever legitimized -- IIRC caller-save tries to only
generate addressing modes which are safe for precisely this reason.
Apparently not so: caller save is quite capable of producing invalid
offsets.
Perhaps my port needs some hook to help GCC produce good addresses?
I've been looking, but haven't found it yet...
G