aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-04-03 09:54:27 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-04-03 07:54:27 +0000
commita94f136b5283f78f524c77f0bc18576e0988e7cc (patch)
tree740482385e264c4400a2f42409f8e91dacd140cb /gcc
parent0de298af4604cc1ad77f4cc9cf03d4486f6f95ad (diff)
downloadgcc-a94f136b5283f78f524c77f0bc18576e0988e7cc.zip
gcc-a94f136b5283f78f524c77f0bc18576e0988e7cc.tar.gz
gcc-a94f136b5283f78f524c77f0bc18576e0988e7cc.tar.bz2
i386.c (constant_address_p): Use legitimate_constant_p.
* i386.c (constant_address_p): Use legitimate_constant_p. (legitimate_address_p): Do not use CONSTANT_ADDRESS_P. From-SVN: r65196
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c33
2 files changed, 13 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d50188..ac2b403 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 3 09:53:40 CEST 2003 Jan Hubicka <jh@suse.cz>
+
+ * i386.c (constant_address_p): Use legitimate_constant_p.
+ (legitimate_address_p): Do not use CONSTANT_ADDRESS_P.
+
2003-04-02 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300-protos.h: Add a prototype for
@@ -26,7 +31,7 @@ Thu Apr 3 00:31:21 CEST 2003 Jan Hubicka <jh@suse.cz>
* doc/install.texi (Specific): Update pointers to apple.com.
-Thu Apr 3 00:18:49 CEST 2003 Jan HUbicka <jh@suse.cz>
+Thu Apr 3 00:18:49 CEST 2003 Jan Hubicka <jh@suse.cz>
* i386.c (override_options): Disable red zone by default on i386.
(compute_frame_layout, ix86_force_to_memory, ix86_free_from_memory):
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a96c6ec..1637616 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5710,26 +5710,7 @@ bool
constant_address_p (x)
rtx x;
{
- switch (GET_CODE (x))
- {
- case LABEL_REF:
- case CONST_INT:
- return true;
-
- case CONST_DOUBLE:
- return TARGET_64BIT;
-
- case CONST:
- /* For Mach-O, really believe the CONST. */
- if (TARGET_MACHO)
- return true;
- /* Otherwise fall through. */
- case SYMBOL_REF:
- return !flag_pic && legitimate_constant_p (x);
-
- default:
- return false;
- }
+ return CONSTANT_P (x) && legitimate_address_p (Pmode, x, 1);
}
/* Nonzero if the constant value X is a legitimate general operand
@@ -6080,7 +6061,12 @@ legitimate_address_p (mode, addr, strict)
that never results in lea, this seems to be easier and
correct fix for crash to disable this test. */
}
- else if (!CONSTANT_ADDRESS_P (disp))
+ else if (GET_CODE (disp) != LABEL_REF
+ && GET_CODE (disp) != CONST_INT
+ && (GET_CODE (disp) != CONST
+ || !legitimate_constant_p (disp))
+ && (GET_CODE (disp) != SYMBOL_REF
+ || !legitimate_constant_p (disp)))
{
reason = "displacement is not constant";
goto report_error;
@@ -6090,11 +6076,6 @@ legitimate_address_p (mode, addr, strict)
reason = "displacement is out of range";
goto report_error;
}
- else if (!TARGET_64BIT && GET_CODE (disp) == CONST_DOUBLE)
- {
- reason = "displacement is a const_double";
- goto report_error;
- }
}
/* Everything looks valid. */