+2018-03-22 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/84826
+ * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
+ * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
+ re-computing once computed.
+ (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
+ (arm_init_machine_status): Initialize
+ machine->static_chain_stack_bytes.
+
2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/84760
static int
arm_compute_static_chain_stack_bytes (void)
{
+ /* Once the value is updated from the init value of -1, do not
+ re-compute. */
+ if (cfun->machine->static_chain_stack_bytes != -1)
+ return cfun->machine->static_chain_stack_bytes;
+
/* See the defining assertion in arm_expand_prologue. */
if (IS_NESTED (arm_current_func_type ())
&& ((TARGET_APCS_FRAME && frame_pointer_needed && TARGET_ARM)
emit_insn (gen_movsi (stack_pointer_rtx, r1));
}
+ /* Let's compute the static_chain_stack_bytes required and store it. Right
+ now the value must be -1 as stored by arm_init_machine_status (). */
+ cfun->machine->static_chain_stack_bytes
+ = arm_compute_static_chain_stack_bytes ();
+
/* The static chain register is the same as the IP register. If it is
clobbered when creating the frame, we need to save and restore it. */
clobber_ip = IS_NESTED (func_type)
#if ARM_FT_UNKNOWN != 0
machine->func_type = ARM_FT_UNKNOWN;
#endif
+ machine->static_chain_stack_bytes = -1;
return machine;
}
machine_mode thumb1_cc_mode;
/* Set to 1 after arm_reorg has started. */
int after_arm_reorg;
+ /* The number of bytes used to store the static chain register on the
+ stack, above the stack frame. */
+ int static_chain_stack_bytes;
}
machine_function;
#endif
+2018-03-22 Sudakshina Das <sudi.das@arm.com>
+
+ PR target/84826
+ * gcc.target/arm/pr84826.c: New test.
+
2018-03-22 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/arm/addr-modes-float.c: Move dg-do before