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/caller-save.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/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index c81c72c49b6..86d74ee1726 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -508,15 +508,17 @@ mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data) if (!REG_P (inner) || REGNO (inner) >= FIRST_PSEUDO_REGISTER) return; regno = subreg_regno (reg); + endregno = regno + subreg_nregs (reg); } else if (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER) - regno = REGNO (reg); + { + regno = REGNO (reg); + endregno = regno + hard_regno_nregs[regno][mode]; + } else return; - endregno = regno + hard_regno_nregs[regno][mode]; - for (i = regno; i < endregno; i++) SET_HARD_REG_BIT (*this_insn_sets, i); } @@ -542,13 +544,17 @@ add_stored_regs (rtx reg, rtx setter, void *data) SUBREG_BYTE (reg), GET_MODE (reg)); reg = SUBREG_REG (reg); + regno = REGNO (reg) + offset; + endregno = regno + subreg_nregs (reg); } + else + { + if (!REG_P (reg) || REGNO (reg) >= FIRST_PSEUDO_REGISTER) + return; - if (!REG_P (reg) || REGNO (reg) >= FIRST_PSEUDO_REGISTER) - return; - - regno = REGNO (reg) + offset; - endregno = regno + hard_regno_nregs[regno][mode]; + regno = REGNO (reg) + offset; + endregno = regno + hard_regno_nregs[regno][mode]; + } for (i = regno; i < endregno; i++) SET_REGNO_REG_SET ((regset) data, i); |