This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro


Hi,

On Wed, 17 Jan 2007, Richard Sandiford wrote:

> The wider issue seems to be: should we either
> 
>   (a) allow indexed addresses for all modes and use constraints and
>       secondary reloads to handle the cases where they aren't allowed or
> 
>   (b) prevent the use of index registers for modes if the vast majority
>       of MEMs in those modes are likely to not be index registers.
> 
> (a) is what PA does and (b) is what m68k does.  I think (b) is the
> right choice for the reason outlined in the quote above: if we allow
> indexed MEMs before reload, it's up to reload to convert indexed MEMs
> into legitimate addresses.  To do that it needs some scratch register,
> which it will pick in an ad-hoc way.

Restricting the addressing modes for fp arguments is reasonable, but I 
think reload is the wrong place to solve this, by using special fp 
predicates you can prevent index register reaching reload in first place 
and make the job of reload easier.

bye, Roman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]