On 31/05/13 18:59, Eric Botcazou wrote:
The ARM/VxWorks port uses APCS frames and therefore ip to establish frames
with a frame pointer.  Now, for nested functions, ip is also the static chain
register so it needs to be preserved when the frame is being established.

There is code to that effect trying to save ip into r3 if the latter register
is available but, unfortunately, it uses df_regs_ever_live_p (3) to detect the
availability and this returns true for any non-toy function.

Fixed by implementing an arm_r3_live_at_start_p modelled on the implementation
of an equivalent predicate for %eax in the x86 back-end.

Tested on ARM/VxWorks, OK for the mainline?


2013-05-31  Eric Botcazou  <ebotca...@adacore.com>

        * config/arm/arm.c (arm_r3_live_at_start_p): New predicate.
        (arm_compute_static_chain_stack_bytes): Use it.  Tidy up.
        (arm_expand_prologue): Likewise.


OK

R.

Reply via email to