aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.org>1998-07-26 00:34:10 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-25 18:34:10 -0600
commit61dd26e6ba68d5698c7637f369c53d56de4c7fff (patch)
tree723019ae3e377580a9ff7063d66f96b69e092002 /gcc
parent3abe23a0ebc7fa6dd5f9a12d35a024d4fbfb5da1 (diff)
downloadgcc-61dd26e6ba68d5698c7637f369c53d56de4c7fff.zip
gcc-61dd26e6ba68d5698c7637f369c53d56de4c7fff.tar.gz
gcc-61dd26e6ba68d5698c7637f369c53d56de4c7fff.tar.bz2
i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Return 0 when eliminating the frame pointer and compiling PIC code and reload...
* i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Return 0 when eliminating the frame pointer and compiling PIC code and reload has not completed. From-SVN: r21392
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/i386/i386.h13
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fd39809..572d235 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
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 completed.
+
* i386.c (output_to_reg): Add code to emulate non-popping DImode
case.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 51c0783..75e8bae 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -896,10 +896,19 @@ enum reg_class
/* Similar, but for floating constants, and defining letters G and H.
Here VALUE is the CONST_DOUBLE rtx itself. We allow constants even if
TARGET_387 isn't set, because the stack register converter may need to
- load 0.0 into the function value register. */
+ load 0.0 into the function value register.
+
+ We disallow these constants when -fomit-frame-pointer and compiling
+ PIC code since reload might need to force the constant to memory.
+ Forcing the constant to memory changes the elimination offsets after
+ the point where they must stay constant.
+
+ However, we must allow them after reload as completed as reg-stack.c
+ will create insns which use these constants. */
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
- ((C) == 'G' ? standard_80387_constant_p (VALUE) : 0)
+ (((reload_completed || !flag_pic || !flag_omit_frame_pointer) && (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