This is the mail archive of the 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

My previous one

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.


H.J. Lu (
Mon Jul 13 08:36:01 1998  H.J. Lu  (

	* 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
diff -u -r1.1.1.21 i386.h
--- i386.h	1998/07/02 13:39:27
+++ i386.h	1998/07/13 21:05:40
@@ -889,7 +889,8 @@
    load 0.0 into the function value register. */
-  ((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]