Commit e43dd89d by Richard Earnshaw Committed by Richard Earnshaw

arm.c (arm_compute_initial_elimination_offset): If optimizing for size...

* arm.c (arm_compute_initial_elimination_offset): If optimizing for
size, the link register is always saved if any other register is
saved.

From-SVN: r62142
parent 87a902e4
2003-01-30 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_compute_initial_elimination_offset): If optimizing for
size, the link register is always saved if any other register is
saved.
2003-01-30 Kazu Hirata <kazu@cs.umass.edu> 2003-01-30 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300-protos.h: Update the prototype for * config/h8300/h8300-protos.h: Update the prototype for
......
...@@ -8648,10 +8648,14 @@ arm_compute_initial_elimination_offset (from, to) ...@@ -8648,10 +8648,14 @@ arm_compute_initial_elimination_offset (from, to)
reg_mask = reg_mask & ~ (reg_mask & - reg_mask); reg_mask = reg_mask & ~ (reg_mask & - reg_mask);
} }
if (regs_ever_live[LR_REGNUM] if ((regs_ever_live[LR_REGNUM]
/* If a stack frame is going to be created, the LR will /* If optimizing for size, then we save the link register if
be saved as part of that, so we do not need to allow any other integer register is saved. This gives a smaller
for it here. */ return sequence. */
|| (optimize_size && call_saved_registers > 0))
/* But if a stack frame is going to be created, the LR will
be saved as part of that, so we do not need to allow for
it here. */
&& ! frame_pointer_needed) && ! frame_pointer_needed)
call_saved_registers += 4; call_saved_registers += 4;
......
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