summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-17 13:53:19 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-17 13:53:19 +0000
commitb870fa038d433e1d89a4fa0bc2fd9ee95c803d89 (patch)
tree932bdb247f1b575456479d3812fafb03e3879d08 /gcc/reload.c
parent4460a647d582a10ec8a6d298f3266603c033cfb2 (diff)
downloadgcc-b870fa038d433e1d89a4fa0bc2fd9ee95c803d89.tar.gz
2006-04-17 Richard Guenther <rguenther@suse.de>
PR target/26826 * reload.c (push_reload): Guard calls to get_secondary_mem for memory subregs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 8a76c0ec856..e7798b9c41a 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1286,7 +1286,9 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
#ifdef SECONDARY_MEMORY_NEEDED
/* If a memory location is needed for the copy, make one. */
- if (in != 0 && (REG_P (in) || GET_CODE (in) == SUBREG)
+ if (in != 0
+ && (REG_P (in)
+ || (GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))))
&& reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
class, inmode))
@@ -1316,7 +1318,9 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
- if (out != 0 && (REG_P (out) || GET_CODE (out) == SUBREG)
+ if (out != 0
+ && (REG_P (out)
+ || (GET_CODE (out) == SUBREG && REG_P (SUBREG_REG (out))))
&& reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (class,
REGNO_REG_CLASS (reg_or_subregno (out)),