diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-12-20 16:25:00 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-12-20 16:25:00 +0000 |
commit | f1f4e530a59db86e577e9e83871626c782e33585 (patch) | |
tree | e5723b345a12a4d1072befdb9b246a6a0ddc5270 /gcc/df-scan.c | |
parent | ee8c1b05d53213625231c9df895501823b19d44c (diff) | |
download | gcc-f1f4e530a59db86e577e9e83871626c782e33585.zip gcc-f1f4e530a59db86e577e9e83871626c782e33585.tar.gz gcc-f1f4e530a59db86e577e9e83871626c782e33585.tar.bz2 |
rtlanal.c (struct subreg_info, [...]): New.
* 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.
From-SVN: r120076
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 46dfb07..fea786c 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -1083,15 +1083,14 @@ df_ref_record (struct dataflow *dflow, rtx reg, rtx *loc, if (!(dflow->flags & DF_HARD_REGS)) return; - /* GET_MODE (reg) is correct here. We do not want to go into a SUBREG - for the mode, because we only want to add references to regs, which - are really referenced. E.g., a (subreg:SI (reg:DI 0) 0) does _not_ - reference the whole reg 0 in DI mode (which would also include - reg 1, at least, if 0 and 1 are SImode registers). */ - endregno = hard_regno_nregs[regno][GET_MODE (reg)]; if (GET_CODE (reg) == SUBREG) - regno += subreg_regno_offset (regno, GET_MODE (SUBREG_REG (reg)), - SUBREG_BYTE (reg), GET_MODE (reg)); + { + regno += subreg_regno_offset (regno, GET_MODE (SUBREG_REG (reg)), + SUBREG_BYTE (reg), GET_MODE (reg)); + endregno = subreg_nregs (reg); + } + else + endregno = hard_regno_nregs[regno][GET_MODE (reg)]; endregno += regno; /* If this is a multiword hardreg, we create some extra datastructures that |