This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bug with -O2 without -maccumulate-outgoing-args
- To: Andreas Jaeger <aj at suse dot de>, rth at cygnus dot com, gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org
- Subject: Re: Bug with -O2 without -maccumulate-outgoing-args
- From: Jan Hubicka <jh at suse dot cz>
- Date: Thu, 8 Mar 2001 18:12:27 +0100
- Cc: Jan Hubicka <jh at suse dot cz>
- References: <hopuft1w4c.fsf@gee.suse.de>
>
> Hi Honza,
>
> if I don't use -maccumulate-outgoing-args for glibc compilation, I get:
>
> x86_64-unknown-linux-gcc qefgcvt_r.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -I../include -I. -I/x86-64/build-glibc-x86-64/misc -I.. -I../libio -I/x86-64/build-glibc-x86-64 -I../sysdeps/x86_64/elf -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -include ../include/libc-symbols.h -o /x86-64/build-glibc-x86-64/misc/qefgcvt_r.o
> /tmp/ccxZJ5z3.s: Assembler messages:
> /tmp/ccxZJ5z3.s:382: Error: no such instruction: `fstt (%rsp)'
> /tmp/ccxZJ5z3.s:516: Error: no such instruction: `fstt (%rsp)'
> make[2]: *** [/x86-64/build-glibc-x86-64/misc/qefgcvt_r.o] Error 1
> make[2]: Leaving directory `/x86-64/cvs/glibc/misc'
>
Fixed by following patch - while adding TFmode support I've forgotted one
spot in reg-stack.c
I've already applied it for x86-64 tree.
OK for head/branch?
Thu Mar 8 18:08:41 CET 2001 Jan Hubicka <jh@suse.cz>
* reg-stack.c (move_for_stack_reg): Avoid non-popint fst for
TFmode too.
Index: reg-stack.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/reg-stack.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 reg-stack.c
*** reg-stack.c 2001/03/06 18:30:45 1.3
--- reg-stack.c 2001/03/08 17:08:12
*************** move_for_stack_reg (insn, regstack, pat)
*** 1119,1125 ****
regstack->top--;
CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (src));
}
! else if (GET_MODE (src) == XFmode && regstack->top < REG_STACK_SIZE - 1)
{
/* A 387 cannot write an XFmode value to a MEM without
clobbering the source reg. The output code can handle
--- 1119,1126 ----
regstack->top--;
CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (src));
}
! else if ((GET_MODE (src) == XFmode || GET_MODE (src) == TFmode)
! && regstack->top < REG_STACK_SIZE - 1)
{
/* A 387 cannot write an XFmode value to a MEM without
clobbering the source reg. The output code can handle