This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
A new patch for the x86 -fpic and -fomit-frame-pointer bug
- To: manfred at s-direktnet dot de, law at cygnus dot com
- Subject: A new patch for the x86 -fpic and -fomit-frame-pointer bug
- From: hjl at lucon dot org (H.J. Lu)
- Date: Mon, 13 Jul 1998 15:20:07 -0700 (PDT)
- Cc: egcs-patches at cygnus dot com
Here is a new patch for
http://www.cygnus.com/ml/egcs-bugs/1998-Jun/0306.html
My previous one
http://www.cygnus.com/ml/egcs-patches/1998-Jul/0262.html
is incorrect. This one seems to work. The problem is reg-stack.c will
generate insn to load 0 into a fp register.
# grep CONST0_RTX reg-stack.c
will show that.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Mon Jul 13 08:36:01 1998 H.J. Lu (hjl@gnu.org)
* config/i386/i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Return 0
for PIC if reload is not completed yet.
Index: config/i386/i386.h
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.1.1.21
diff -u -r1.1.1.21 i386.h
--- i386.h 1998/07/02 13:39:27 1.1.1.21
+++ i386.h 1998/07/13 21:05:40
@@ -889,7 +889,8 @@
load 0.0 into the function value register. */
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
- ((C) == 'G' ? standard_80387_constant_p (VALUE) : 0)
+ (((reload_completed || !flag_pic) && (C) == 'G') \
+ ? standard_80387_constant_p (VALUE) : 0)
/* Place additional restrictions on the register class to use when it
is necessary to be able to hold a value of mode MODE in a reload