diff options
author | Andrea Tarani <andrea.tarani@gilbarco.com> | 2005-02-24 01:51:30 +0000 |
---|---|---|
committer | Bernardo Innocenti <bernie@gcc.gnu.org> | 2005-02-24 02:51:30 +0100 |
commit | b86ba8a3efa78849fb43c627aa61764b642e14d1 (patch) | |
tree | e7e17b5ea8ccac9d9725917baa317cd3ef175156 /gcc/config/m68k | |
parent | 0179f2c63218bf1d5d17ef1a7a0698d542f69864 (diff) | |
download | gcc-b86ba8a3efa78849fb43c627aa61764b642e14d1.zip gcc-b86ba8a3efa78849fb43c627aa61764b642e14d1.tar.gz gcc-b86ba8a3efa78849fb43c627aa61764b642e14d1.tar.bz2 |
m68k.c (m68k_save_reg): Also save A5 for non-leaf functions when -mid-shared-library is being used.
* config/m68k/m68k.c (m68k_save_reg): Also save A5 for non-leaf
functions when -mid-shared-library is being used.
From-SVN: r95487
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r-- | gcc/config/m68k/m68k.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 1db78d9..e3ac6fa 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -371,9 +371,13 @@ m68k_initial_elimination_offset (int from, int to) static bool m68k_save_reg (unsigned int regno, bool interrupt_handler) { - if (flag_pic && current_function_uses_pic_offset_table - && regno == PIC_OFFSET_TABLE_REGNUM) - return true; + if (flag_pic && regno == PIC_OFFSET_TABLE_REGNUM) + { + if (current_function_uses_pic_offset_table) + return true; + if (!current_function_is_leaf && TARGET_ID_SHARED_LIBRARY) + return true; + } if (current_function_calls_eh_return) { |