m68k.c (m68k_save_reg): Save the PIC register in functions that need a constant pool.

gcc/
	* config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
	functions that need a constant pool.

From-SVN: r122610
This commit is contained in:
Richard Sandiford 2007-03-06 09:04:09 +00:00 committed by Richard Sandiford
parent ffa2596e3a
commit 6357eb0da4
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-03-06 Richard Sandiford <richard@codesourcery.com>
* config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
functions that need a constant pool.
2007-03-06 Richard Sandiford <richard@codesourcery.com>
PR target/28181

View File

@ -749,6 +749,13 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler)
{
if (current_function_uses_pic_offset_table)
return true;
/* Reload may introduce constant pool references into a function
that thitherto didn't need a PIC register. Note that the test
above will not catch that case because we will only set
current_function_uses_pic_offset_table when emitting
the address reloads. */
if (current_function_uses_const_pool)
return true;
}
if (current_function_calls_eh_return)