summaryrefslogtreecommitdiff
path: root/gcc/reload1.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/reload1.c
parente22e4ce5742d700cf4cb75c208a9bed3adab27b8 (diff)
downloadgcc-b627bae76fb5094a5bf6fb70376081ae3d7566bf.tar.gz
* 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/reload1.c')
-rw-r--r--gcc/reload1.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 726a4bfcd15..ea703f162ea 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -7532,10 +7532,12 @@ gen_reload (out, in, opnum, type)
#ifdef SECONDARY_MEMORY_NEEDED
/* If we need a memory location to do the move, do it that way. */
- else if (GET_CODE (in) == REG && REGNO (in) < FIRST_PSEUDO_REGISTER
- && GET_CODE (out) == REG && REGNO (out) < FIRST_PSEUDO_REGISTER
- && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (in)),
- REGNO_REG_CLASS (REGNO (out)),
+ else if ((GET_CODE (in) == REG || GET_CODE (in) == SUBREG)
+ && reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
+ && (GET_CODE (out) == REG || GET_CODE (out) == SUBREG)
+ && reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
+ REGNO_REG_CLASS (reg_or_subregno (out)),
GET_MODE (out)))
{
/* Get the memory to use and rewrite both registers to its mode. */