This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SH: use register names instead of numbers
On Nov 20, 2000, NIIBE Yutaka <gniibe@chroot.org> wrote:
> Thanks. No, this doesn't work well either. I attach another
> backtrace. With this patch, there's no CODE_LABEL emitted (all are
> the references), so jump_optimize will be confused.
I see. This is indeed a problem. I wonder why it broke. It used to
work before :-(
> I think that it's hetter not to (ab)use CODE_LABEL for the label after
> the BSRF.
Agreed.
> BTW, I've found the problem of my patch sent yesterday, it emits
> symPLT_label2reg after the split, but we need the information of
> using R12 before the split.
Yep. I suppose adding a `use (reg:SI 12)' to the insn patterns should
be enough.
There are a few other remarks I'd like to make about your patch, too.
First, I think it would be easier to have a function to gen the
unspec, probably enclosed in a const, instead of manipulating the
counter directly. Also, I don't see a need for symbol_ref_operand. I
think immediate_operand is enough, especially because you don't need
the symbol_ref at all. Just using the unspec is enough. Moreover,
then you won't have to modify the output patterns of calli_pcrel and
calli_value_pcrel, because the unspec will get output as the correct
symbol name (I suppose).
I like the idea of the insn_and_split, especially because it will
allow efficient PIC call sequences even in the presence of loop
unrolling. Which means your patch may remove the `!
flag_unroll_loops' from the condition that chooses to emit the PIC
call sequences, in call and call_value.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me