]> git.pld-linux.org Git - packages/gcc.git/blob - gcc-O2-bug.patch
- added comment
[packages/gcc.git] / gcc-O2-bug.patch
1 diff -urN gcc-2.95.2.org/gcc/reload1.c gcc-2.95.2/gcc/reload1.c
2 --- gcc-2.95.2.org/gcc/reload1.c        Sat Nov 25 01:48:15 2000
3 +++ gcc-2.95.2/gcc/reload1.c    Sat Nov 25 01:52:07 2000
4 @@ -423,6 +423,7 @@
5  static int reload_reg_reaches_end_p    PROTO((int, int, enum reload_type));
6  static int allocate_reload_reg         PROTO((struct insn_chain *, int, int,
7                                                int));
8 +static int conflicts_with_override     PROTO((rtx));
9  static void choose_reload_regs         PROTO((struct insn_chain *));
10  static void merge_assigned_reloads     PROTO((rtx));
11  static void emit_reload_insns          PROTO((struct insn_chain *));
12 @@ -5594,6 +5595,21 @@
13  
14    return 1;
15  }
16 +
17 +/* Determine whether the reload reg X overlaps any rtx'es used for
18 +   overriding inheritance.  Return nonzero if so.  */
19 +
20 +static int
21 +conflicts_with_override (x)
22 +     rtx x;
23 +{
24 +  int i;
25 +  for (i = 0; i < n_reloads; i++)
26 +    if (reload_override_in[i]
27 +       && reg_overlap_mentioned_p (x, reload_override_in[i]))
28 +      return 1;
29 +  return 0;
30 +}
31  \f
32  /* Assign hard reg targets for the pseudo-registers we must reload
33     into hard regs for this insn.
34 @@ -6791,6 +6807,7 @@
35                    && dead_or_set_p (insn, old)
36                    /* This is unsafe if some other reload
37                       uses the same reg first.  */
38 +                  && ! conflicts_with_override (reloadreg)
39                    && reload_reg_free_for_value_p (REGNO (reloadreg),
40                                                    reload_opnum[j],
41                                                    reload_when_needed[j], 
42
This page took 0.032746 seconds and 3 git commands to generate.