arm.c (arm_compute_save_reg0_reg12_mask): Add special case for noreturn functions.

2009-11-23  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Add special
	case for noreturn functions.
	(arm_compute_save_reg_mask): Remove special noreturn handling.

From-SVN: r154441
This commit is contained in:
Paul Brook 2009-11-23 13:03:28 +00:00 committed by Paul Brook
parent 0230277c25
commit 1586899ee9
2 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2009-11-23 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Add special
case for noreturn functions.
(arm_compute_save_reg_mask): Remove special noreturn handling.
2009-11-23 Richard Guenther <rguenther@suse.de>
* tree-dfa.c (get_ref_base_and_extent): Adjust maximum access

View File

@ -12831,6 +12831,20 @@ arm_compute_save_reg0_reg12_mask (void)
&& crtl->uses_pic_offset_table)
save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
}
else if (IS_VOLATILE(func_type))
{
/* For noreturn functions we historically omitted register saves
altogether. However this really messes up debugging. As a
compromise save just the fame pointers. Combined with the link
register saved elsewhere this should be sufficient to get
a backtrace. */
if (frame_pointer_needed)
save_reg_mask |= 1 << HARD_FRAME_POINTER_REGNUM;
if (df_regs_ever_live_p (ARM_HARD_FRAME_POINTER_REGNUM))
save_reg_mask |= 1 << ARM_HARD_FRAME_POINTER_REGNUM;
if (df_regs_ever_live_p (THUMB_HARD_FRAME_POINTER_REGNUM))
save_reg_mask |= 1 << THUMB_HARD_FRAME_POINTER_REGNUM;
}
else
{
/* In the normal case we only need to save those registers
@ -12917,11 +12931,6 @@ arm_compute_save_reg_mask (void)
| (1 << LR_REGNUM)
| (1 << PC_REGNUM);
/* Volatile functions do not return, so there
is no need to save any other registers. */
if (IS_VOLATILE (func_type))
return save_reg_mask;
save_reg_mask |= arm_compute_save_reg0_reg12_mask ();
/* Decide if we need to save the link register.