This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] PR target/15130 SH: A tail call optimization
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: joern dot rennecke at superh dot com
- Cc: gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Date: Sun, 02 May 2004 21:09:44 +0900 (JST)
- Subject: Re: [PATCH/RFC] PR target/15130 SH: A tail call optimization
- References: <20040430.222417.123989709.kkojima@rr.iij4u.or.jp><200404301459.i3UExC605451@linsvr1.uk.superh.com><20040501.102638.94573114.kkojima@rr.iij4u.or.jp>
> Joern Rennecke <joern.rennecke@superh.com> wrote:
>> The patch as such look OK, however, as a re-read the code that you are
>> patching, it appears to me that we have a latent bug here, which will
>> be made worse by your patch.
>> We are testing only for the general purpose registers used up by DImode
>> values (or smaller). This seems to always give you r2.
>> If the function returns a 128 bit value in general purpose registers,
>> e.g. CDImode, TImode, or DCmode (the latter for soft floating point),
>> then r2 is live.
>
> Sure. The appended patch is revised one. Does it looks ok?
Oops. With that patch
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00002.html
3.4.0 fails in bootstrapping:
stage2/xgcc -Bstage2/ -B/usr/gnu/sh4-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../LOCAL/gcc-3.4.0/gcc -I../../LOCAL/gcc-3.4.0/gcc/. -I../../LOCAL/gcc-3.4.0/gcc/../include ../../LOCAL/gcc-3.4.0/gcc/gensupport.c -o gensupport.o
../../LOCAL/gcc-3.4.0/gcc/gensupport.c: In function `shift_output_template':
../../LOCAL/gcc-3.4.0/gcc/gensupport.c:678: internal compiler error: Segmentation fault
Removing r0 and r1 from the candidate for the temporary register in
epilogue case fixes this failure. It seems that there is something
I'm missing.
Regards,
kaz