This is the mail archive of the
mailing list for the GCC project.
Re: reload displacement optimization
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: reload displacement optimization
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Tue, 10 Mar 1998 12:59:43 +0000
- Cc: egcs at cygnus dot com
- Cc: rearnsha at arm dot com
- Organization: Advanced RISC Machines Ltd.
- Reply-To: richard dot earnshaw at arm dot com
> While looking into some problems in reload this evening (which I could
> not reproduce, annoyingly), I noticed that reload would produce, when
> a displacement off of a base register is out of range,
> lda $6,-31856
> ldah $6,1($6)
> addq $6,$30,$6
> ldq $12,0($6)
> ldah $6,1($30)
> ldq $12,-31856($6)
> is sufficient.
> The solution, I believe, is to teach find_reloads_address about
> this new way to break up an address. The following patch does this,
> but in a blatently machine dependent way.
> Can anyone think of a way to properly conditionalize this, and
> to break up the address?
Can't we have a RELOAD_LEGITIMIZE_ADDRESS() in the same way that we have LEGITIMIZE_ADDRESS(). This could then be a tuning option which will be used if it produces valid insns, but thrown out otherwise.