summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog20
-rw-r--r--gcc/config/avr/avr.h2
-rw-r--r--gcc/config/bfin/bfin.h3
-rw-r--r--gcc/config/cris/cris.h2
-rw-r--r--gcc/config/fr30/fr30.h10
-rw-r--r--gcc/config/frv/frv.h10
-rw-r--r--gcc/config/m32c/m32c.h1
-rw-r--r--gcc/config/m68hc11/m68hc11.h3
-rw-r--r--gcc/config/mep/mep.h2
-rw-r--r--gcc/config/mn10300/mn10300.h4
-rw-r--r--gcc/config/moxie/moxie.h4
-rw-r--r--gcc/config/pdp11/pdp11.h4
-rw-r--r--gcc/config/picochip/picochip.h2
-rw-r--r--gcc/config/score/score.h3
-rw-r--r--gcc/config/stormy16/stormy16.h2
-rw-r--r--gcc/defaults.h6
16 files changed, 26 insertions, 52 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c705fa3e008..8afa6d11b11 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,23 @@
+2009-11-04 Nick Clifton <nickc@redhat.com>
+
+ * defaults.h (CONSTANT_ADDRESS_P): Provide a default definition.
+ Make sure that it does not allow CONST_DOUBLEs.
+ * doc/tm.texi (CONSTANT_ADDRESS_P): Update description.
+ * config/avr/avr.h (CONSTANT_ADDRESS_P): Delete.
+ * config/bfin/bfin.h (CONSTANT_ADDRESS_P): Delete.
+ * config/cris/cris.h (CONSTANT_ADDRESS_P): Delete.
+ * config/fr30/fr30.h (CONSTANT_ADDRESS_P): Delete.
+ * config/frv/frv.h (CONSTANT_ADDRESS_P): Delete.
+ * config/m32c/m32c.h (CONSTANT_ADDRESS_P): Delete.
+ * config/m68hc11/m68hc11.h (CONSTANT_ADDRESS_P): Delete.
+ * config/mep/mep.h (CONSTANT_ADDRESS_P): Delete.
+ * config/mn10300/mn10300.h (CONSTANT_ADDRESS_P): Delete.
+ * config/moxie/moxie.h (CONSTANT_ADDRESS_P): Delete.
+ * config/pdp11/pdp11.h (CONSTANT_ADDRESS_P): Delete.
+ * config/picochip/picochip.h (CONSTANT_ADDRESS_P): Delete.
+ * config/score/score.h (CONSTANT_ADDRESS_P): Delete.
+ * config/stormy16/stormy16.h (CONSTANT_ADDRESS_P): Delete.
+
2009-11-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/41919
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 0927e3928c1..782ad11627b 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -406,8 +406,6 @@ extern int avr_reg_order[];
#define HAVE_POST_INCREMENT 1
#define HAVE_PRE_DECREMENT 1
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
#define MAX_REGS_PER_ADDRESS 1
#define REG_OK_FOR_BASE_NOSTRICT_P(X) \
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 03a279036f3..365680ee9fa 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -911,9 +911,6 @@ typedef struct {
/* Addressing Modes */
-/* Recognize any constant value that is a valid address. */
-#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
-
/* Nonzero if the constant value X is a legitimate general operand.
symbol_ref are not legitimate and will be put into constant pool.
See force_const_mem().
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 0fea7d77b39..3c426b74ae5 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -950,8 +950,6 @@ struct cum_args {int regs;};
#define HAVE_POST_INCREMENT 1
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
/* Must be a compile-time constant, so we go with the highest value
among all CRIS variants. */
#define MAX_REGS_PER_ADDRESS 2
diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h
index 20e157173d8..5e6237895b5 100644
--- a/gcc/config/fr30/fr30.h
+++ b/gcc/config/fr30/fr30.h
@@ -741,16 +741,6 @@ enum reg_class
/*}}}*/
/*{{{ Addressing Modes. */
-/* A C expression that is 1 if the RTX X is a constant which is a valid
- address. On most machines, this can be defined as `CONSTANT_P (X)', but a
- few machines are more restrictive in which constant addresses are supported.
-
- `CONSTANT_P' accepts integer-values expressions whose values are not
- explicitly known, such as `symbol_ref', `label_ref', and `high' expressions
- and `const' arithmetic expressions, in addition to `const_int' and
- `const_double' expressions. */
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
/* A number, the maximum number of registers that can appear in a valid memory
address. Note that it is up to you to specify a value equal to the maximum
number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index d48aa1ef17d..d5a7a4a6670 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -1927,16 +1927,6 @@ __asm__("\n" \
/* Addressing Modes. */
-/* A C expression that is 1 if the RTX X is a constant which is a valid
- address. On most machines, this can be defined as `CONSTANT_P (X)', but a
- few machines are more restrictive in which constant addresses are supported.
-
- `CONSTANT_P' accepts integer-values expressions whose values are not
- explicitly known, such as `symbol_ref', `label_ref', and `high' expressions
- and `const' arithmetic expressions, in addition to `const_int' and
- `const_double' expressions. */
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
/* A number, the maximum number of registers that can appear in a valid memory
address. Note that it is up to you to specify a value equal to the maximum
number that `TARGET_LEGITIMATE_ADDRESS_P' would ever accept. */
diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h
index c0914d3be02..78e3115c291 100644
--- a/gcc/config/m32c/m32c.h
+++ b/gcc/config/m32c/m32c.h
@@ -560,7 +560,6 @@ typedef struct m32c_cumulative_args
#define HAVE_PRE_DECREMENT 1
#define HAVE_POST_INCREMENT 1
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
#define MAX_REGS_PER_ADDRESS 1
/* This is passed to the macros below, so that they can be implemented
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index ee0f9f67fca..278ba15c4fa 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -1108,9 +1108,6 @@ extern unsigned char m68hc11_reg_valid_for_index[FIRST_PSEUDO_REGISTER];
&& (GET_CODE (XEXP (operand, 0)) == POST_INC) \
&& (SP_REG_P (XEXP (XEXP (operand, 0), 0))))
-/* 1 if X is an rtx for a constant that is a valid address. */
-#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
-
/* Maximum number of registers that can appear in a valid memory address */
#define MAX_REGS_PER_ADDRESS 2
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index 8b00a444ce2..9d286e33b94 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -567,8 +567,6 @@ typedef struct
#define TRAMPOLINE_SIZE 20
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
#define MAX_REGS_PER_ADDRESS 1
#ifdef REG_OK_STRICT
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index bdbc948ac12..c732aa07180 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -600,10 +600,6 @@ struct cum_arg {int nbytes; };
? gen_rtx_MEM (Pmode, arg_pointer_rtx) \
: (rtx) 0)
-/* 1 if X is an rtx for a constant that is a valid address. */
-
-#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
-
/* Maximum number of registers that can appear in a valid memory address. */
#define MAX_REGS_PER_ADDRESS 2
diff --git a/gcc/config/moxie/moxie.h b/gcc/config/moxie/moxie.h
index f1b77eaf0c2..384bce4a986 100644
--- a/gcc/config/moxie/moxie.h
+++ b/gcc/config/moxie/moxie.h
@@ -475,10 +475,6 @@ enum reg_class
an immediate operand on the target machine. */
#define LEGITIMATE_CONSTANT_P(X) 1
-/* A C expression that is 1 if the RTX X is a constant which is a
- valid address. */
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
-
/* A number, the maximum number of registers that can appear in a
valid memory address. */
#define MAX_REGS_PER_ADDRESS 1
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 8997612ba5a..fe8c9e8aed3 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -594,10 +594,6 @@ extern int may_call_alloca;
#define MAX_REGS_PER_ADDRESS 1
-/* Recognize any constant value that is a valid address. */
-
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
diff --git a/gcc/config/picochip/picochip.h b/gcc/config/picochip/picochip.h
index 44559f22333..4d0c96278e0 100644
--- a/gcc/config/picochip/picochip.h
+++ b/gcc/config/picochip/picochip.h
@@ -471,8 +471,6 @@ extern const enum reg_class picochip_regno_reg_class[FIRST_PSEUDO_REGISTER];
/* Addressing Modes */
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
-
#define MAX_REGS_PER_ADDRESS 1
/* Legitimize reload address tries machine dependent means of
diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
index 0b7af7b2739..cde9c222546 100644
--- a/gcc/config/score/score.h
+++ b/gcc/config/score/score.h
@@ -688,9 +688,6 @@ typedef struct score_args
#define HAVE_PRE_MODIFY_REG 0
#define HAVE_POST_MODIFY_REG 0
-/* Recognize any constant value that is a valid address. */
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
/* Maximum number of registers that can appear in a valid memory address. */
#define MAX_REGS_PER_ADDRESS 1
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index 682f7e6f466..fa97e8becdc 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -522,8 +522,6 @@ enum reg_class
#define HAVE_PRE_DECREMENT 1
-#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-
#define MAX_REGS_PER_ADDRESS 1
#ifdef REG_OK_STRICT
diff --git a/gcc/defaults.h b/gcc/defaults.h
index f1d96833070..182de95685c 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1154,4 +1154,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define GO_IF_MODE_DEPENDENT_ADDRESS(X, WIN)
#endif
+/* For most ports anything that evaluates to a constant symbolic
+ or integer value is acceptable as a constant address. */
+#ifndef CONSTANT_ADDRESS_P
+#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
+#endif
+
#endif /* ! GCC_DEFAULTS_H */