summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-23 17:46:23 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-23 17:46:23 +0000
commit9721bc378d10725644fe816610c9ad5b45c1d267 (patch)
tree6a3e5c955ee1b31c47bf9bb630cdff3bb0a31f0e /gcc
parent3b35d060e01b3ec84ae661ef7206700d4ebc14df (diff)
downloadgcc-9721bc378d10725644fe816610c9ad5b45c1d267.tar.gz
* abi64.h (mips_function_value): Add prototype arguments.
* mips-protos.h: New file with mips prototypes. * mips.c: Include "tm_p.h". (mktemp, lookup_name): Add prototype arguments. (extern_list, string_constant, mips_fill_delay_slot, mips_output_external, mips_output_external_libcall, mips_output_filename, mips_declare_object, function_prologue, mips_expand_prologue, function_epilogue, mips16_constant, build_mips16_function_stub, mips_output_conditional_branch): Constify a char*. (mips_va_start): Remove unused variable `u'. (mips_va_arg): Cast value to unsigned when comparing against one. (trace): Delete. (save_restore_insns, mips_expand_prologue): Add missing arg in call to `large_int'. * mips.h: Move prototypes to mips-protos.h. (data_section, memory_address_p, rdata_section, readonly_data_section, simple_epilogue_p, text_section): Delete prototypes delcared elsewhere. (mips_epilogue_delay_slots, print_options): Delete unused decls. (trace): Delete. (GO_PRINTF, GO_PRINTF2): Call fprintf, not trace. * mips.md: Delete extra args in call to `mips_move_2words'. * xm-iris6.h (alloca): Add prototype argument. * genpeep.c: Include "tm_p.h" in generated output file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog34
-rw-r--r--gcc/config/mips/abi64.h5
-rw-r--r--gcc/config/mips/mips-protos.h154
-rw-r--r--gcc/config/mips/mips.c79
-rw-r--r--gcc/config/mips/mips.h139
-rw-r--r--gcc/config/mips/mips.md4
-rw-r--r--gcc/config/mips/xm-iris6.h4
-rw-r--r--gcc/genpeep.c1
8 files changed, 239 insertions, 181 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90424740f04..b36356b8560 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,37 @@
+Thu Sep 23 13:40:23 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * abi64.h (mips_function_value): Add prototype arguments.
+
+ * mips-protos.h: New file with mips prototypes.
+
+ * mips.c: Include "tm_p.h".
+ (mktemp, lookup_name): Add prototype arguments.
+ (extern_list, string_constant, mips_fill_delay_slot,
+ mips_output_external, mips_output_external_libcall,
+ mips_output_filename, mips_declare_object, function_prologue,
+ mips_expand_prologue, function_epilogue, mips16_constant,
+ build_mips16_function_stub, mips_output_conditional_branch):
+ Constify a char*.
+ (mips_va_start): Remove unused variable `u'.
+ (mips_va_arg): Cast value to unsigned when comparing against one.
+ (trace): Delete.
+ (save_restore_insns, mips_expand_prologue): Add missing arg in
+ call to `large_int'.
+
+ * mips.h: Move prototypes to mips-protos.h.
+ (data_section, memory_address_p, rdata_section,
+ readonly_data_section, simple_epilogue_p, text_section): Delete
+ prototypes delcared elsewhere.
+ (mips_epilogue_delay_slots, print_options): Delete unused decls.
+ (trace): Delete.
+ (GO_PRINTF, GO_PRINTF2): Call fprintf, not trace.
+
+ * mips.md: Delete extra args in call to `mips_move_2words'.
+
+ * xm-iris6.h (alloca): Add prototype argument.
+
+ * genpeep.c: Include "tm_p.h" in generated output file.
+
Thu Sep 23 10:36:55 EDT 1999 Andrew MacLeod <amacleod@cygnus.com>
* basic-block.h (find_edge_index): Change parameters.
diff --git a/gcc/config/mips/abi64.h b/gcc/config/mips/abi64.h
index 3e4447e5bdd..e74e2f4b32d 100644
--- a/gcc/config/mips/abi64.h
+++ b/gcc/config/mips/abi64.h
@@ -93,7 +93,10 @@ Boston, MA 02111-1307, USA. */
: (int_size_in_bytes (TYPE) \
> (mips_abi == ABI_EABI ? 2 * UNITS_PER_WORD : 16)))
-extern struct rtx_def *mips_function_value ();
+#ifdef ANSI_PROTOTYPES
+union tree_node;
+#endif
+extern struct rtx_def *mips_function_value PARAMS ((union tree_node *, union tree_node *));
#undef FUNCTION_VALUE
#define FUNCTION_VALUE(VALTYPE, FUNC) mips_function_value (VALTYPE, FUNC)
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
new file mode 100644
index 00000000000..72129d350c5
--- /dev/null
+++ b/gcc/config/mips/mips-protos.h
@@ -0,0 +1,154 @@
+/* Prototypes of target machine for GNU compiler. MIPS version.
+ Copyright (C) 1989, 90-98, 1999 Free Software Foundation, Inc.
+ Contributed by A. Lichnewsky (lich@inria.inria.fr).
+ Changed by Michael Meissner (meissner@osf.org).
+ 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
+ Brendan Eich (brendan@microunity.com).
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifndef __MIPS_PROTOS_H__
+#define __MIPS_PROTOS_H__
+
+extern HOST_WIDE_INT compute_frame_size PARAMS ((HOST_WIDE_INT));
+extern void function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+extern void function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
+extern void mips_asm_file_end PARAMS ((FILE *));
+extern void mips_asm_file_start PARAMS ((FILE *));
+extern int mips_can_use_return_insn PARAMS ((void));
+extern void mips_declare_object PARAMS ((FILE *, const char *, const char *, const char *, int));
+extern void mips_expand_epilogue PARAMS ((void));
+extern void mips_expand_prologue PARAMS ((void));
+#ifdef REAL_VALUE_TYPE
+extern void mips_output_double PARAMS ((FILE *, REAL_VALUE_TYPE));
+extern void mips_output_float PARAMS ((FILE *, REAL_VALUE_TYPE));
+#endif /* REAL_VALUE_TYPE */
+extern void mips_output_filename PARAMS ((FILE *, const char *));
+extern void mips_output_lineno PARAMS ((FILE *, int));
+extern void mips_order_regs_for_local_alloc PARAMS ((void));
+extern struct rtx_def * mips16_gp_pseudo_reg PARAMS ((void));
+#ifdef ASM_OUTPUT_UNDEF_FUNCTION
+extern int mips_output_external_libcall PARAMS ((FILE *, const char *));
+#endif /* ASM_OUTPUT_UNDEF_FUNCTION */
+
+
+#ifdef TREE_CODE
+extern struct rtx_def * function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
+extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
+extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
+extern int function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
+extern int mips16_constant_after_function_p PARAMS ((tree));
+extern int mips_output_external PARAMS ((FILE *, tree, const char *));
+extern tree mips_build_va_list PARAMS ((void));
+#ifdef RTX_CODE
+extern void mips_va_start PARAMS ((int, tree, rtx));
+#endif /* RTX_CODE */
+extern struct rtx_def *mips_va_arg PARAMS ((tree, tree));
+extern void mips_select_section PARAMS ((tree, int));
+#endif /* TREE_CODE */
+
+#ifdef RTX_CODE
+extern int arith32_operand PARAMS ((rtx, enum machine_mode));
+extern int arith_operand PARAMS ((rtx, enum machine_mode));
+extern int cmp_op PARAMS ((rtx, enum machine_mode));
+extern int const_float_1_operand PARAMS ((rtx, enum machine_mode));
+extern void expand_block_move PARAMS ((rtx []));
+extern int equality_op PARAMS ((rtx, enum machine_mode));
+extern void final_prescan_insn PARAMS ((rtx, rtx [], int));
+extern struct rtx_def * gen_int_relational PARAMS ((enum rtx_code, rtx, rtx, rtx,int *));
+#ifdef TREE_CODE
+extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *c, tree, rtx));
+#endif /* TREE_CODE */
+extern void gen_conditional_branch PARAMS ((rtx[], enum rtx_code));
+extern void gen_conditional_move PARAMS ((rtx *));
+extern int large_int PARAMS ((rtx, enum machine_mode));
+extern void machine_dependent_reorg PARAMS ((rtx));
+extern int mips_address_cost PARAMS ((rtx));
+extern int mips_const_double_ok PARAMS ((rtx, enum machine_mode));
+extern void mips_count_memory_refs PARAMS ((rtx, int));
+extern HOST_WIDE_INT mips_debugger_offset PARAMS ((rtx, HOST_WIDE_INT));
+extern int mips_check_split PARAMS ((rtx, enum machine_mode));
+extern const char *mips_fill_delay_slot PARAMS ((const char *, enum delay_type, rtx[], rtx));
+extern const char *mips_move_1word PARAMS ((rtx[], rtx, int));
+extern const char *mips_move_2words PARAMS ((rtx[], rtx));
+extern const char *output_block_move PARAMS ((rtx, rtx[], int, enum block_move_type));
+extern void override_options PARAMS ((void));
+extern int pc_or_label_operand PARAMS ((rtx, enum machine_mode));
+extern void print_operand_address PARAMS ((FILE *, rtx));
+extern void print_operand PARAMS ((FILE *, rtx, int));
+extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode));
+extern int true_reg_or_0_operand PARAMS ((rtx, enum machine_mode));
+extern int simple_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int double_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int small_int PARAMS ((rtx, enum machine_mode));
+extern int uns_arith_operand PARAMS ((rtx, enum machine_mode));
+extern struct rtx_def * embedded_pic_offset PARAMS ((rtx));
+extern struct rtx_def * mips16_gp_offset PARAMS ((rtx));
+extern int mips16_gp_offset_p PARAMS ((rtx));
+extern int mips16_constant PARAMS ((rtx, enum machine_mode, int, int));
+extern int build_mips16_call_stub PARAMS ((rtx, rtx, rtx, int));
+extern char *mips_output_conditional_branch PARAMS ((rtx, rtx *, int, int, int, int));
+extern int mips_adjust_insn_length PARAMS ((rtx, int));
+extern enum reg_class mips_secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx, int));
+extern void mips_select_rtx_section PARAMS ((enum machine_mode, rtx));
+
+/* Recognition functions that return if a condition is true. */
+extern int address_operand PARAMS ((rtx, enum machine_mode));
+extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
+extern int const_double_operand PARAMS ((rtx, enum machine_mode));
+extern int const_int_operand PARAMS ((rtx, enum machine_mode));
+extern int consttable_operand PARAMS ((rtx, enum machine_mode));
+extern int general_operand PARAMS ((rtx, enum machine_mode));
+extern int immediate_operand PARAMS ((rtx, enum machine_mode));
+extern int memory_operand PARAMS ((rtx, enum machine_mode));
+extern int nonimmediate_operand PARAMS ((rtx, enum machine_mode));
+extern int nonmemory_operand PARAMS ((rtx, enum machine_mode));
+extern int pic_address_needs_scratch PARAMS ((rtx));
+extern int register_operand PARAMS ((rtx, enum machine_mode));
+extern int scratch_operand PARAMS ((rtx, enum machine_mode));
+extern int move_operand PARAMS ((rtx, enum machine_mode));
+extern int movdi_operand PARAMS ((rtx, enum machine_mode));
+extern int se_register_operand PARAMS ((rtx, enum machine_mode));
+extern int se_reg_or_0_operand PARAMS ((rtx, enum machine_mode));
+extern int se_uns_arith_operand PARAMS ((rtx, enum machine_mode));
+extern int se_arith_operand PARAMS ((rtx, enum machine_mode));
+extern int se_nonmemory_operand PARAMS ((rtx, enum machine_mode));
+extern int se_nonimmediate_operand PARAMS ((rtx, enum machine_mode));
+extern int extend_operator PARAMS ((rtx, enum machine_mode));
+extern int highpart_shift_operator PARAMS ((rtx, enum machine_mode));
+extern int m16_uimm3_b PARAMS ((rtx, enum machine_mode));
+extern int m16_simm4_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_nsimm4_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_simm5_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_nsimm5_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_uimm5_4 PARAMS ((rtx, enum machine_mode));
+extern int m16_nuimm5_4 PARAMS ((rtx, enum machine_mode));
+extern int m16_simm8_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_nsimm8_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_uimm8_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_nuimm8_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_uimm8_m1_1 PARAMS ((rtx, enum machine_mode));
+extern int m16_uimm8_4 PARAMS ((rtx, enum machine_mode));
+extern int m16_nuimm8_4 PARAMS ((rtx, enum machine_mode));
+extern int m16_simm8_8 PARAMS ((rtx, enum machine_mode));
+extern int m16_nsimm8_8 PARAMS ((rtx, enum machine_mode));
+extern int m16_usym8_4 PARAMS ((rtx, enum machine_mode));
+extern int m16_usym5_4 PARAMS ((rtx, enum machine_mode));
+#endif /* RTX_CODE */
+
+#endif /* __MIPS_PROTOS_H__ */
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 2914220af3c..a5792059c4f 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "reload.h"
#include "output.h"
+#include "tm_p.h"
#include "ggc.h"
#if defined(USG) || !defined(HAVE_STAB_H)
@@ -62,8 +63,8 @@ Boston, MA 02111-1307, USA. */
#define STAB_CODE_TYPE int
#endif
-extern char *mktemp ();
-extern tree lookup_name ();
+extern char *mktemp PARAMS ((char *));
+extern tree lookup_name PARAMS ((tree));
/* Enumeration for all of the relational tests, so that we can build
arrays indexed by the test type, and not worry about the order
@@ -145,7 +146,7 @@ FILE *asm_out_text_file;
struct extern_list
{
struct extern_list *next; /* next external */
- char *name; /* name of the external */
+ const char *name; /* name of the external */
int size; /* size in bytes */
} *extern_head = 0;
@@ -289,7 +290,7 @@ rtx mips16_gp_pseudo_rtx;
struct string_constant
{
struct string_constant *next;
- char *label;
+ const char *label;
};
static struct string_constant *string_constants;
@@ -1425,9 +1426,9 @@ m16_usym5_4 (op, mode)
/* ??? This function no longer does anything useful, because final_prescan_insn
now will never emit a nop. */
-char *
+const char *
mips_fill_delay_slot (ret, type, operands, cur_insn)
- char *ret; /* normal string to return */
+ const char *ret; /* normal string to return */
enum delay_type type; /* type of delay */
rtx operands[]; /* operands to use */
rtx cur_insn; /* current insn */
@@ -4033,7 +4034,7 @@ mips_va_start (stdarg_p, valist, nextarg)
rtx nextarg;
{
int arg_words, fp_arg_words;
- tree t, u;
+ tree t;
arg_words = current_function_args_info.arg_words;
fp_arg_words = current_function_args_info.fp_arg_words;
@@ -4196,7 +4197,7 @@ mips_va_arg (valist, type)
if (! indirect
&& ! TARGET_64BIT
- && TYPE_ALIGN (type) > BITS_PER_WORD)
+ && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD)
{
t = build (PLUS_EXPR, TREE_TYPE (gpr), gpr,
build_int_2 (2*UNITS_PER_WORD - 1, 0));
@@ -4266,16 +4267,6 @@ abort_with_insn (insn, reason)
debug_rtx (insn);
abort ();
}
-
-/* Write a message to stderr (for use in macros expanded in files that do not
- include stdio.h). */
-
-void
-trace (s, s1, s2)
- char *s, *s1, *s2;
-{
- fprintf (stderr, s, s1, s2);
-}
/* Set up the threshold for data to go into the small data area, instead
of the normal data area, and detect any conflicts in the switches. */
@@ -5318,7 +5309,7 @@ int
mips_output_external (file, decl, name)
FILE *file ATTRIBUTE_UNUSED;
tree decl;
- char *name;
+ const char *name;
{
register struct extern_list *p;
int len;
@@ -5362,7 +5353,7 @@ mips_output_external (file, decl, name)
int
mips_output_external_libcall (file, name)
FILE *file;
- char *name;
+ const char *name;
{
register struct extern_list *p;
@@ -5436,7 +5427,7 @@ make_temp_file ()
void
mips_output_filename (stream, name)
FILE *stream;
- char *name;
+ const char *name;
{
static int first_time = 1;
char ltext_label_name[100];
@@ -5692,9 +5683,9 @@ mips_asm_file_end (file)
void
mips_declare_object (stream, name, init_string, final_string, size)
FILE *stream;
- char *name;
- char *init_string;
- char *final_string;
+ const char *name;
+ const char *init_string;
+ const char *final_string;
int size;
{
fputs (init_string, stream); /* "", "\t.comm\t", or "\t.lcomm\t" */
@@ -6081,7 +6072,7 @@ save_restore_insns (store_p, large_reg, large_offset, file)
split. */
/* ??? There is no DImode ori immediate pattern, so we can only
do this for 32 bit code. */
- if (large_int (gp_offset_rtx)
+ if (large_int (gp_offset_rtx, GET_MODE (gp_offset_rtx))
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
@@ -6299,7 +6290,7 @@ save_restore_insns (store_p, large_reg, large_offset, file)
split. */
/* ??? There is no DImode ori immediate pattern, so we can only
do this for 32 bit code. */
- if (large_int (fp_offset_rtx)
+ if (large_int (fp_offset_rtx, GET_MODE (fp_offset_rtx))
&& GET_MODE (base_reg_rtx) == SImode)
{
insn = emit_move_insn (base_reg_rtx,
@@ -6393,7 +6384,7 @@ function_prologue (file, size)
int size ATTRIBUTE_UNUSED;
{
#ifndef FUNCTION_NAME_ALREADY_DECLARED
- char *fnname;
+ const char *fnname;
#endif
long tsize = current_frame_info.total_size;
@@ -6577,7 +6568,7 @@ function_prologue (file, size)
if (TARGET_ABICALLS && (mips_abi == ABI_32 || mips_abi == ABI_O64))
{
- char *sp_str = reg_names[STACK_POINTER_REGNUM];
+ const char *const sp_str = reg_names[STACK_POINTER_REGNUM];
fprintf (file, "\t.set\tnoreorder\n\t.cpload\t%s\n\t.set\treorder\n",
reg_names[PIC_FUNCTION_ADDR_REGNUM]);
@@ -6602,7 +6593,7 @@ mips_expand_prologue ()
int regno;
HOST_WIDE_INT tsize;
rtx tmp_rtx = 0;
- char *arg_name = 0;
+ const char *arg_name = 0;
tree fndecl = current_function_decl;
tree fntype = TREE_TYPE (fndecl);
tree fnargs = DECL_ARGUMENTS (fndecl);
@@ -6830,7 +6821,8 @@ mips_expand_prologue ()
split. */
/* ??? There is no DImode ori immediate pattern, so we can only
do this for 32 bit code. */
- if (large_int (tsize_rtx) && GET_MODE (tmp_rtx) == SImode)
+ if (large_int (tsize_rtx, GET_MODE (tsize_rtx))
+ && GET_MODE (tmp_rtx) == SImode)
{
insn = emit_move_insn (tmp_rtx,
GEN_INT (tsize & 0xffff0000));
@@ -6960,7 +6952,7 @@ function_epilogue (file, size)
FILE *file ATTRIBUTE_UNUSED;
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{
- char *fnname;
+ const char *fnname;
#ifndef FUNCTION_NAME_ALREADY_DECLARED
/* Get the function name the same way that toplev.c does before calling
@@ -6981,7 +6973,7 @@ function_epilogue (file, size)
int num_gp_regs = current_frame_info.gp_reg_size / 4;
int num_fp_regs = current_frame_info.fp_reg_size / 8;
int num_regs = num_gp_regs + num_fp_regs;
- char *name = fnname;
+ const char *name = fnname;
if (name[0] == '*')
name++;
@@ -7803,7 +7795,7 @@ mips16_constant (x, mode, addr, addend)
ASM_GENERATE_INTERNAL_LABEL as called by output_constant_def. */
if (SYMBOL_REF_FLAG (x))
{
- char *name = XSTR (x, 0);
+ const char *name = XSTR (x, 0);
return (name[0] == '*'
&& strncmp (name + 1, LOCAL_LABEL_PREFIX,
@@ -7902,7 +7894,7 @@ static void
build_mips16_function_stub (file)
FILE *file;
{
- char *fnname;
+ const char *fnname;
char *secname, *stubname;
tree stubid, stubdecl;
int need_comma;
@@ -8014,7 +8006,8 @@ build_mips16_call_stub (retval, fnmem, arg_size, fp_code)
{
int fpret;
rtx fn;
- char *fnname, *secname, *stubname;
+ const char *fnname;
+ char *secname, *stubname;
struct mips16_stub *l;
tree stubid, stubdecl;
int need_comma;
@@ -8958,15 +8951,15 @@ mips_output_conditional_branch (insn,
int need_z_p;
/* A string to use in the assembly output to represent the first
operand. */
- char *op1 = "%z2";
+ const char *op1 = "%z2";
/* A string to use in the assembly output to represent the second
operand. Use the hard-wired zero register if there's no second
operand. */
- char *op2 = (two_operands_p ? ",%z3" : ",%.");
+ const char *op2 = (two_operands_p ? ",%z3" : ",%.");
/* The operand-printing string for the comparison. */
- char *comp = (float_p ? "%F0" : "%C0");
+ const char *comp = (float_p ? "%F0" : "%C0");
/* The operand-printing string for the inverted comparison. */
- char *inverted_comp = (float_p ? "%W0" : "%N0");
+ const char *inverted_comp = (float_p ? "%W0" : "%N0");
/* The MIPS processors (for levels of the ISA at least two), have
"likely" variants of each branch instruction. These instructions
@@ -9067,7 +9060,7 @@ mips_output_conditional_branch (insn,
would otherwise; that way we skip the annulled instruction
in the delay slot. */
- char *target
+ const char *target
= ((mips_branch_likely || length == 16) ? ".+16" : ".+12");
char *c;
@@ -9144,10 +9137,10 @@ mips_output_conditional_branch (insn,
anything. */
/* The target of the reversed branch. */
- char *target
+ const char *target
= ((mips_branch_likely || length == 20) ? ".+20" : ".+16");
- char *at_register = mips_reg_names[ASSEMBLER_SCRATCH_REGNUM];
- char *gp_register = mips_reg_names[PIC_OFFSET_TABLE_REGNUM];
+ const char *at_register = mips_reg_names[ASSEMBLER_SCRATCH_REGNUM];
+ const char *gp_register = mips_reg_names[PIC_OFFSET_TABLE_REGNUM];
char *c;
strcpy (buffer, "%(%<%[");
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 61a1dfe61c1..af23615ef50 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -160,132 +160,9 @@ extern struct rtx_def *embedded_pic_fnaddr_rtx; /* function address */
extern int mips_string_length; /* length of strings for mips16 */
extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */
-/* Functions within mips.c that we reference. Some of these return
- type HOST_WIDE_INT, so define that here. */
-
-#include "hwint.h"
-
-extern int arith32_operand ();
-extern int arith_operand ();
-extern int cmp_op ();
-#ifdef HOST_WIDE_INT
-extern HOST_WIDE_INT compute_frame_size ();
-#endif
-extern int const_float_1_operand ();
-extern void expand_block_move ();
-extern int equality_op ();
-extern void final_prescan_insn ();
-extern struct rtx_def * function_arg ();
-extern void function_arg_advance ();
-extern int function_arg_partial_nregs ();
-extern int function_arg_pass_by_reference ();
-extern void function_epilogue ();
-extern void function_prologue ();
-extern void gen_conditional_branch ();
-extern void gen_conditional_move ();
-extern struct rtx_def * gen_int_relational ();
-extern void init_cumulative_args ();
-extern int large_int ();
-extern void machine_dependent_reorg ();
-extern int mips_address_cost ();
-extern void mips_asm_file_end ();
-extern void mips_asm_file_start ();
-extern int mips_can_use_return_insn ();
-extern int mips_const_double_ok ();
-extern void mips_count_memory_refs ();
-#ifdef HOST_WIDE_INT
-extern HOST_WIDE_INT mips_debugger_offset ();
-#endif
-extern void mips_declare_object ();
-extern int mips_epilogue_delay_slots ();
-extern void mips_expand_epilogue ();
-extern void mips_expand_prologue ();
-extern int mips_check_split ();
-extern char *mips_fill_delay_slot ();
-extern const char *mips_move_1word ();
-extern const char *mips_move_2words ();
-extern void mips_output_double ();
-extern int mips_output_external ();
-extern void mips_output_float ();
-extern void mips_output_filename ();
-extern void mips_output_lineno ();
-extern const char *output_block_move ();
-extern void override_options ();
-extern int pc_or_label_operand ();
-extern void print_operand_address ();
-extern void print_operand ();
-extern void print_options ();
-extern int reg_or_0_operand ();
-extern int true_reg_or_0_operand ();
-extern int simple_epilogue_p ();
-extern int simple_memory_operand ();
-extern int double_memory_operand ();
-extern int small_int ();
-extern void trace ();
-extern int uns_arith_operand ();
-extern struct rtx_def * embedded_pic_offset ();
-extern void mips_order_regs_for_local_alloc ();
-extern struct rtx_def * mips16_gp_pseudo_reg ();
-extern struct rtx_def * mips16_gp_offset ();
-extern int mips16_gp_offset_p ();
-extern int mips16_constant ();
-extern int mips16_constant_after_function_p ();
-extern int build_mips16_call_stub ();
-extern char *mips_output_conditional_branch ();
-extern int mips_adjust_insn_length ();
-
-/* Recognition functions that return if a condition is true. */
-extern int address_operand ();
-extern int call_insn_operand ();
-extern int const_double_operand ();
-extern int const_int_operand ();
-extern int consttable_operand ();
-extern int general_operand ();
-extern int immediate_operand ();
-extern int memory_address_p ();
-extern int memory_operand ();
-extern int nonimmediate_operand ();
-extern int nonmemory_operand ();
-extern int pic_address_needs_scratch ();
-extern int register_operand ();
-extern int scratch_operand ();
-extern int move_operand ();
-extern int movdi_operand ();
-extern int se_register_operand ();
-extern int se_reg_or_0_operand ();
-extern int se_uns_arith_operand ();
-extern int se_arith_operand ();
-extern int se_nonmemory_operand ();
-extern int se_nonimmediate_operand ();
-extern int extend_operator ();
-extern int highpart_shift_operator ();
-extern int m16_uimm3_b ();
-extern int m16_simm4_1 ();
-extern int m16_nsimm4_1 ();
-extern int m16_simm5_1 ();
-extern int m16_nsimm5_1 ();
-extern int m16_uimm5_4 ();
-extern int m16_nuimm5_4 ();
-extern int m16_simm8_1 ();
-extern int m16_nsimm8_1 ();
-extern int m16_uimm8_1 ();
-extern int m16_nuimm8_1 ();
-extern int m16_uimm8_m1_1 ();
-extern int m16_uimm8_4 ();
-extern int m16_nuimm8_4 ();
-extern int m16_simm8_8 ();
-extern int m16_nsimm8_8 ();
-extern int m16_usym8_4 ();
-extern int m16_usym5_4 ();
-
/* Functions to change what output section we are using. */
-extern void data_section ();
-extern void rdata_section ();
-extern void readonly_data_section ();
-extern void sdata_section ();
-extern void text_section ();
-extern void mips_select_rtx_section ();
-extern void mips_select_section ();
+extern void rdata_section PARAMS ((void));
+extern void sdata_section PARAMS ((void));
/* Stubs for half-pic support if not OSF/1 reference platform. */
@@ -2072,10 +1949,6 @@ extern enum reg_class mips_char_to_class[];
#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \
mips_secondary_reload_class (CLASS, MODE, X, 0)
-/* Not declared above, with the other functions, because enum
- reg_class is not declared yet. */
-extern enum reg_class mips_secondary_reload_class ();
-
/* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS. */
@@ -2623,10 +2496,6 @@ typedef struct mips_args {
/* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
mips_va_arg (valist, type)
-
-extern union tree_node *mips_build_va_list ();
-extern void mips_va_start ();
-extern struct rtx_def *mips_va_arg ();
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
@@ -2861,8 +2730,8 @@ extern struct rtx_def *mips_va_arg ();
the `symbol_ref' in order to determine the section. */
#if 1
-#define GO_PRINTF(x) trace(x)
-#define GO_PRINTF2(x,y) trace(x,y)
+#define GO_PRINTF(x) fprintf(stderr, (x))
+#define GO_PRINTF2(x,y) fprintf(stderr, (x), (y))
#define GO_DEBUG_RTX(x) debug_rtx(x)
#else
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index d6e533b1164..c269bcd787e 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -4140,7 +4140,7 @@ move\\t%0,%z4\\n\\
xoperands[0] = operands[0];
xoperands[1] = operands[2];
- output_asm_insn (mips_move_2words (xoperands, insn, FALSE), xoperands);
+ output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
return \"\";
}"
[(set_attr "type" "fcvt")
@@ -4167,7 +4167,7 @@ move\\t%0,%z4\\n\\
xoperands[0] = operands[0];
xoperands[1] = operands[2];
- output_asm_insn (mips_move_2words (xoperands, insn, FALSE), xoperands);
+ output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
return \"\";
}"
[(set_attr "type" "fcvt")
diff --git a/gcc/config/mips/xm-iris6.h b/gcc/config/mips/xm-iris6.h
index 4d429c72edc..d42089f08ae 100644
--- a/gcc/config/mips/xm-iris6.h
+++ b/gcc/config/mips/xm-iris6.h
@@ -2,7 +2,11 @@
#ifndef __GNUC__
#include <alloca.h>
#else
+# ifdef __SIZE_TYPE__
+extern void *alloca (__SIZE_TYPE__);
+# else
extern void *alloca ();
+# endif /* __SIZE_TYPE__ */
#endif
#include "mips/xm-mips.h"
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index e5f4833c3bb..5d6a4925e3a 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.c
@@ -432,6 +432,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"system.h\"\n");
printf ("#include \"insn-config.h\"\n");
printf ("#include \"rtl.h\"\n");
+ printf ("#include \"tm_p.h\"\n");
printf ("#include \"regs.h\"\n");
printf ("#include \"output.h\"\n");
printf ("#include \"real.h\"\n");