aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1997-11-05 00:55:50 +0000
committerJim Wilson <wilson@gcc.gnu.org>1997-11-04 16:55:50 -0800
commitab00eb0aa3dd2f42fd175d0792908f660b366e3b (patch)
treebb081603eb324b51ec68b8b7e1e8f8d433609307 /gcc
parent31c8581d25e55cd1a2507e215b5b6046919b2ab3 (diff)
downloadgcc-ab00eb0aa3dd2f42fd175d0792908f660b366e3b.zip
gcc-ab00eb0aa3dd2f42fd175d0792908f660b366e3b.tar.gz
gcc-ab00eb0aa3dd2f42fd175d0792908f660b366e3b.tar.bz2
Fix shared library problem found by GNAT users.
* mips.c (mips_expand_epilogue): Emit blockage insn before call to save_restore_insns if no FP and GP will be restored. From-SVN: r16327
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2f981e9..7a3f4da 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,7 @@
-Tue Nov 4 12:30:28 1997 Jim Wilson <wilson@cygnus.com>
+Tue Nov 4 16:55:11 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips.c (mips_expand_epilogue): Emit blockage insn before call to
+ save_restore_insns if no FP and GP will be restored.
* dwarf2out.c (expand_builtin_dwarf_reg_size): New variable mode.
Convert CCmode to word_mode before calling GET_MODE_SIZE.
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 8516435..2d6984b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5591,6 +5591,13 @@ mips_expand_epilogue ()
else
emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx));
}
+ /* The GP/PIC register is implicitly used by all SYMBOL_REFs, so if we
+ are going to restore it, then we must emit a blockage insn to
+ prevent the scheduler from moving the restore out of the epilogue. */
+ else if (TARGET_ABICALLS && mips_abi != ABI_32
+ && (current_frame_info.mask
+ & (1L << (PIC_OFFSET_TABLE_REGNUM - GP_REG_FIRST))))
+ emit_insn (gen_blockage ());
save_restore_insns (FALSE, tmp_rtx, tsize, (FILE *)0);