summaryrefslogtreecommitdiff
path: root/gcc/config/m68k/m68k.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-06 09:04:09 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-06 09:04:09 +0000
commitd68ee78f8928de76dee6b8c926ceeb1cae59cb23 (patch)
treedcbc17fd73cab87dbdc78d39c5c82584d3889e57 /gcc/config/m68k/m68k.c
parent350e24f518f2dc343aad9bb5ec064186625704a6 (diff)
downloadgcc-d68ee78f8928de76dee6b8c926ceeb1cae59cb23.tar.gz
gcc/
* config/m68k/m68k.c (m68k_save_reg): Save the PIC register in functions that need a constant pool. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k/m68k.c')
-rw-r--r--gcc/config/m68k/m68k.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index b702f85e47f..1d7b44864c1 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -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)