]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - gcc-m68k-pic.patch
- rel 4
[packages/crossmingw32-gcc.git] / gcc-m68k-pic.patch
1 # DP: Two patches by Andreas Schwab to fix -fpic and loop optimization.
2 # DP: Another patch by Andreas Schwab to fix %a5 restauration in some cases.
3
4 ------------------------------------------------------------------------------
5 --- gcc/config/m68k/m68k.c~     Mon Aug  2 06:51:08 1999
6 +++ gcc/config/m68k/m68k.c      Fri Oct 22 11:47:09 1999
7 @@ -356,7 +356,7 @@
8        mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
9        num_saved_regs--;
10      }
11 -  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
12 +  if (flag_pic && current_function_uses_pic_offset_table)
13      {
14        mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM);
15        num_saved_regs++;
16 @@ -493,7 +493,10 @@
17    for (regno = 0 ; regno < FIRST_PSEUDO_REGISTER ; regno++)
18      if (regs_ever_live[regno] && ! call_used_regs[regno])
19        return 0;
20 -  
21 +
22 +  if (flag_pic && current_function_uses_pic_offset_table)
23 +    return 0;
24 +
25    return 1;
26  }
27  
28 @@ -568,7 +571,7 @@
29          nregs++;
30         mask |= 1 << regno;
31        }
32 -  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
33 +  if (flag_pic && current_function_uses_pic_offset_table)
34      {
35        nregs++;
36        mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
37 @@ -1334,8 +1337,6 @@
38                              gen_rtx_PLUS (Pmode,
39                                            pic_offset_table_rtx, orig));
40        current_function_uses_pic_offset_table = 1;
41 -      if (reload_in_progress)
42 -       regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
43        RTX_UNCHANGING_P (pic_ref) = 1;
44        emit_move_insn (reg, pic_ref);
45        return reg;
46 --- gcc/loop.c~ Fri Jun 25 06:38:11 1999
47 +++ gcc/loop.c  Fri Oct 22 11:45:16 1999
48 @@ -4046,11 +4046,11 @@
49                  in-between when biv_toal_increment returns nonzero both times
50                  but we test it here in case some day some real cfg analysis
51                  gets used to set always_computable.  */
52 -             && ((loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
53 -                  && no_labels_between_p (bl2->biv->insn, bl->biv->insn))
54 -                 || (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
55 -                                           bl2->biv->insn)
56 -                     && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
57 +             && (loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
58 +                 ? no_labels_between_p (bl2->biv->insn, bl->biv->insn)
59 +                 : (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
60 +                                          bl2->biv->insn)
61 +                    && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
62               && validate_change (bl->biv->insn,
63                                   &SET_SRC (single_set (bl->biv->insn)),
64                                   copy_rtx (src), 0))
This page took 0.033835 seconds and 3 git commands to generate.