aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-23 23:10:18 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-23 23:10:18 +0000
commite9de4a6bf905a0723259af3e5463e3555349bf7d (patch)
tree0eb629e5dc927e8a4d0db60b6b3e5ed4d5772763 /gcc
parentdf9a397c08d6a08316bc1dd815291f4159edc87a (diff)
* emit-rtl.c, rtl.h (subreg_hard_regno): Remove.
* caller-save.c (mark_set_regs): Use subreg_regno instead. * final.c (alter_subreg): Likewise. * local-alloc.c (reg_is_born): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91115 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/caller-save.c3
-rw-r--r--gcc/emit-rtl.c28
-rw-r--r--gcc/final.c3
-rw-r--r--gcc/local-alloc.c2
-rw-r--r--gcc/rtl.h1
6 files changed, 10 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9752df3b6ee..d1e06e7d822 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2004-11-23 Richard Henderson <rth@redhat.com>
+ * emit-rtl.c, rtl.h (subreg_hard_regno): Remove.
+ * caller-save.c (mark_set_regs): Use subreg_regno instead.
+ * final.c (alter_subreg): Likewise.
+ * local-alloc.c (reg_is_born): Likewise.
+
+2004-11-23 Richard Henderson <rth@redhat.com>
+
* simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly
instead of using a SUBREG temporary.
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 4fcff8e1cab..26be6176fb6 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -500,8 +500,7 @@ mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED,
rtx inner = SUBREG_REG (reg);
if (!REG_P (inner) || REGNO (inner) >= FIRST_PSEUDO_REGISTER)
return;
-
- regno = subreg_hard_regno (reg, 1);
+ regno = subreg_regno (reg);
}
else if (REG_P (reg)
&& REGNO (reg) < FIRST_PSEUDO_REGISTER)
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 5f2d8b262a3..c24ba255865 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1018,34 +1018,6 @@ maybe_set_first_label_num (rtx x)
first_label_num = CODE_LABEL_NUMBER (x);
}
-/* Return the final regno of X, which is a SUBREG of a hard
- register. */
-int
-subreg_hard_regno (rtx x, int check_mode)
-{
- enum machine_mode mode = GET_MODE (x);
- unsigned int byte_offset, base_regno, final_regno;
- rtx reg = SUBREG_REG (x);
-
- /* This is where we attempt to catch illegal subregs
- created by the compiler. */
- gcc_assert (GET_CODE (x) == SUBREG && REG_P (reg));
- base_regno = REGNO (reg);
- gcc_assert (base_regno < FIRST_PSEUDO_REGISTER);
- gcc_assert (!check_mode || HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg)));
-#ifdef ENABLE_CHECKING
- gcc_assert (subreg_offset_representable_p (REGNO (reg), GET_MODE (reg),
- SUBREG_BYTE (x), mode));
-#endif
- /* Catch non-congruent offsets too. */
- byte_offset = SUBREG_BYTE (x);
- gcc_assert (!(byte_offset % GET_MODE_SIZE (mode)));
-
- final_regno = subreg_regno (x);
-
- return final_regno;
-}
-
/* Return a value representing some low-order bits of X, where the number
of low-order bits is given by MODE. Note that no conversion is done
between floating-point and fixed-point values, rather, the bit
diff --git a/gcc/final.c b/gcc/final.c
index a45119a647e..03806be2fa8 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2636,8 +2636,7 @@ alter_subreg (rtx *xp)
else
{
/* Simplify_subreg can't handle some REG cases, but we have to. */
- unsigned int regno = subreg_hard_regno (x, 1);
-
+ unsigned int regno = subreg_regno (x);
gcc_assert (REG_P (y));
*xp = gen_rtx_REG_offset (y, GET_MODE (x), regno, SUBREG_BYTE (x));
}
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index a940ba435bc..5d33f566b4f 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -2011,7 +2011,7 @@ reg_is_born (rtx reg, int birth)
{
regno = REGNO (SUBREG_REG (reg));
if (regno < FIRST_PSEUDO_REGISTER)
- regno = subreg_hard_regno (reg, 1);
+ regno = subreg_regno (reg);
}
else
regno = REGNO (reg);
diff --git a/gcc/rtl.h b/gcc/rtl.h
index ff4a0650d58..978c92dd7e5 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1375,7 +1375,6 @@ extern rtvec gen_rtvec_v (int, rtx *);
extern rtx gen_reg_rtx (enum machine_mode);
extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
extern rtx gen_label_rtx (void);
-extern int subreg_hard_regno (rtx, int);
extern rtx gen_lowpart_common (enum machine_mode, rtx);
/* In cse.c */