This is the mail archive of the gcc@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: Subject: Re: gcc-3.3 problem with reloading byte into address register onColdFire


> Wouldn't using a data-reg as a scratch as well as the secondary
> move from the scratch to the address register be really inifficient
> code, or does a following pass clean up reloads badoriginal register choice?

If you define one of the secondary reload meacros, the default definition of
MEMORY_MOVE_COST uses memory_move_secondary_cost to take into account the
extra cost of the secondary reloads, which should make the register allocator
and reload try to avoid using the address registers for bytes.

You can also use PREFERRED_RELOAD_CLASS to fine-tune reloading.

> Is there another architecture that has a reload pattern that does this
> now or do I have to go back to the original Alpha port to see this?

Yes, lots of them - just grep config/*/*.h for SECONDARY_RELOAD_CLASS,
SECONDARY_INPUT_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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