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: The secondary reload


Ian Lance Taylor <iant@google.com> writes:

> [snip]
> after register allocation.  After the second split, no output template
> should still be "#".
>

What do you mean by your last sentence? It somehow makes me think that
the splits work at some preprocessing level replacing/rewriting the output
template of instructions. Is that what happens?


> There are cases where a processor needs a secondary reload.  You need it
> when you can not move between registers of two classes in a single
> instruction, 
>

I assume you by 'instruction' here mean a define_insn and not a single
RTL or assembler instruction. 

So, assume I have two classes M_REGS and Y_REGS and I cannot move 
between them except if I go through an intermediary in C_REGS. 
Do I need a secondary reload? 

I wouldn't expect so cause I could write a rule that has a scratch from
C_REGS. Then I move the value from SOURCE to C_REGS and from C_REGS to
DEST. Have I misunderstood what you said? 

> and you need it when you can't load and store registers of
> any class directly to/from memory.

That's interesting but if you can't store/load registers of any class to
and from memory how do you do it with a secondary reload anyway?

Cheers,
-- 
PMatos


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