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.
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
8 mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
11 - if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
12 + if (flag_pic && current_function_uses_pic_offset_table)
14 mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM);
17 for (regno = 0 ; regno < FIRST_PSEUDO_REGISTER ; regno++)
18 if (regs_ever_live[regno] && ! call_used_regs[regno])
22 + if (flag_pic && current_function_uses_pic_offset_table)
32 - if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
33 + if (flag_pic && current_function_uses_pic_offset_table)
36 mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
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);
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,
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,
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)),