This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [patch] h8300.c: Improve shifts.
- To: "'law at cygnus dot com'" <law at cygnus dot com>, Richard Henderson <rth at cygnus dot com>, gcc-patches at gcc dot gnu dot org
- Subject: RE: [patch] h8300.c: Improve shifts.
- From: Kazu Hirata <kazu at hxi dot com>
- Date: Fri, 11 Aug 2000 18:39:43 -0400
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