aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/c4x
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>2004-01-25 23:58:39 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>2004-01-25 23:58:39 +0000
commit12fb52cf279c409d5a4bd373e0c2163b490aa296 (patch)
treeaa4d1a04f5630b1d6c248a5152c05f2e6c9f3bec /gcc/config/c4x
parentfdcf1e1ed5a9668a5e8631968a2d54d6cc83c61a (diff)
downloadgcc-12fb52cf279c409d5a4bd373e0c2163b490aa296.zip
gcc-12fb52cf279c409d5a4bd373e0c2163b490aa296.tar.gz
gcc-12fb52cf279c409d5a4bd373e0c2163b490aa296.tar.bz2
* config/c4x/c4x.h (LEGITIMIZE_RELOAD_ADDRESS): Handle symref.
From-SVN: r76598
Diffstat (limited to 'gcc/config/c4x')
-rw-r--r--gcc/config/c4x/c4x.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 37d0c9b..ca82dd8 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -1305,7 +1305,7 @@ CUMULATIVE_ARGS;
if (! TARGET_SMALL) \
{ \
int i; \
- X = gen_rtx_LO_SUM (GET_MODE (X), \
+ (X) = gen_rtx_LO_SUM (GET_MODE (X), \
gen_rtx_HIGH (GET_MODE (X), X), X); \
i = push_reload (XEXP (X, 0), NULL_RTX, \
&XEXP (X, 0), NULL, \
@@ -1316,6 +1316,12 @@ CUMULATIVE_ARGS;
rld[i].reg_rtx = gen_rtx_REG (Pmode, DP_REGNO); \
rld[i].nocombine = 1; \
} \
+ else \
+ { \
+ /* make_memloc in reload will substitute invalid memory \
+ references. We need to fix them up. */ \
+ (X) = gen_rtx_LO_SUM (Pmode, gen_rtx_REG (Pmode, DP_REGNO), (X)); \
+ } \
goto WIN; \
} \
else if (MODE != HImode \