From 7978192f77a85871bef9c4de7ab501c07f8b69cf Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Wed, 20 Oct 1999 05:45:09 +0000 Subject: [PATCH] pa.md (call, call_value): Do not emit a blockage after restoring the PIC register. * pa.md (call, call_value): Do not emit a blockage after restoring the PIC register. From-SVN: r30096 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.md | 26 ++++---------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83d0ae97f4a..f650a8c78ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 19 23:43:50 1999 Jeffrey A Law (law@cygnus.com) + + * pa.md (call, call_value): Do not emit a blockage after restoring + the PIC register. + Tue Oct 19 17:22:39 1999 Mark Mitchell * c-typeck.c (c_expand_asm_operands): Fix typo. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index ae7a1140e9d..72d34e5c3f3 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -4731,6 +4731,8 @@ if (flag_pic) { use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), + gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM_SAVED)); /* After each call we must restore the PIC register, even if it doesn't appear to be used. @@ -4739,17 +4741,6 @@ stored the PIC register in. */ emit_move_insn (pic_offset_table_rtx, gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM_SAVED)); - emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx)); - - /* Gross. We have to keep the scheduler from moving the restore - of the PIC register away from the call. SCHED_GROUP_P is - supposed to do this, but for some reason the compiler will - go into an infinite loop when we use that. - - This method (blockage insn) may make worse code (then again - it may not since calls are nearly blockages anyway), but at - least it should work. */ - emit_insn (gen_blockage ()); } DONE; }") @@ -4888,6 +4879,8 @@ if (flag_pic) { use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx); + use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), + gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM_SAVED)); /* After each call we must restore the PIC register, even if it doesn't appear to be used. @@ -4896,17 +4889,6 @@ stored the PIC register in. */ emit_move_insn (pic_offset_table_rtx, gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM_SAVED)); - emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx)); - - /* Gross. We have to keep the scheduler from moving the restore - of the PIC register away from the call. SCHED_GROUP_P is - supposed to do this, but for some reason the compiler will - go into an infinite loop when we use that. - - This method (blockage insn) may make worse code (then again - it may not since calls are nearly blockages anyway), but at - least it should work. */ - emit_insn (gen_blockage ()); } DONE; }") -- 2.30.2