aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-06-21 16:34:39 -0400
committerDJ Delorie <dj@gcc.gnu.org>2001-06-21 16:34:39 -0400
commitb91055dde92be2336dac176609cab4c9ccd29124 (patch)
tree9909b9854c0b220468e098136d7384c3d6a77a1d /gcc
parent552ecbd90053e7a1dc005d49d6b6ec472eec9304 (diff)
downloadgcc-b91055dde92be2336dac176609cab4c9ccd29124.zip
gcc-b91055dde92be2336dac176609cab4c9ccd29124.tar.gz
gcc-b91055dde92be2336dac176609cab4c9ccd29124.tar.bz2
alpha.h (struct machine_function): Remove.
* config/alpha/alpha.h (struct machine_function): Remove. * config/alpha/alpha.c (integrate.h): Include. (override_options): Don't set up machine_status hooks. (alpha_init_machine_status): Remove. (alpha_mark_machine_status): Remove. (alpha_free_machine_status): Remove. (alpha_return_addr): Use get_hard_reg_initial_val. (alpha_gp_save_rtx): Likewise. (alpha_ra_ever_killed): Use has_hard_reg_initial_val. From-SVN: r43491
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/alpha/alpha.c72
-rw-r--r--gcc/config/alpha/alpha.h11
3 files changed, 16 insertions, 79 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3b33ab6..006f16d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2001-06-21 DJ Delorie <dj@redhat.com>
+
+ * config/alpha/alpha.h (struct machine_function): Remove.
+ * config/alpha/alpha.c (integrate.h): Include.
+ (override_options): Don't set up machine_status hooks.
+ (alpha_init_machine_status): Remove.
+ (alpha_mark_machine_status): Remove.
+ (alpha_free_machine_status): Remove.
+ (alpha_return_addr): Use get_hard_reg_initial_val.
+ (alpha_gp_save_rtx): Likewise.
+ (alpha_ra_ever_killed): Use has_hard_reg_initial_val.
+
2001-06-20 Aldy Hernandez <aldyh@redhat.com>
* config/sh/sh.md (interrupt_function): Use
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 3e3de70..79700d4 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
+#include "integrate.h"
/* External data. */
extern int rtx_equal_function_value_matters;
@@ -357,11 +358,6 @@ override_options ()
/* Acquire a unique set number for our register saves and restores. */
alpha_sr_alias_set = new_alias_set ();
-
- /* Set up function hooks. */
- init_machine_status = alpha_init_machine_status;
- mark_machine_status = alpha_mark_machine_status;
- free_machine_status = alpha_free_machine_status;
}
/* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */
@@ -3661,35 +3657,6 @@ alpha_adjust_cost (insn, link, dep_insn, cost)
/* Functions to save and restore alpha_return_addr_rtx. */
-static void
-alpha_init_machine_status (p)
- struct function *p;
-{
- p->machine =
- (struct machine_function *) xcalloc (1, sizeof (struct machine_function));
-}
-
-static void
-alpha_mark_machine_status (p)
- struct function *p;
-{
- struct machine_function *machine = p->machine;
-
- if (machine)
- {
- ggc_mark_rtx (machine->ra_rtx);
- ggc_mark_rtx (machine->gp_save_rtx);
- }
-}
-
-static void
-alpha_free_machine_status (p)
- struct function *p;
-{
- free (p->machine);
- p->machine = NULL;
-}
-
/* Start the ball rolling with RETURN_ADDR_RTX. */
rtx
@@ -3697,27 +3664,10 @@ alpha_return_addr (count, frame)
int count;
rtx frame ATTRIBUTE_UNUSED;
{
- rtx init, reg;
-
if (count != 0)
return const0_rtx;
- reg = cfun->machine->ra_rtx;
- if (reg == NULL)
- {
- /* No rtx yet. Invent one, and initialize it from $26 in
- the prologue. */
- reg = gen_reg_rtx (Pmode);
- cfun->machine->ra_rtx = reg;
- init = gen_rtx_SET (VOIDmode, reg, gen_rtx_REG (Pmode, REG_RA));
-
- /* Emit the insn to the prologue with the other argument copies. */
- push_topmost_sequence ();
- emit_insn_after (init, get_insns ());
- pop_topmost_sequence ();
- }
-
- return reg;
+ return get_hard_reg_initial_val (Pmode, REG_RA);
}
/* Return or create a pseudo containing the gp value for the current
@@ -3726,21 +3676,7 @@ alpha_return_addr (count, frame)
rtx
alpha_gp_save_rtx ()
{
- rtx init, reg;
-
- reg = cfun->machine->gp_save_rtx;
- if (reg == NULL)
- {
- reg = gen_reg_rtx (DImode);
- cfun->machine->gp_save_rtx = reg;
- init = gen_rtx_SET (VOIDmode, reg, gen_rtx_REG (DImode, 29));
-
- push_topmost_sequence ();
- emit_insn_after (init, get_insns ());
- pop_topmost_sequence ();
- }
-
- return reg;
+ return get_hard_reg_initial_val (DImode, 29);
}
static int
@@ -3752,7 +3688,7 @@ alpha_ra_ever_killed ()
if (current_function_is_thunk)
return 0;
#endif
- if (!cfun->machine->ra_rtx)
+ if (!has_hard_reg_initial_val (Pmode, REG_RA))
return regs_ever_live[REG_RA];
push_topmost_sequence ();
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 739a177..20278da 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1185,17 +1185,6 @@ struct alpha_compare
extern struct alpha_compare alpha_compare;
-/* Machine specific function data. */
-
-struct machine_function
-{
- /* If non-null, this rtx holds the return address for the function. */
- struct rtx_def *ra_rtx;
-
- /* If non-null, this rtx holds a saved copy of the GP for the function. */
- struct rtx_def *gp_save_rtx;
-};
-
/* Make (or fake) .linkage entry for function call.
IS_LOCAL is 0 if name is used in call, 1 if name is used in definition. */