Commit 215161e2 by Roman Zippel Committed by Roman Zippel

function.h (struct function): Rename calls_unwind_init to saves_all_registers.

	* function.h (struct function): Rename calls_unwind_init
	to saves_all_registers.
	(current_function_saves_all_registers): Renamed from
	current_function_calls_unwind_init.
	* reload1.c (reload): Set current_function_saves_all_registers.
	* except.c (expand_builtin_unwind_init): Likewise.
	* config/m68k/m68k.c (m68k_save_reg): Use
	current_function_saves_all_registers to save pic register.

From-SVN: r128248
parent 6ef9a246
2007-09-07 Roman Zippel <zippel@linux-m68k.org>
* function.h (struct function): Rename calls_unwind_init
to saves_all_registers.
(current_function_saves_all_registers): Renamed from
current_function_calls_unwind_init.
* reload1.c (reload): Set current_function_saves_all_registers.
* except.c (expand_builtin_unwind_init): Likewise.
* config/m68k/m68k.c (m68k_save_reg): Use
current_function_saves_all_registers to save pic register.
2007-09-07 Janis Johnson <janis187@us.ibm.com>
config/m68k/m68k.c (floating_exact_log2): Update call to real_2expN.
......@@ -780,9 +780,7 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler)
{
if (flag_pic && regno == PIC_REG)
{
/* A function that receives a nonlocal goto must save all call-saved
registers. */
if (current_function_has_nonlocal_label)
if (current_function_saves_all_registers)
return true;
if (current_function_uses_pic_offset_table)
return true;
......
......@@ -2867,7 +2867,7 @@ expand_builtin_unwind_init (void)
{
/* Set this so all the registers get saved in our frame; we need to be
able to copy the saved values for any registers from frames we unwind. */
current_function_calls_unwind_init = 1;
current_function_saves_all_registers = 1;
#ifdef SETUP_FRAME_ADDRESSES
SETUP_FRAME_ADDRESSES ();
......
......@@ -387,8 +387,9 @@ struct function GTY(())
from nested functions. */
unsigned int has_nonlocal_label : 1;
/* Nonzero if function calls builtin_unwind_init. */
unsigned int calls_unwind_init : 1;
/* Nonzero if function saves all registers, e.g. if it has a nonlocal
label that can reach the exit block via non-exceptional paths. */
unsigned int saves_all_registers : 1;
/* Nonzero if function being compiled has nonlocal gotos to parent
function. */
......@@ -503,7 +504,7 @@ extern void pop_cfun (void);
#define current_function_uses_const_pool (cfun->uses_const_pool)
#define current_function_epilogue_delay_list (cfun->epilogue_delay_list)
#define current_function_has_nonlocal_label (cfun->has_nonlocal_label)
#define current_function_calls_unwind_init (cfun->calls_unwind_init)
#define current_function_saves_all_registers (cfun->saves_all_registers)
#define current_function_has_nonlocal_goto (cfun->has_nonlocal_goto)
#define current_function_has_asm_statement (cfun->has_asm_statement)
......
......@@ -743,9 +743,11 @@ reload (rtx first, int global)
/* A function that has a nonlocal label that can reach the exit
block via non-exceptional paths must save all call-saved
registers. */
if (current_function_calls_unwind_init
|| (current_function_has_nonlocal_label
&& has_nonexceptional_receiver ()))
if (current_function_has_nonlocal_label
&& has_nonexceptional_receiver ())
current_function_saves_all_registers = 1;
if (current_function_saves_all_registers)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
df_set_regs_ever_live (i, true);
......
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