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]
Other format: [Raw text]

Re: [PATCH/RFC] PR target/15130 SH: A tail call optimization


> 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


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