aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-11-19 19:27:26 +0000
committerJeff Law <law@gcc.gnu.org>1998-11-19 12:27:26 -0700
commite3f159c2de9fc4621fb059dafc55a9aa60efa1df (patch)
treecd2a2e9f3ae4c53ac299a4315628edb5554de69b /gcc
parent39e4e1ef9ad71f5162b533c27888f63893a168f4 (diff)
downloadgcc-e3f159c2de9fc4621fb059dafc55a9aa60efa1df.zip
gcc-e3f159c2de9fc4621fb059dafc55a9aa60efa1df.tar.gz
gcc-e3f159c2de9fc4621fb059dafc55a9aa60efa1df.tar.bz2
i386.h (LEGITIMATE_CONSTANT_P): Reject CONST_DOUBLEs that are not standard 387 constants.
* i386.h (LEGITIMATE_CONSTANT_P): Reject CONST_DOUBLEs that are not standard 387 constants. From-SVN: r23721
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/i386/i386.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ed9dcc7..a6b9b84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -5,6 +5,9 @@ Thu Nov 19 19:05:49 1998 Per Bothner <bothner@cygnus.com>
Thu Nov 19 19:34:13 1998 Jeffrey A Law (law@cygnus.com)
+ * i386.h (LEGITIMATE_CONSTANT_P): Reject CONST_DOUBLEs that are not
+ standard 387 constants.
+
* i386.md (jump): Explicitly set "memory" attribute.
(indirect_jump, prologue_set_stack_ptr): Likewise.
(prologue_get_pc_and_set_got, pop): Likewise.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index cf890c8..d599c9a 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1696,7 +1696,8 @@ do { \
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
-#define LEGITIMATE_CONSTANT_P(X) 1
+#define LEGITIMATE_CONSTANT_P(X) \
+ (GET_CODE (X) == CONST_DOUBLE ? standard_80387_constant_p (X) : 1)
#ifdef REG_OK_STRICT
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \