From 5cfc5f84fbd2ec29b1ac0cdba44ff468c82f48fe Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 18 Jan 2004 22:37:29 +0000 Subject: [PATCH] final.c (final_scan_insn): Make non-static again. * final.c (final_scan_insn): Make non-static again. * output.h (final_scan_insn): Re-add prototype. * config/arc/arc.c (arc_output_function_epilogue): Add NULL to final_scan_insn call. * config/cris/cris.c (cris_target_asm_function_epilogue): Likewise. * config/mips/mips.c (mips_output_conditional_branch): Likewise. * config/pa/pa.c (output_lbranch, output_call): Likewise. * config/sh/sh.c (print_slot): Likewise. * config/sparc/sparc.c (sparc_nonflat_function_epilogue): Likewise. (output_sibcall, sparc_flat_function_epilogue): Likewise. From-SVN: r76117 --- gcc/ChangeLog | 13 +++++++++++++ gcc/config/arc/arc.c | 9 +++++---- gcc/config/cris/cris.c | 5 +++-- gcc/config/mips/mips.c | 4 ++-- gcc/config/pa/pa.c | 9 +++++---- gcc/config/sh/sh.c | 2 +- gcc/config/sparc/sparc.c | 14 +++++++------- gcc/final.c | 3 +-- gcc/output.h | 5 +++++ 9 files changed, 42 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 74e3bab63e38..566043acea7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2004-01-18 Daniel Jacobowitz + + * final.c (final_scan_insn): Make non-static again. + * output.h (final_scan_insn): Re-add prototype. + * config/arc/arc.c (arc_output_function_epilogue): Add NULL + to final_scan_insn call. + * config/cris/cris.c (cris_target_asm_function_epilogue): Likewise. + * config/mips/mips.c (mips_output_conditional_branch): Likewise. + * config/pa/pa.c (output_lbranch, output_call): Likewise. + * config/sh/sh.c (print_slot): Likewise. + * config/sparc/sparc.c (sparc_nonflat_function_epilogue): Likewise. + (output_sibcall, sparc_flat_function_epilogue): Likewise. + 2004-01-18 Jan Hubicka * basic-block.h (try_redirect_by_replacing_jump): Declare. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 876bef568283..ad26913217e5 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1,5 +1,5 @@ /* Subroutines used for code generation on the Argonaut ARC cpu. - Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -1303,7 +1303,7 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size) /* ??? If stack intactness is important, always emit now. */ if (MUST_SAVE_RETURN_ADDR && epilogue_delay != NULL_RTX) { - final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1); + final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, NULL); epilogue_delay = NULL_RTX; } @@ -1335,7 +1335,8 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size) { if (epilogue_delay) { - final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1); + final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, + NULL); } } @@ -1360,7 +1361,7 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size) abort (); if (restored < size) abort (); - final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1); + final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, NULL); } else if (frame_pointer_needed && !fp_restored_p) { diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 79b194b2d95f..f7e3d29d79a9 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -1,5 +1,6 @@ /* Definitions for GCC. Part of the machine description for CRIS. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. Contributed by Axis Communications. Written by Hans-Peter Nilsson. This file is part of GCC. @@ -1259,7 +1260,7 @@ cris_target_asm_function_epilogue (FILE *file, HOST_WIDE_INT size) /* Output the delay-slot-insn the mandated way. */ final_scan_insn (XEXP (current_function_epilogue_delay_list, 0), - file, 1, -2, 1); + file, 1, -2, 1, NULL); } else if (file) { diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index f0cc50c4d3bd..0cef0f32cf05 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -9285,7 +9285,7 @@ mips_output_conditional_branch (rtx insn, rtx *operands, int two_operands_p, /* Output delay slot instruction. */ rtx insn = final_sequence; final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, - optimize, 0, 1); + optimize, 0, 1, NULL); INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } else @@ -9304,7 +9304,7 @@ mips_output_conditional_branch (rtx insn, rtx *operands, int two_operands_p, /* Output delay slot instruction. */ rtx insn = final_sequence; final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, - optimize, 0, 1); + optimize, 0, 1, NULL); INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } else diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 1f8622d30f46..bcb8329770c6 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1,6 +1,6 @@ /* Subroutines for insn-output.c for HPPA. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003 Free Software Foundation, Inc. + 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c This file is part of GCC. @@ -6125,7 +6125,7 @@ output_lbranch (rtx dest, rtx insn) abort (); final_scan_insn (NEXT_INSN (insn), asm_out_file, - optimize, 0, 0); + optimize, 0, 0, NULL); /* Now delete the delay insn. */ PUT_CODE (NEXT_INSN (insn), NOTE); @@ -7129,7 +7129,7 @@ output_call (rtx insn, rtx call_dest, int sibcall) && !sibcall) { final_scan_insn (NEXT_INSN (insn), asm_out_file, - optimize, 0, 0); + optimize, 0, 0, NULL); /* Now delete the delay insn. */ PUT_CODE (NEXT_INSN (insn), NOTE); @@ -7177,7 +7177,8 @@ output_call (rtx insn, rtx call_dest, int sibcall) /* A non-jump insn in the delay slot. By definition we can emit this insn before the call (and in fact before argument relocating. */ - final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0); + final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0, 0, + NULL); /* Now delete the delay insn. */ PUT_CODE (NEXT_INSN (insn), NOTE); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index f605aff5fb41..db67097be3e1 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -1096,7 +1096,7 @@ output_movedouble (rtx insn ATTRIBUTE_UNUSED, rtx operands[], static void print_slot (rtx insn) { - final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1); + final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1, NULL); INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1; } diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index a3fdcc6cdb26..7e008de1c0d4 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1,6 +1,6 @@ /* Subroutines for insn-output.c for SPARC. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) 64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, at Cygnus Support. @@ -4539,7 +4539,7 @@ sparc_nonflat_function_epilogue (FILE *file, ? "\treturn\t%i7+12\n" : "\treturn\t%i7+8\n", file); final_scan_insn (XEXP (current_function_epilogue_delay_list, 0), - file, 1, 0, 0); + file, 1, 0, 0, NULL); } else { @@ -4564,7 +4564,7 @@ sparc_nonflat_function_epilogue (FILE *file, insn = emit_jump_insn (insn); sparc_emitting_epilogue = true; - final_scan_insn (insn, file, 1, 0, 1); + final_scan_insn (insn, file, 1, 0, 1, NULL); sparc_emitting_epilogue = false; } } @@ -4586,7 +4586,7 @@ sparc_nonflat_function_epilogue (FILE *file, abort (); fprintf (file, "\t%s\n", ret); final_scan_insn (XEXP (current_function_epilogue_delay_list, 0), - file, 1, 0, 1); + file, 1, 0, 1, NULL); } /* Output 'nop' instead of 'sub %sp,-0,%sp' when no frame, so as to avoid generating confusing assembly language output. */ @@ -4629,7 +4629,7 @@ output_sibcall (rtx insn, rtx call_operand) if (! delay) abort (); - final_scan_insn (delay, asm_out_file, 1, 0, 1); + final_scan_insn (delay, asm_out_file, 1, 0, 1, NULL); PATTERN (delay) = gen_blockage (); INSN_CODE (delay) = -1; delay_slot = 0; @@ -4659,7 +4659,7 @@ output_sibcall (rtx insn, rtx call_operand) if (! delay) abort (); - final_scan_insn (delay, asm_out_file, 1, 0, 1); + final_scan_insn (delay, asm_out_file, 1, 0, 1, NULL); PATTERN (delay) = gen_blockage (); INSN_CODE (delay) = -1; delay_slot = 0; @@ -7916,7 +7916,7 @@ sparc_flat_function_epilogue (FILE *file, HOST_WIDE_INT size) { if (size) abort (); - final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1); + final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, NULL); } else if (size > 4096) diff --git a/gcc/final.c b/gcc/final.c index c146f189419b..dd5b64ec53f5 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -235,7 +235,6 @@ static int final_addr_vec_align (rtx); #ifdef HAVE_ATTR_length static int align_fuzz (rtx, rtx, int, unsigned); #endif -static rtx final_scan_insn (rtx, FILE *, int, int, int, int *); /* Initialize data in final at the beginning of a compilation. */ @@ -1638,7 +1637,7 @@ output_alternate_entry_point (FILE *file, rtx insn) at the beginning of the second basic block, whichever comes first. */ -static rtx +rtx final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, int prescan, int nopeepholes ATTRIBUTE_UNUSED, int *seen) diff --git a/gcc/output.h b/gcc/output.h index 5c9497a3dff6..05a3743726f5 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -68,6 +68,11 @@ extern void final_end_function (void); /* Output assembler code for some insns: all or part of a function. */ extern void final (rtx, FILE *, int, int); +/* The final scan for one insn, INSN. Args are same as in `final', except + that INSN is the insn being scanned. Value returned is the next insn to + be scanned. */ +extern rtx final_scan_insn (rtx, FILE *, int, int, int, int *); + /* Replace a SUBREG with a REG or a MEM, based on the thing it is a subreg of. */ extern rtx alter_subreg (rtx *);