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]

A new patch for the x86 -fpic and -fomit-frame-pointer bug


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


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