Commit b07ff75d by Doug Evans

reorg.c: (mark_referenced_resource): if frame_pointer_needed...

* reorg.c: (mark_referenced_resource): if frame_pointer_needed,
HARD_FRAME_POINTER_REGNUM is also a referenced resource.
(mark_target_live_regs): value in HARD_FRAME_POINTER_REGNUM is not
call-clobbered.
(dbr_schedule): HARD_FRAME_POINTER_REGNUM should be valid at the
end of a function.

From-SVN: r5464
parent 3ec2ea3e
...@@ -390,7 +390,12 @@ mark_referenced_resources (x, res, include_delayed_effects) ...@@ -390,7 +390,12 @@ mark_referenced_resources (x, res, include_delayed_effects)
res->memory = 1; res->memory = 1;
SET_HARD_REG_BIT (res->regs, STACK_POINTER_REGNUM); SET_HARD_REG_BIT (res->regs, STACK_POINTER_REGNUM);
if (frame_pointer_needed) if (frame_pointer_needed)
SET_HARD_REG_BIT (res->regs, FRAME_POINTER_REGNUM); {
SET_HARD_REG_BIT (res->regs, FRAME_POINTER_REGNUM);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
SET_HARD_REG_BIT (res->regs, HARD_FRAME_POINTER_REGNUM);
#endif
}
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (global_regs[i]) if (global_regs[i])
...@@ -2445,6 +2450,9 @@ mark_target_live_regs (target, res) ...@@ -2445,6 +2450,9 @@ mark_target_live_regs (target, res)
if (call_used_regs[i] if (call_used_regs[i]
&& i != STACK_POINTER_REGNUM && i != FRAME_POINTER_REGNUM && i != STACK_POINTER_REGNUM && i != FRAME_POINTER_REGNUM
&& i != ARG_POINTER_REGNUM && i != ARG_POINTER_REGNUM
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
&& i != HARD_FRAME_POINTER_REGNUM
#endif
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM #if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
&& ! (i == ARG_POINTER_REGNUM && fixed_regs[i]) && ! (i == ARG_POINTER_REGNUM && fixed_regs[i])
#endif #endif
...@@ -4067,6 +4075,9 @@ dbr_schedule (first, file) ...@@ -4067,6 +4075,9 @@ dbr_schedule (first, file)
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
SET_HARD_REG_BIT (end_of_function_needs.regs, FRAME_POINTER_REGNUM); SET_HARD_REG_BIT (end_of_function_needs.regs, FRAME_POINTER_REGNUM);
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
SET_HARD_REG_BIT (end_of_function_needs.regs, HARD_FRAME_POINTER_REGNUM);
#endif
#ifdef EXIT_IGNORE_STACK #ifdef EXIT_IGNORE_STACK
if (! EXIT_IGNORE_STACK) if (! EXIT_IGNORE_STACK)
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment