Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / reload1.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/reload1.c.patch,v 1.3 2004/12/21 13:10:48 joerg Exp $
2
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/reload1.c,v
5 retrieving revision 1.1
6 diff -u -r1.1 reload1.c
7 --- reload1.c   20 Jun 2004 02:14:50 -0000      1.1
8 +++ reload1.c   20 Dec 2004 20:48:12 -0000
9 @@ -43,6 +43,7 @@
10  #include "toplev.h"
11  #include "except.h"
12  #include "tree.h"
13 +#include "protector.h"
14  
15  /* This file contains the reload pass of the compiler, which is
16     run after register allocation has been done.  It checks that
17 @@ -891,7 +892,7 @@
18        if (cfun->stack_alignment_needed)
19          assign_stack_local (BLKmode, 0, cfun->stack_alignment_needed);
20  
21 -      starting_frame_size = get_frame_size ();
22 +      starting_frame_size = get_frame_size () - get_frame_free_size ();
23  
24        set_initial_elim_offsets ();
25        set_initial_label_offsets ();
26 @@ -955,7 +956,7 @@
27         setup_save_areas ();
28  
29        /* If we allocated another stack slot, redo elimination bookkeeping.  */
30 -      if (starting_frame_size != get_frame_size ())
31 +      if (starting_frame_size != get_frame_size () - get_frame_free_size ())
32         continue;
33  
34        if (caller_save_needed)
35 @@ -974,7 +975,7 @@
36  
37        /* If we allocated any new memory locations, make another pass
38          since it might have changed elimination offsets.  */
39 -      if (starting_frame_size != get_frame_size ())
40 +      if (starting_frame_size != get_frame_size () - get_frame_free_size ())
41         something_changed = 1;
42  
43        {
44 @@ -1066,11 +1067,11 @@
45    if (insns_need_reload != 0 || something_needs_elimination
46        || something_needs_operands_changed)
47      {
48 -      HOST_WIDE_INT old_frame_size = get_frame_size ();
49 +      HOST_WIDE_INT old_frame_size = get_frame_size () - get_frame_free_size ();
50  
51        reload_as_needed (global);
52  
53 -      if (old_frame_size != get_frame_size ())
54 +      if (old_frame_size != get_frame_size () - get_frame_free_size ())
55         abort ();
56  
57        if (num_eliminable)
58 @@ -1958,7 +1959,7 @@
59        if (from_reg == -1)
60         {
61           /* No known place to spill from => no slot to reuse.  */
62 -         x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size,
63 +         x = assign_stack_local_for_pseudo_reg (GET_MODE (regno_reg_rtx[i]), total_size,
64                                   inherent_size == total_size ? 0 : -1);
65           if (BYTES_BIG_ENDIAN)
66             /* Cancel the  big-endian correction done in assign_stack_local.