summaryrefslogtreecommitdiffstats
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-30 19:35:17 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-30 19:35:17 +0000
commitb627bae76fb5094a5bf6fb70376081ae3d7566bf (patch)
tree935edce515bf5aaa1706595857265e30bbcf42c7 /gcc/reload.c
parente22e4ce5742d700cf4cb75c208a9bed3adab27b8 (diff)
downloadppe42-gcc-b627bae76fb5094a5bf6fb70376081ae3d7566bf.tar.gz
ppe42-gcc-b627bae76fb5094a5bf6fb70376081ae3d7566bf.zip
* reload.c (push_reload): Handle subregs and secondary memory.
* reload1.c (gen_reload): Likewise. * jump.c (reg_or_subregno): New function. * rtl.h (reg_or_subregno): Declare * unroll.c (find_splittable_givs): Handle subregs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57663 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index ba5d075a988..2b427226512 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1285,9 +1285,9 @@ push_reload (in, out, inloc, outloc, class,
#ifdef SECONDARY_MEMORY_NEEDED
/* If a memory location is needed for the copy, make one. */
- if (in != 0 && GET_CODE (in) == REG
- && REGNO (in) < FIRST_PSEUDO_REGISTER
- && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (in)),
+ if (in != 0 && (GET_CODE (in) == REG || GET_CODE (in) == SUBREG)
+ && reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
class, inmode))
get_secondary_mem (in, inmode, opnum, type);
#endif
@@ -1315,9 +1315,10 @@ push_reload (in, out, inloc, outloc, class,
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
- if (out != 0 && GET_CODE (out) == REG
- && REGNO (out) < FIRST_PSEUDO_REGISTER
- && SECONDARY_MEMORY_NEEDED (class, REGNO_REG_CLASS (REGNO (out)),
+ if (out != 0 && (GET_CODE (out) == REG || GET_CODE (out) == SUBREG)
+ && reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
+ && SECONDARY_MEMORY_NEEDED (class,
+ REGNO_REG_CLASS (reg_or_subregno (out)),
outmode))
get_secondary_mem (out, outmode, opnum, type);
#endif
OpenPOWER on IntegriCloud