clobbered across calls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23191
138bc75d-0d04-0410-961f-
82ee72b054a4
Mon Oct 19 11:40:56 1998 Jeffrey A Law (law@cygnus.com)
Mon Oct 19 11:40:56 1998 Jeffrey A Law (law@cygnus.com)
+ * gcse.c (compute_hash_table): Correctly identify hard regs which are
+ clobbered across calls.
+
* loop.c (scan_loop): Be more selective about what invariants are
moved out of a loop.
* loop.c (scan_loop): Be more selective about what invariants are
moved out of a loop.
if (GET_CODE (insn) == CALL_INSN)
{
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (GET_CODE (insn) == CALL_INSN)
{
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- if (call_used_regs[regno])
+ if ((call_used_regs[regno]
+ && regno != STACK_POINTER_REGNUM
+#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ && regno != HARD_FRAME_POINTER_REGNUM
+#endif
+#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ && ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
+#endif
+#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
+ && ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic)
+#endif
+
+ && regno != FRAME_POINTER_REGNUM)
+ || global_regs[regno])
record_last_reg_set_info (insn, regno);
if (! CONST_CALL_P (insn))
record_last_mem_set_info (insn);
record_last_reg_set_info (insn, regno);
if (! CONST_CALL_P (insn))
record_last_mem_set_info (insn);
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
- if (call_used_regs[regno])
+ if ((call_used_regs[regno]
+ && regno != STACK_POINTER_REGNUM
+#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ && regno != HARD_FRAME_POINTER_REGNUM
+#endif
+#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ && ! (regno == ARG_POINTER_REGNUM
+ && fixed_regs[regno])
+#endif
+#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
+ && ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic)
+#endif
+ && regno != FRAME_POINTER_REGNUM)
+ || global_regs[regno])
handle_rd_kill_set (insn, regno, bb);
}
}
handle_rd_kill_set (insn, regno, bb);
}
}