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]

RE: [patch] h8300.c: Improve shifts.


Hi,

> new_reg = gen_reg_rtx (QImode)
> emit_move_insn (new_reg, count reg)
> 
> Then use new reg for the loop counter.
> 
> In the pattern we change the scratch register to be a 
> clobbered match_dup
> of the count register.

Hmmm.  For a shift by a constant, would that work?  I am afraid gcc gets mad
when it sees clobbering a constant.  Can we separate the pattern into two,
one for a constant and another for a non-constant?  Is it OK to have one
pattern for (parallel (set ...) (clobber)) and another just for (set ...)?
Again, I am afraid this may fail because the patterns are not separated by
variants of targets (H8/300, H8/300H, and H8/S) but by kind of operands.

If I could do something between combine and lreg, that would be great
because I can generate a loop counter only when needed after all constants
are folded, but I don't know how.

Thanks,

Kazu Hirata

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