diff options
author | Bernd Schmidt <bernds@cygnus.co.uk> | 1999-08-09 14:00:21 +0000 |
---|---|---|
committer | Bernd Schmidt <crux@gcc.gnu.org> | 1999-08-09 14:00:21 +0000 |
commit | 49ad7cfa7ac804b56cff13d70022020126f24c55 (patch) | |
tree | 0c9ea6c13240638f450e4b7c92af4127356208c0 /gcc/config | |
parent | 0dde4175efc346c70069a8a090590d3e63be04fa (diff) | |
download | gcc-49ad7cfa7ac804b56cff13d70022020126f24c55.zip gcc-49ad7cfa7ac804b56cff13d70022020126f24c55.tar.gz gcc-49ad7cfa7ac804b56cff13d70022020126f24c55.tar.bz2 |
Include function.h in most files.
Include function.h in most files. Remove most of the global variables
duplicated in function.h. Add accessor macros for them which access
current_function. Delete INLINE_HEADER rtx and related code, replace
with code using struct function to store inlining related data.
From-SVN: r28626
Diffstat (limited to 'gcc/config')
46 files changed, 48 insertions, 86 deletions
diff --git a/gcc/config/1750a/1750a.c b/gcc/config/1750a/1750a.c index ff9ae37..789eedb 100644 --- a/gcc/config/1750a/1750a.c +++ b/gcc/config/1750a/1750a.c @@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */ #include <string.h> #include "rtl.h" #include "tree.h" +#include "function.h" #include "expr.h" #define HAVE_cc0 #include "conditions.h" diff --git a/gcc/config/a29k/a29k.c b/gcc/config/a29k/a29k.c index d4483a4..31b1117 100644 --- a/gcc/config/a29k/a29k.c +++ b/gcc/config/a29k/a29k.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-attr.h" #include "flags.h" #include "recog.h" +#include "function.h" #include "expr.h" #include "obstack.h" #include "tree.h" diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 94ed0ba..39b6cef 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "insn-attr.h" #include "flags.h" +#include "function.h" #include "expr.h" #include "recog.h" diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 9df6edc..6eee038 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -699,7 +699,6 @@ extern enum reg_class arc_regno_reg_class[]; varargs function we want to treat the last named arg (which is `__builtin_va_alist') as unnamed. This macro is only used in this file. */ -extern int current_function_varargs; #define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \ ((!current_function_varargs || (NAMED)) \ && (CUM) < MAX_ARC_PARM_REGS \ diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 38c7c58..a5013f9 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "flags.h" #include "reload.h" #include "tree.h" +#include "function.h" #include "expr.h" #include "toplev.h" #include "recog.h" diff --git a/gcc/config/arm/thumb.c b/gcc/config/arm/thumb.c index fa09524..62c4e6a 100644 --- a/gcc/config/arm/thumb.c +++ b/gcc/config/arm/thumb.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-attr.h" #include "flags.h" #include "tree.h" +#include "function.h" #include "expr.h" #include "insn-config.h" #include "recog.h" diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 0071fd5..35bd196 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -37,6 +37,7 @@ #include "insn-flags.h" #include "output.h" #include "tree.h" +#include "function.h" #include "expr.h" #include "flags.h" #include "loop.h" diff --git a/gcc/config/clipper/clipper.c b/gcc/config/clipper/clipper.c index 29fd8e6..b9279ac 100644 --- a/gcc/config/clipper/clipper.c +++ b/gcc/config/clipper/clipper.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-attr.h" #include "tree.h" #include "c-tree.h" +#include "function.h" #include "expr.h" #include "flags.h" #include "machmode.h" diff --git a/gcc/config/convex/convex.c b/gcc/config/convex/convex.c index cd2eb55..1a588e0 100644 --- a/gcc/config/convex/convex.c +++ b/gcc/config/convex/convex.c @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-flags.h" #include "insn-attr.h" #include "output.h" +#include "function.h" #include "expr.h" /* Tables used in convex.h */ diff --git a/gcc/config/elxsi/elxsi.h b/gcc/config/elxsi/elxsi.h index 4bacabdab..b38af88 100644 --- a/gcc/config/elxsi/elxsi.h +++ b/gcc/config/elxsi/elxsi.h @@ -440,10 +440,9 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES }; { register int regno; \ register int cnt = 0; \ extern char call_used_regs[]; \ - extern int current_function_calls_alloca; \ /* this conditional is ONLY here because there is a BUG; \ - EXIT_IGNORE_STACK is ignored itself when the first part of \ - the condition is true! (at least in version 1.35) */ \ + EXIT_IGNORE_STACK is ignored itself when the first part of \ + the condition is true! (at least in version 1.35) */ \ /* the 8*10 is for 64 bits of .r5 - .r14 */ \ if (current_function_calls_alloca || (SIZE)>=(256-8*10)) { \ /* use .r4 as a temporary! Ok for now.... */ \ diff --git a/gcc/config/fx80/fx80.c b/gcc/config/fx80/fx80.c index 4e8f420..48658e2 100644 --- a/gcc/config/fx80/fx80.c +++ b/gcc/config/fx80/fx80.c @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "conditions.h" #include "insn-flags.h" +#include "function.h" #include "output.h" #include "insn-attr.h" diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h index dcfd463..88656d1 100644 --- a/gcc/config/i370/i370.h +++ b/gcc/config/i370/i370.h @@ -43,10 +43,6 @@ extern char *mvs_function_name; extern int mvs_function_name_length; -/* The amount of space used for outgoing arguments. */ - -extern int current_function_outgoing_args_size; - /* Compile using char instructions (mvc, nc, oc, xc). On 4341 use this since these are more than twice as fast as load-op-store. On 3090 don't use this since load-op-store is much faster. */ diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index a5c387a..3b6385a 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1859,8 +1859,6 @@ while (0) #define FINALIZE_PIC \ do \ { \ - extern int current_function_uses_pic_offset_table; \ - \ current_function_uses_pic_offset_table |= profile_flag | profile_block_flag; \ } \ while (0) diff --git a/gcc/config/i860/i860.c b/gcc/config/i860/i860.c index 08e2db7..966c572 100644 --- a/gcc/config/i860/i860.c +++ b/gcc/config/i860/i860.c @@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "recog.h" #include "insn-attr.h" +#include "function.h" #include "expr.h" static rtx find_addr_reg (); diff --git a/gcc/config/m68k/a-ux.h b/gcc/config/m68k/a-ux.h index 69ecb53..229b6ab 100644 --- a/gcc/config/m68k/a-ux.h +++ b/gcc/config/m68k/a-ux.h @@ -150,9 +150,8 @@ crt2.o%s " #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ { \ - extern int current_function_returns_pointer; \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ asm_fprintf (FILE, "\t%s %Ra0,%Rd0\n", ASM_MOV_INSN); \ } diff --git a/gcc/config/m68k/altos3068.h b/gcc/config/m68k/altos3068.h index 5903a12..d68efb4 100644 --- a/gcc/config/m68k/altos3068.h +++ b/gcc/config/m68k/altos3068.h @@ -126,10 +126,9 @@ Boston, MA 02111-1307, USA. */ /* Return pointer values in both d0 and a0. */ #undef FUNCTION_EXTRA_EPILOGUE -#define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ -{ \ - extern int current_function_returns_pointer; \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))\ - fprintf (FILE, "\tmovel d0,a0\n"); \ +#define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ +{ \ + if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + fprintf (FILE, "\tmovel d0,a0\n"); \ } diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index a1a4fff..d100f5c 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -282,11 +282,10 @@ Boston, MA 02111-1307, USA. */ callers that have neglected to properly declare the callee can still find the correct return value. */ -extern int current_function_returns_pointer; #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ do { \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ asm_fprintf (FILE, "\tmove.l %Ra0,%Rd0\n"); \ } while (0); diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 9480309..659c705 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "tree.h" #include "rtl.h" +#include "function.h" #include "regs.h" #include "hard-reg-set.h" #include "real.h" diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h index 9f2744d..6c229b6 100644 --- a/gcc/config/m68k/m68kv4.h +++ b/gcc/config/m68k/m68kv4.h @@ -179,11 +179,10 @@ while (0) neglected to properly declare the callee can still find the correct return value. */ -extern int current_function_returns_pointer; #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ do { \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ asm_fprintf (FILE, "\tmov.l %Ra0,%Rd0\n"); \ } while (0); diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h index e6eadd1..1a4ca6d 100644 --- a/gcc/config/m68k/mot3300.h +++ b/gcc/config/m68k/mot3300.h @@ -145,10 +145,9 @@ Boston, MA 02111-1307, USA. */ #undef FUNCTION_EXTRA_EPILOGUE #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ - { extern int current_function_returns_pointer; \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ - asm_fprintf (FILE, "\tmov.l %Ra0,%Rd0\n"); } +{ if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + asm_fprintf (FILE, "\tmov.l %Ra0,%Rd0\n"); } #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABEL_NO) \ diff --git a/gcc/config/m68k/pbb.h b/gcc/config/m68k/pbb.h index 41319c2..9197ac3 100644 --- a/gcc/config/m68k/pbb.h +++ b/gcc/config/m68k/pbb.h @@ -109,9 +109,8 @@ Boston, MA 02111-1307, USA. */ #undef FUNCTION_EXTRA_EPILOGUE #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ - { extern int current_function_returns_pointer; \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ +{ if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); } #define ASM_RETURN_CASE_JUMP \ diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h index 7b5771a..aeb5478 100644 --- a/gcc/config/m68k/tower-as.h +++ b/gcc/config/m68k/tower-as.h @@ -185,10 +185,9 @@ Boston, MA 02111-1307, USA. */ #undef FUNCTION_EXTRA_EPILOGUE #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ - { extern int current_function_returns_pointer; \ - if ((current_function_returns_pointer) && \ - ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ - asm_fprintf (FILE, "\tmov.l %Rd0,%Ra0\n"); } +{ if (current_function_returns_pointer \ + && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + asm_fprintf (FILE, "\tmov.l %Rd0,%Ra0\n"); } /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index 5d54fdd..b845216 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "insn-attr.h" #include "tree.h" +#include "function.h" #include "c-tree.h" #include "expr.h" #include "flags.h" @@ -1759,11 +1760,6 @@ static int variable_args_p; static int epilogue_marked; static int prologue_marked; -extern char call_used_regs[]; -extern int current_function_pretend_args_size; -extern int current_function_outgoing_args_size; -extern int frame_pointer_needed; - #define FIRST_OCS_PRESERVE_REGISTER 14 #define LAST_OCS_PRESERVE_REGISTER 30 diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h index 0ea0ef6..9c377c4 100644 --- a/gcc/config/m88k/m88k.h +++ b/gcc/config/m88k/m88k.h @@ -155,7 +155,6 @@ extern enum m88k_instruction classify_integer (); extern int target_flags; /* -m compiler switches */ extern int frame_pointer_needed; /* current function has a FP */ -extern int current_function_pretend_args_size; /* args size without ... */ extern int flag_delayed_branch; /* -fdelayed-branch */ extern int flag_pic; /* -fpic */ extern char * reg_names[]; @@ -198,13 +197,13 @@ extern char * reg_names[]; Redefined in sysv4.h, and luna.h. */ #define VERSION_INFO1 "m88k, " #ifndef VERSION_INFO2 -#define VERSION_INFO2 "$Revision: 1.14 $" +#define VERSION_INFO2 "$Revision: 1.15 $" #endif #ifndef VERSION_STRING #define VERSION_STRING version_string #ifdef __STDC__ -#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.14 $ " __DATE__ +#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.15 $ " __DATE__ #else #define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $" #endif /* __STDC__ */ diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 72b02eb..4c61676 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -41,8 +41,8 @@ Boston, MA 02111-1307, USA. */ #include "insn-codes.h" #include "recog.h" #include "toplev.h" - #include "tree.h" +#include "function.h" #include "expr.h" #include "flags.h" #include "reload.h" diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 7886ff1..4592c29 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -27,7 +27,6 @@ Boston, MA 02111-1307, USA. */ extern char *asm_file_name; extern char call_used_regs[]; -extern int current_function_calls_alloca; extern char *language_string; extern int may_call_alloca; extern char **save_argv; diff --git a/gcc/config/mn10200/mn10200.h b/gcc/config/mn10200/mn10200.h index c044c16..c1e8760 100644 --- a/gcc/config/mn10200/mn10200.h +++ b/gcc/config/mn10200/mn10200.h @@ -1069,9 +1069,7 @@ extern void notice_update_cc (); extern int call_address_operand (); extern enum reg_class secondary_reload_class (); extern char *emit_a_shift (); -extern int current_function_needs_context; extern char *output_tst (); extern int extendpsi_operand (); -extern int rtx_equal_function_value_matters; extern struct rtx_def *zero_dreg; extern struct rtx_def *zero_areg; diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h index d409ac2..5e0268c 100644 --- a/gcc/config/ns32k/ns32k.h +++ b/gcc/config/ns32k/ns32k.h @@ -711,7 +711,6 @@ enum reg_class int used_regs_buf[8], *bufp = used_regs_buf; \ int used_fregs_buf[17], *fbufp = used_fregs_buf; \ extern char call_used_regs[]; \ - extern int current_function_uses_pic_offset_table, flag_pic; \ MAIN_FUNCTION_PROLOGUE; \ for (regno = R0_REGNUM; regno < F0_REGNUM; regno++) \ if (regs_ever_live[regno] \ @@ -836,7 +835,6 @@ enum reg_class int used_regs_buf[8], *bufp = used_regs_buf; \ int used_fregs_buf[17], *fbufp = used_fregs_buf; \ extern char call_used_regs[]; \ - extern int current_function_uses_pic_offset_table, flag_pic; \ if (flag_pic && current_function_uses_pic_offset_table) \ fprintf (FILE, "\tlprd sb,tos\n"); \ *fbufp++ = -2; \ @@ -898,7 +896,6 @@ enum reg_class { \ int regno; \ int offset = -4; \ - extern int current_function_uses_pic_offset_table, flag_pic; \ for (regno = 0; regno < L1_REGNUM; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ offset += 4; \ @@ -1196,7 +1193,6 @@ __transfer_from_trampoline () \ #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ { register rtx xfooy, xfoo0, xfoo1; \ unsigned xfoo2; \ - extern int current_function_uses_pic_offset_table, flag_pic; \ xfooy = X; \ if (flag_pic && ! current_function_uses_pic_offset_table \ && global_symbolic_reference_mentioned_p (X, 1)) \ @@ -1240,7 +1236,6 @@ __transfer_from_trampoline () \ when generating PIC code. It is given that flag_pic is on and that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ -extern int current_function_uses_pic_offset_table, flag_pic; #define LEGITIMATE_PIC_OPERAND_P(X) \ (((! current_function_uses_pic_offset_table \ && symbolic_reference_mentioned_p (X))? \ diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 12b28c6..cdf1a4b 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "tree.h" #include "reload.h" #include "c-tree.h" +#include "function.h" #include "expr.h" #include "obstack.h" #include "toplev.h" @@ -2599,7 +2600,6 @@ compute_frame_size (size, fregs_live) int size; int *fregs_live; { - extern int current_function_outgoing_args_size; int i, fsize; /* Space for frame pointer + filler. If any frame is allocated diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 31d04ea..c27fbf0 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1121,7 +1121,6 @@ extern enum cmp_type hppa_branch_type; No definition is equivalent to always zero. */ extern int may_call_alloca; -extern int current_function_pretend_args_size; #define EXIT_IGNORE_STACK \ (get_frame_size () != 0 \ @@ -1138,11 +1137,6 @@ extern int current_function_pretend_args_size; of alloca; we also take advantage of it to omit stack adjustments before returning. */ -/* This declaration is needed due to traditional/ANSI - incompatibilities which cannot be #ifdefed away - because they occur inside of macros. Sigh. */ -extern union tree_node *current_function_decl; - #define FUNCTION_EPILOGUE(FILE, SIZE) \ output_function_epilogue (FILE, SIZE) diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index 291faee..6f3d779 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -136,7 +136,7 @@ do { \ tree parm; \ int i; \ if (TREE_PUBLIC (DECL) || TARGET_GAS) \ - { extern int current_function_varargs; \ + { \ if (TREE_PUBLIC (DECL)) \ { \ fputs ("\t.EXPORT ", FILE); \ diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 2202d4b..ebe76e3 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "conditions.h" #include "insn-flags.h" +#include "function.h" #include "output.h" #include "insn-attr.h" #include "flags.h" diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 0822782..746a8e4 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -684,7 +684,6 @@ maybe ac0 ? - as option someday! */ No definition is equivalent to always zero. */ extern int may_call_alloca; -extern int current_function_pretend_args_size; #define EXIT_IGNORE_STACK 1 diff --git a/gcc/config/pyr/pyr.c b/gcc/config/pyr/pyr.c index 9a2e3bc..eaf0d4b 100644 --- a/gcc/config/pyr/pyr.c +++ b/gcc/config/pyr/pyr.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "insn-attr.h" #include "tree.h" +#include "function.h" /* * Do FUNCTION_ARG. diff --git a/gcc/config/pyr/pyr.h b/gcc/config/pyr/pyr.h index f40d030..e439502 100644 --- a/gcc/config/pyr/pyr.h +++ b/gcc/config/pyr/pyr.h @@ -783,9 +783,6 @@ extern void* pyr_function_arg (); /* This should return non-zero when we really set up a frame pointer. Otherwise, GCC is directed to preserve sp by returning zero. */ -extern int current_function_pretend_args_size; -extern int current_function_args_size; -extern int current_function_calls_alloca; #define EXIT_IGNORE_STACK \ (get_frame_size () + current_function_pretend_args_size \ + current_function_args_size != 0 \ diff --git a/gcc/config/romp/romp.c b/gcc/config/romp/romp.c index 0f64a9e..0b1a2a3 100644 --- a/gcc/config/romp/romp.c +++ b/gcc/config/romp/romp.c @@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */ #include "expr.h" #include "obstack.h" #include "tree.h" +#include "function.h" #define min(A,B) ((A) < (B) ? (A) : (B)) #define max(A,B) ((A) > (B) ? (A) : (B)) diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 12d093c..b6799d9 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ #include "flags.h" #include "insn-flags.h" #include "expr.h" +#include "function.h" #include "regs.h" #include "hard-reg-set.h" #include "output.h" diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 23731ab..949e2e7 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1039,8 +1039,6 @@ struct sh_args { NPARM_REGS words is at least partially passed in a register unless its data type forbids. */ -extern int current_function_varargs; - #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ((PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \ && ((NAMED) \ diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 1d3bbc7..067680b 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "insn-attr.h" #include "flags.h" +#include "function.h" #include "expr.h" #include "recog.h" #include "toplev.h" @@ -2674,7 +2675,7 @@ mem_min_alignment (mem, desired) /* Check if the compiler has recorded some information about the alignment of the base REG. If reload has completed, we already matched with proper alignments. */ - if (((regno_pointer_align != NULL + if (((current_function != 0 && REGNO_POINTER_ALIGN (regno) >= desired) || reload_completed) && ((INTVAL (offset) & (desired - 1)) == 0)) diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index c322378..7fafc4d 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -2009,9 +2009,6 @@ LFLGRET"ID":\n\ functions that have frame pointers. No definition is equivalent to always zero. */ -extern int current_function_calls_alloca; -extern int current_function_outgoing_args_size; - #define EXIT_IGNORE_STACK \ (get_frame_size () != 0 \ || current_function_calls_alloca || current_function_outgoing_args_size) @@ -2026,11 +2023,6 @@ extern int current_function_outgoing_args_size; of alloca; we also take advantage of it to omit stack adjustments before returning. */ -/* This declaration is needed due to traditional/ANSI - incompatibilities which cannot be #ifdefed away - because they occur inside of macros. Sigh. */ -extern union tree_node *current_function_decl; - #define FUNCTION_EPILOGUE(FILE, SIZE) \ (TARGET_FLAT ? sparc_flat_output_function_epilogue (FILE, (int)SIZE) \ : output_function_epilogue (FILE, (int)SIZE, \ diff --git a/gcc/config/spur/spur.h b/gcc/config/spur/spur.h index e6d058a..3ce499e 100644 --- a/gcc/config/spur/spur.h +++ b/gcc/config/spur/spur.h @@ -484,7 +484,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES }; #define FUNCTION_PROLOGUE(FILE, SIZE) \ { \ extern char call_used_regs[]; \ - extern int current_function_pretend_args_size; \ int fsize = ((SIZE) + 7) & ~7; \ int nregs, i, fp_used = 0; \ for (i = 32, nregs = 0; i < FIRST_PSEUDO_REGISTER; i++) \ @@ -534,9 +533,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES }; functions that have frame pointers. No definition is equivalent to always zero. */ -extern int current_function_calls_alloca; -extern int current_function_pretend_args_size; - #define EXIT_IGNORE_STACK \ (get_frame_size () != 0 \ || current_function_calls_alloca || current_function_pretend_args_size) @@ -554,8 +550,6 @@ extern int current_function_pretend_args_size; #define FUNCTION_EPILOGUE(FILE, SIZE) \ { \ extern char call_used_regs[]; \ - extern int current_function_calls_alloca; \ - extern int current_function_pretend_args_size; \ int fsize = ((SIZE) + 7) & ~7; \ int nregs, i, fp_used = 0; \ for (i = 32, nregs = 0; i < FIRST_PSEUDO_REGISTER; i++) \ diff --git a/gcc/config/tahoe/tahoe.c b/gcc/config/tahoe/tahoe.c index 9dd189b..53f77d6 100644 --- a/gcc/config/tahoe/tahoe.c +++ b/gcc/config/tahoe/tahoe.c @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "conditions.h" #include "insn-flags.h" +#include "function.h" #include "output.h" #include "insn-attr.h" diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 15867ac..7222bbb 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -1508,8 +1508,6 @@ compute_frame_size (size, p_reg_saved) int size; long *p_reg_saved; { - extern int current_function_outgoing_args_size; - return (size + compute_register_save_size (p_reg_saved) + current_function_outgoing_args_size); diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index bac442a..4035d6a 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "conditions.h" #include "insn-flags.h" +#include "function.h" #include "output.h" #include "insn-attr.h" #ifdef VMS_TARGET diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h index 35c1665..a430279 100644 --- a/gcc/config/vax/vms.h +++ b/gcc/config/vax/vms.h @@ -94,8 +94,7 @@ Boston, MA 02111-1307, USA. */ * setting of -4 will end up adding them right back again, but don't bother. */ #define MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \ -{ extern char *current_function_name; \ - char *p = current_function_name; \ +{ char *p = current_function_name; \ int is_main = strcmp ("main", p) == 0; \ while (!is_main && *p != '\0') \ { \ diff --git a/gcc/config/we32k/we32k.c b/gcc/config/we32k/we32k.c index 0c02686..e1b58f9 100644 --- a/gcc/config/we32k/we32k.c +++ b/gcc/config/we32k/we32k.c @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include <stdio.h> #include "rtl.h" +#include "function.h" #include "real.h" |