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/resource.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/resource.c')
-rw-r--r-- | gcc/resource.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/resource.c b/gcc/resource.c index cd4eb10628c..398db5c9c40 100644 --- a/gcc/resource.c +++ b/gcc/resource.c @@ -99,11 +99,17 @@ update_live_status (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED) return; if (GET_CODE (dest) == SUBREG) - first_regno = subreg_regno (dest); - else - first_regno = REGNO (dest); + { + first_regno = subreg_regno (dest); + last_regno = first_regno + subreg_nregs (dest); - last_regno = first_regno + hard_regno_nregs[first_regno][GET_MODE (dest)]; + } + else + { + first_regno = REGNO (dest); + last_regno + = first_regno + hard_regno_nregs[first_regno][GET_MODE (dest)]; + } if (GET_CODE (x) == CLOBBER) for (i = first_regno; i < last_regno; i++) @@ -229,8 +235,7 @@ mark_referenced_resources (rtx x, struct resources *res, else { unsigned int regno = subreg_regno (x); - unsigned int last_regno - = regno + hard_regno_nregs[regno][GET_MODE (x)]; + unsigned int last_regno = regno + subreg_nregs (x); gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER); for (r = regno; r < last_regno; r++) @@ -763,8 +768,7 @@ mark_set_resources (rtx x, struct resources *res, int in_dest, else { unsigned int regno = subreg_regno (x); - unsigned int last_regno - = regno + hard_regno_nregs[regno][GET_MODE (x)]; + unsigned int last_regno = regno + subreg_nregs (x); gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER); for (r = regno; r < last_regno; r++) |