62 lines
2.3 KiB
Plaintext
62 lines
2.3 KiB
Plaintext
$OpenBSD: pp-gcc_reload1_c,v 1.1 2005/01/04 23:06:33 espie Exp $
|
|
--- gcc/reload1.c.orig Mon Sep 13 10:54:35 2004
|
|
+++ gcc/reload1.c Mon Jan 3 10:17:42 2005
|
|
@@ -42,6 +42,7 @@ Software Foundation, 59 Temple Place - S
|
|
#include "toplev.h"
|
|
#include "except.h"
|
|
#include "tree.h"
|
|
+#include "protector.h"
|
|
|
|
/* This file contains the reload pass of the compiler, which is
|
|
run after register allocation has been done. It checks that
|
|
@@ -935,7 +936,7 @@ reload (first, global)
|
|
if (cfun->stack_alignment_needed)
|
|
assign_stack_local (BLKmode, 0, cfun->stack_alignment_needed);
|
|
|
|
- starting_frame_size = get_frame_size ();
|
|
+ starting_frame_size = get_frame_size () - get_frame_free_size ();
|
|
|
|
set_initial_elim_offsets ();
|
|
set_initial_label_offsets ();
|
|
@@ -999,7 +1000,7 @@ reload (first, global)
|
|
setup_save_areas ();
|
|
|
|
/* If we allocated another stack slot, redo elimination bookkeeping. */
|
|
- if (starting_frame_size != get_frame_size ())
|
|
+ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
|
|
continue;
|
|
|
|
if (caller_save_needed)
|
|
@@ -1018,7 +1019,7 @@ reload (first, global)
|
|
|
|
/* If we allocated any new memory locations, make another pass
|
|
since it might have changed elimination offsets. */
|
|
- if (starting_frame_size != get_frame_size ())
|
|
+ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
|
|
something_changed = 1;
|
|
|
|
{
|
|
@@ -1110,11 +1111,11 @@ reload (first, global)
|
|
if (insns_need_reload != 0 || something_needs_elimination
|
|
|| something_needs_operands_changed)
|
|
{
|
|
- HOST_WIDE_INT old_frame_size = get_frame_size ();
|
|
+ HOST_WIDE_INT old_frame_size = get_frame_size () - get_frame_free_size ();
|
|
|
|
reload_as_needed (global);
|
|
|
|
- if (old_frame_size != get_frame_size ())
|
|
+ if (old_frame_size != get_frame_size () - get_frame_free_size ())
|
|
abort ();
|
|
|
|
if (num_eliminable)
|
|
@@ -2010,7 +2011,7 @@ alter_reg (i, from_reg)
|
|
if (from_reg == -1)
|
|
{
|
|
/* No known place to spill from => no slot to reuse. */
|
|
- x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size,
|
|
+ x = assign_stack_local_for_pseudo_reg (GET_MODE (regno_reg_rtx[i]), total_size,
|
|
inherent_size == total_size ? 0 : -1);
|
|
if (BYTES_BIG_ENDIAN)
|
|
/* Cancel the big-endian correction done in assign_stack_local.
|