diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-30 07:57:52 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-30 07:57:52 -0500 |
commit | 5a13eaa46a3c90ed92cf02c5fcc0098e301ea715 (patch) | |
tree | aff9461e6ed46c041f8c9d92aea33f93d18ed4c7 /gcc | |
parent | 3668e76e9041960e4ab3c433d8d7c89c4d45bf35 (diff) | |
download | gcc-5a13eaa46a3c90ed92cf02c5fcc0098e301ea715.zip gcc-5a13eaa46a3c90ed92cf02c5fcc0098e301ea715.tar.gz gcc-5a13eaa46a3c90ed92cf02c5fcc0098e301ea715.tar.bz2 |
Include output.h.
Add prototyes for all static functions; remove forward declarations of
non-static functions.
(assemble_variable): Add missing arg decl.
(bc_make_decl_rtl, const_hash, const_hash_rtx): Now static.
(output_addressed_constants, output_constructor): Likewise.
(bc_output_constructor): Add missing argument.
(output_byte_asm): Delete, unused.
From-SVN: r8709
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/varasm.c | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 89a0d24..a89de1a 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -34,6 +34,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "flags.h" #include "function.h" #include "expr.h" +#include "output.h" #include "hard-reg-set.h" #include "regs.h" #include "defaults.h" @@ -98,25 +99,35 @@ tree last_assemble_variable_decl; /* Nonzero if at least one function definition has been seen. */ static int function_defined; -extern FILE *asm_out_file; - -static char *compare_constant_1 (); -static void record_constant_1 (); -static void output_constant_def_contents (); -static int contains_pointers_p (); -static void bc_output_ascii (); - -void output_constant_pool (); -void assemble_name (); -int output_addressed_constants (); -void output_constant (); -void output_constructor (); -void output_byte_asm (); -void text_section (); -void readonly_data_section (); -void data_section (); -void named_section (); -static void bc_assemble_integer (); +struct addr_const; +struct constant_descriptor; +struct rtx_const; +struct pool_constant; + +static void bc_make_decl_rtl PROTO((tree, char *, int)); +static char *strip_reg_name PROTO((char *)); +static void bc_output_ascii PROTO((FILE *, char *, int)); +static int contains_pointers_p PROTO((tree)); +static void decode_addr_const PROTO((tree, struct addr_const *)); +static int const_hash PROTO((tree)); +static int compare_constant PROTO((tree, + struct constant_descriptor *)); +static char *compare_constant_1 PROTO((tree, char *)); +static struct constant_descriptor *record_constant PROTO((tree)); +static void record_constant_1 PROTO((tree)); +static tree copy_constant PROTO((tree)); +static void output_constant_def_contents PROTO((tree, int, int)); +static void decode_rtx_const PROTO((enum machine_mode, rtx, + struct rtx_const *)); +static int const_hash_rtx PROTO((enum machine_mode, rtx)); +static int compare_constant_rtx PROTO((enum machine_mode, rtx, + struct constant_descriptor *)); +static struct constant_descriptor *record_constant_rtx PROTO((enum machine_mode, + rtx)); +static struct pool_constant *find_pool_constant PROTO((rtx)); +static int output_addressed_constants PROTO((tree)); +static void bc_assemble_integer PROTO((tree, int)); +static void output_constructor PROTO((tree, int)); #ifdef EXTRA_SECTIONS static enum in_section {no_section, in_text, in_data, in_named, EXTRA_SECTIONS} in_section @@ -291,7 +302,8 @@ make_function_rtl (decl) as the assembler symbol name. TOP_LEVEL is nonzero if this is a file-scope variable. This is never called for PARM_DECLs. */ -void + +static void bc_make_decl_rtl (decl, asmspec, top_level) tree decl; char *asmspec; @@ -913,6 +925,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data) tree decl; int top_level; int at_end; + int dont_output_data; { register char *name; int align; @@ -1370,8 +1383,9 @@ contains_pointers_p (type) /* Output text storage for constructor CONSTR. */ void -bc_output_constructor (constr) - tree constr; +bc_output_constructor (constr, size) + tree constr; + int size; { int i; @@ -1385,15 +1399,16 @@ bc_output_constructor (constr) text_section (); /* Align */ - for (i = 0; TYPE_ALIGN (constr) >= BITS_PER_UNIT << (i + 1); i++); + for (i = 0; TYPE_ALIGN (constr) >= BITS_PER_UNIT << (i + 1); i++) + ; + if (i > 0) BC_OUTPUT_ALIGN (asm_out_file, i); /* Output data */ - output_constant (constr, int_size_in_bytes (TREE_TYPE (constr))); + output_constant (constr, size); } - /* Create storage for constructor CONSTR. */ void @@ -1414,7 +1429,6 @@ bc_output_data_constructor (constr) BC_OUTPUT_SKIP (asm_out_file, int_size_in_bytes (TREE_TYPE (constr))); } - /* Output something to declare an external symbol to the assembler. (Most assemblers don't need this, so we normally output nothing.) Do nothing if DECL is not external. */ @@ -2098,7 +2112,7 @@ static struct constant_descriptor *const_hash_table[MAX_HASH_TABLE]; /* Compute a hash code for a constant expression. */ -int +static int const_hash (exp) tree exp; { @@ -2803,7 +2817,7 @@ init_const_rtx_hash_table () pool_offset = 0; } -/* Save and restore it for a nested function. */ +/* Save and restore status for a nested function. */ void save_varasm_status (p) @@ -2941,7 +2955,7 @@ simplify_subtraction (x) /* Compute a hash code for a constant RTL expression. */ -int +static int const_hash_rtx (mode, x) enum machine_mode mode; rtx x; @@ -3291,7 +3305,7 @@ output_constant_pool (fnname, fndecl) and make sure assembler code with a label has been output for each one. Indicate whether an ADDR_EXPR has been encountered. */ -int +static int output_addressed_constants (exp) tree exp; { @@ -3343,22 +3357,6 @@ output_addressed_constants (exp) } return reloc; } - - -/* Output assembler for byte constant */ -void -output_byte_asm (byte) - int byte; -{ - if (output_bytecode) - bc_emit_const ((char *) &byte, sizeof (char)); -#ifdef ASM_OUTPUT_BYTE - else - { - ASM_OUTPUT_BYTE (asm_out_file, byte); - } -#endif -} /* Output assembler code for constant EXP to FILE, with no label. This includes the pseudo-op such as ".int" or ".byte", and a newline. @@ -3483,8 +3481,8 @@ output_constant (exp, size) assemble_zeros (size); } - /* Bytecode specific code to output assembler for integer. */ + static void bc_assemble_integer (exp, size) tree exp; @@ -3585,7 +3583,7 @@ bc_assemble_integer (exp, size) (aggregate constants). Generate at least SIZE bytes, padding if necessary. */ -void +static void output_constructor (exp, size) tree exp; int size; |