diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-20 16:25:00 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-20 16:25:00 +0000 |
commit | fe2ebfc850445a2622434cff7771bab38233fbd6 (patch) | |
tree | e5723b345a12a4d1072befdb9b246a6a0ddc5270 /gcc/reload.c | |
parent | f3c40e6dbeefd9efe87c6919805b669e3eb8b223 (diff) | |
download | gcc-fe2ebfc850445a2622434cff7771bab38233fbd6.tar.gz |
* rtlanal.c (struct subreg_info, subreg_get_info, subreg_nregs):
New.
(subreg_regno_offset, subreg_offset_representable_p): Change to
wrappers about subreg_get_info.
(refers_to_regno_p, reg_overlap_mentioned_p): Use subreg_nregs.
* rtl.h (subreg_nregs): Declare.
* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING): Update to refer to
subreg_get_info.
* caller-save.c (mark_set_regs, add_stored_regs): Use
subreg_nregs.
* df-scan.c (df_ref_record): Use subreg_nregs.
* flow.c (mark_set_1): Use subreg_nregs.
* postreload.c (move2add_note_store): Use subreg_nregs.
* reload.c (decompose, refers_to_regno_for_reload_p,
reg_overlap_mentioned_for_reload_p): Use subreg_nregs.
* resource.c (update_live_status, mark_referenced_resources,
mark_set_resources): Use subreg_nregs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 1f1bc23020b..50af5d5e366 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2414,7 +2414,7 @@ decompose (rtx x) return decompose (SUBREG_REG (x)); else /* A hard reg. */ - val.end = val.start + hard_regno_nregs[val.start][GET_MODE (x)]; + val.end = val.start + subreg_nregs (x); break; case SCRATCH: @@ -6381,7 +6381,7 @@ refers_to_regno_for_reload_p (unsigned int regno, unsigned int endregno, unsigned int inner_regno = subreg_regno (x); unsigned int inner_endregno = inner_regno + (inner_regno < FIRST_PSEUDO_REGISTER - ? hard_regno_nregs[inner_regno][GET_MODE (x)] : 1); + ? subreg_nregs (x) : 1); return endregno > inner_regno && regno < inner_endregno; } @@ -6479,6 +6479,10 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in) GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x), GET_MODE (x)); + endregno = regno + (regno < FIRST_PSEUDO_REGISTER + ? subreg_nregs (x) : 1); + + return refers_to_regno_for_reload_p (regno, endregno, in, (rtx*) 0); } else if (REG_P (x)) { @@ -6494,6 +6498,10 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in) gcc_assert (reg_equiv_constant[regno]); return 0; } + + endregno = regno + hard_regno_nregs[regno][GET_MODE (x)]; + + return refers_to_regno_for_reload_p (regno, endregno, in, (rtx*) 0); } else if (MEM_P (x)) return refers_to_mem_for_reload_p (in); @@ -6520,10 +6528,7 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in) || reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in)); } - endregno = regno + (regno < FIRST_PSEUDO_REGISTER - ? hard_regno_nregs[regno][GET_MODE (x)] : 1); - - return refers_to_regno_for_reload_p (regno, endregno, in, (rtx*) 0); + gcc_unreachable (); } /* Return nonzero if anything in X contains a MEM. Look also for pseudo |