summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-07 20:23:32 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-07 20:23:32 +0000
commit16fd8669229faf735a6bf6fca1fd837872ee4538 (patch)
treea9b99f8d591ff81ce50313ec2d8ae91c9b853062
parentf39832623990495b1a695801fa25aabe28c2ce00 (diff)
downloadgcc-16fd8669229faf735a6bf6fca1fd837872ee4538.tar.gz
* defaults.h (LEGITIMIZE_ADDRESS): Provide a default
definition. * config/arc/arc.h, config/fr30/fr30.h, config/frv/frv.h, config/h8300/h8300.h, config/ia64/ia64.h, config/mcore/mcore.h, config/mmix/mmix.h, config/ns32k/ns32k.h, config/pdp11/pdp11.h, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h (LEGITIMIZE_ADDRESS): Remove. * doc/tm.texi (LEGITIMIZE_ADDRESS): Mention the default definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79066 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/arc/arc.h15
-rw-r--r--gcc/config/fr30/fr30.h21
-rw-r--r--gcc/config/frv/frv.h2
-rw-r--r--gcc/config/h8300/h8300.h17
-rw-r--r--gcc/config/ia64/ia64.h7
-rw-r--r--gcc/config/mcore/mcore.h1
-rw-r--r--gcc/config/mmix/mmix.h2
-rw-r--r--gcc/config/ns32k/ns32k.h17
-rw-r--r--gcc/config/pdp11/pdp11.h16
-rw-r--r--gcc/config/stormy16/stormy16.h2
-rw-r--r--gcc/config/v850/v850.h15
-rw-r--r--gcc/config/vax/vax.h17
-rw-r--r--gcc/defaults.h4
-rw-r--r--gcc/doc/tm.texi2
15 files changed, 18 insertions, 133 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b0c115eb8a9..62502e6e92f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2004-03-07 Kazu Hirata <kazu@cs.umass.edu>
+
+ * defaults.h (LEGITIMIZE_ADDRESS): Provide a default
+ definition.
+ * config/arc/arc.h, config/fr30/fr30.h, config/frv/frv.h,
+ config/h8300/h8300.h, config/ia64/ia64.h,
+ config/mcore/mcore.h, config/mmix/mmix.h,
+ config/ns32k/ns32k.h, config/pdp11/pdp11.h,
+ config/stormy16/stormy16.h, config/v850/v850.h,
+ config/vax/vax.h (LEGITIMIZE_ADDRESS): Remove.
+ * doc/tm.texi (LEGITIMIZE_ADDRESS): Mention the default
+ definition.
+
2004-03-07 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold) <IOR_EXPR>: Fold x | x as x.
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 48044403c9c..18b8f6f9c29 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -906,21 +906,6 @@ do { \
goto ADDR; \
}
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output. */
-
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h
index 0ab0e72c330..c7459f83205 100644
--- a/gcc/config/fr30/fr30.h
+++ b/gcc/config/fr30/fr30.h
@@ -988,27 +988,6 @@ do \
will reload one or both registers only if neither labeling works. */
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-/* A C compound statement that attempts to replace X with a valid memory
- address for an operand of mode MODE. WIN will be a C statement label
- elsewhere in the code; the macro definition may use
-
- GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
-
- to avoid further processing if the address has become legitimate.
-
- X will always be the result of a call to `break_out_memory_refs', and OLDX
- will be the operand that was given to that function to produce X.
-
- The code generated by this macro should not alter the substructure of X. If
- it transforms X into a more legitimate form, it should assign X (which will
- always be a C variable) a new value.
-
- It is not necessary for this macro to come up with a legitimate address.
- The compiler has standard ways of doing so in all cases. In fact, it is
- safe for this macro to do nothing. But often a machine-dependent strategy
- can generate better code. */
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
/* A C statement or compound statement with a conditional `goto LABEL;'
executed if memory address X (an RTX) can have different meanings depending
on the machine mode of the memory reference it is used for or if the address
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index cfcab0ea350..d1f308282fa 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -2410,8 +2410,6 @@ __asm__("\n" \
will reload one or both registers only if neither labeling works. */
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
#define FIND_BASE_TERM frv_find_base_term
/* A C statement or compound statement with a conditional `goto LABEL;'
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index aad99ec2c45..67fe01f7bec 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -886,23 +886,6 @@ struct cum_arg
while (0)
#endif
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output.
-
- For the H8/300, don't do anything. */
-
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) {}
-
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index c52c7516ac1..69a2954fa56 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1630,13 +1630,6 @@ do { \
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-/* A C compound statement that attempts to replace X with a valid memory
- address for an operand of mode MODE.
-
- This must be present, but there is nothing useful to be done here. */
-
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
/* A C statement or compound statement with a conditional `goto LABEL;'
executed if memory address X (an RTX) can have different meanings depending
on the machine mode of the memory reference it is used for or if the address
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index a344a28ced3..95805d17f4e 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -806,7 +806,6 @@ extern const enum reg_class reg_class_from_letter[];
On the MCore, allow anything but a double. */
#define LEGITIMATE_CONSTANT_P(X) (GET_CODE(X) != CONST_DOUBLE)
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
and check its validity for a certain class.
We have two alternate definitions for each of them.
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 4cb3075adbe..b4df95d8d46 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -835,8 +835,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
#define LEGITIMATE_CONSTANT_P(X) \
diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h
index b4b1455b859..f42fde02c39 100644
--- a/gcc/config/ns32k/ns32k.h
+++ b/gcc/config/ns32k/ns32k.h
@@ -1057,23 +1057,6 @@ __transfer_from_trampoline () \
} \
}
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output.
-
- For the ns32k, we do nothing */
-
-#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
-
/* Nonzero if the constant value X is a legitimate general operand
when generating PIC code. It is given that flag_pic is on and
that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 60198431cf1..568a0adacb9 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -846,22 +846,6 @@ extern int may_call_alloca;
}
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output. */
-
-#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
-
-
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
On the pdp this is for predec/postinc */
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index 09584adca4c..be69dcb3304 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -594,8 +594,6 @@ do { \
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
-
/* On this chip, this is true if the address is valid with an offset
of 0 but not of 6, because in that case it cannot be used as an
address for DImode or DFmode, or if the address is a post-increment
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index 74a080c83cb..6f3282184d7 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -976,21 +976,6 @@ do { \
} while (0)
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output. */
-
-#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
-
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 3bc04b9f24b..1cfcd51f871 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -758,23 +758,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
goto ADDR; \
GO_IF_REG_PLUS_INDEX (XEXP (X, 0), MODE, ADDR); } } }
-/* Try machine-dependent ways of modifying an illegitimate address
- to be legitimate. If we find one, return the new, valid address.
- This macro is used in only one place: `memory_address' in explow.c.
-
- OLDX is the address as it was before break_out_memory_refs was called.
- In some cases it is useful to look at this to decide what needs to be done.
-
- MODE and WIN are passed so that this macro can use
- GO_IF_LEGITIMATE_ADDRESS.
-
- It is always safe for this macro to do nothing. It exists to recognize
- opportunities to optimize the output.
-
- For the VAX, nothing needs to be done. */
-
-#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
-
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
On the VAX, the predecrement and postincrement address depend thus
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 927e98a5fa1..7d34e3cd30b 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -703,4 +703,8 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define SHIFT_COUNT_TRUNCATED 0
#endif
+#ifndef LEGITIMIZE_ADDRESS
+#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
+#endif
+
#endif /* ! GCC_DEFAULTS_H */
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 1bf6defe6ed..f464bea2eae 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -4914,7 +4914,7 @@ should assign @var{x} (which will always be a C variable) a new value.
It is not necessary for this macro to come up with a legitimate
address. The compiler has standard ways of doing so in all cases. In
-fact, it is safe for this macro to do nothing. But often a
+fact, it is safe to omit this macro. But often a
machine-dependent strategy can generate better code.
@end defmac