This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: cross gcc port problem


>     But when I've defined SECONDARY_RELOAD_CLASS as NO_REGS and add "m"
> alternatives to the movqi templates, port will compile everything just fine,
> but produces instructions which is not available on this processor. 
>
> It's possible to define sequence of instructions which will save
> accumulator temporary, then performs move, and restores accumulator, 

Try discouraging the compiler from using them by adding `?' or `!' to the
alternative, then find out how often the compiler uses the alternative in a
real program.  You may be pleasantly surprised how seldom the compiler uses
such alternatives.

On the other hand, the compiler may abort more often.

> but we've 2 disadvantages here - the first one is the unknown size of
> operand in the accumulator (may be int, long, float) 

You might be able to walk backward through the insn's to find last "set rr"
insn.  This would tell you the size of the contents.

> & the later is the emision of the temporary saves/restores when the
> accumulator value does not realy matter.

Try looking at insn notes, especially REG_DEAD and REG_UNUSED.  I've never
tried that, but it sounds promising.
 
>     So the only problem now is the secondary reloads... :-((

The reload pass is _always_ the problem ;-)

Regards,

David Querbach
Real-Time Systems Inc. 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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