From ab00eb0aa3dd2f42fd175d0792908f660b366e3b Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 5 Nov 1997 00:55:50 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 ++++- gcc/config/mips/mips.c | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f981e9df74..7a3f4da7a73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,7 @@ -Tue Nov 4 12:30:28 1997 Jim Wilson +Tue Nov 4 16:55:11 1997 Jim Wilson + + * 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 85164356d88..2d6984b8737 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); -- 2.30.2