Problem on i386 with -fpic -fomit-frame-pointer
Jeffrey A Law
law@cygnus.com
Thu Oct 8 11:45:00 GMT 1998
In message <Pine.GSO.4.02A.9808281343230.8679-100000@matlock.informatik.rwth-
aachen.de>you write:
> With the reload patch I sent in on Monday, gcc miscompiled the file e_hypot
> l.c
> from glibc-2.0.95. The problem appears to be in i386.md, in the mov[sdx]f
> patterns. I believe the following change is incomplete:
>
> Sun Jul 26 01:11:12 1998 H.J. Lu (hjl@gnu.org)
>
> * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Return 0 when eliminating
> the frame pointer and compiling PIC code and reload has not complet
> ed.
>
> If using -fomit-frame-pointer together with -fPIC, this will not accept any
> floating point constants, and reload will substitute memory references for
> them. However, the expander patterns have not been updated together with
> this patch, they still assume that certain constants are valid. The result
> was that in the file that was miscompiled, a load instruction using the PIC
> register was emitted, but during reload the variable
> current_function_uses_pic_offset_table remains set to zero. This causes
> incorrect register elimination offsets, which in turn causes some of the
> generated store instructions to write data outside the stack frame and
> clobber one of the callee-saved registers.
>
> Bernd
>
>
> * i386.md (movsf, movdf, movxf): Accept no constants if -fPIC and
> -fomit-frame-pointer.
Did this problem get fixed? I know rth did some work on the movsf, movdf and
movxf patterns for the x86, but I don't know if they were supposed to solve
this problem or not.
jeff
More information about the Gcc
mailing list