summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog55
-rw-r--r--gcc/Makefile.in6
-rw-r--r--gcc/config/mips/mips.c34
-rw-r--r--gcc/config/mips/mips.md2
-rw-r--r--gcc/config/sparc/sparc.h1
-rw-r--r--gcc/crtstuff.c9
-rw-r--r--gcc/cse.c5
-rw-r--r--gcc/dbxout.h1
-rw-r--r--gcc/final.c2
-rw-r--r--gcc/gcse.c33
-rw-r--r--gcc/libgcc2.c2
-rw-r--r--gcc/output.h3
-rw-r--r--gcc/recog.h1
-rw-r--r--gcc/rtl.h25
-rw-r--r--gcc/toplev.h8
-rw-r--r--gcc/varasm.c1
16 files changed, 133 insertions, 55 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9452835dac..5800f623324 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,58 @@
+Mon Jun 8 20:57:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (varasm.o): Depend on dbxout.h.
+ (cse.o): Depend on toplev.h and output.h.
+ (gcse.o): Depend on output.h.
+
+ * mips.c: Include system.h and toplev.h and remove redundant code.
+ Include output.h after tree.h so all its prototypes get activated.
+ * mips.md (table_jump): Remove unused variable `dest'.
+
+ * sparc.h: Add prototype for `v8plus_regcmp_op'.
+
+ * crtstuff.c (fini_dummy, init_dummy): Mark function definitions
+ with __attribute__ ((__unused__)).
+ (__frame_dummy): Provide prototype before use, wrap it with
+ EH_FRAME_SECTION_ASM_OP.
+
+ * cse.c: Move inclusion of <setjmp.h> above local headers.
+ Include toplev.h and output.h.
+
+ * dbxout.h: Add prototype for `dbxout_begin_function'.
+
+ * final.c (final_scan_insn): Wrap variable `max_skip' in macro
+ ASM_OUTPUT_MAX_SKIP_ALIGN.
+
+ * gcse.c: Include system.h and output.h.
+ (dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
+ Make extern instead of static.
+ (compute_can_copy): Only declare variables `reg' and `insn' when
+ AVOID_CCMODE_COPIES is not defined.
+ (record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
+ (hash_scan_clobber): Likewise for `x' and `insn'.
+ (hash_scan_call): Likewise.
+ (record_last_set_info): Likewise for `setter'.
+ (mark_call): Likewise for `pat'.
+ (pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
+
+ * libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
+ length parameter so that it multiplies the number of elements by
+ the sizeof(element).
+
+ * output.h: Add prototype for `weak_finish'.
+
+ * recog.h: Likewise for `validate_replace_src'.
+
+ * rtl.h: Likewise for `optimize_save_area_alloca',
+ `fix_sched_param', `purge_addressof', `gcse_main',
+ `regmove_optimize', `dbr_schedule', `branch_prob' and
+ `end_branch_prob'.
+
+ * toplev.h: Likewise for `set_float_handler' and
+ `output_quoted_string'.
+
+ * varasm.c: Include dbxout.h.
+
Mon Jun 8 18:12:06 1998 Jim Wilson <wilson@cygnus.com>
* mips.c (mips_secondary_reload_class): Use gp_reg_p instead of
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index ab07317940d..f6045273019 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1364,7 +1364,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
function.h defaults.h insn-codes.h expr.h hard-reg-set.h regs.h \
- xcoffout.h output.h c-pragma.h toplev.h except.h
+ xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h
function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
insn-config.h $(RECOG_H) output.h toplev.h except.h
@@ -1413,9 +1413,9 @@ jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \
stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h
cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h \
- real.h insn-config.h insn-codes.h $(RECOG_H) expr.h
+ real.h insn-config.h insn-codes.h $(RECOG_H) expr.h toplev.h output.h
gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h \
- real.h insn-config.h insn-codes.h $(RECOG_H) expr.h basic-block.h
+ real.h insn-config.h insn-codes.h $(RECOG_H) expr.h basic-block.h output.h
profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
gcov-io.h $(TREE_H) output.h regs.h toplev.h
loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 56f52103633..35b4d505faf 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -27,14 +27,8 @@ Boston, MA 02111-1307, USA. */
be replaced with something better designed. */
#include "config.h"
-
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "system.h"
+#include <signal.h>
#include "rtl.h"
#include "regs.h"
@@ -46,25 +40,16 @@ Boston, MA 02111-1307, USA. */
#include "insn-attr.h"
#include "insn-codes.h"
#include "recog.h"
-#include "output.h"
+#include "toplev.h"
#undef MAX /* sys/param.h may also define these */
#undef MIN
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <ctype.h>
#include "tree.h"
#include "expr.h"
#include "flags.h"
#include "reload.h"
-
-#ifndef R_OK
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-#endif
+#include "output.h"
#if defined(USG) || !defined(HAVE_STAB_H)
#include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
@@ -78,19 +63,8 @@ Boston, MA 02111-1307, USA. */
#define STAB_CODE_TYPE int
#endif
-extern void abort ();
-extern int atoi ();
-extern char *getenv ();
extern char *mktemp ();
-
-extern rtx adj_offsettable_operand ();
-extern rtx copy_to_reg ();
-extern void error ();
extern tree lookup_name ();
-extern void pfatal_with_name ();
-extern void warning ();
-
-extern FILE *asm_out_file;
/* Enumeration for all of the relational tests, so that we can build
arrays indexed by the test type, and not worry about the order
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 595362de029..00f0461da18 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -8681,8 +8681,6 @@ move\\t%0,%z4\\n\\
""
"
{
- rtx dest;
-
if (operands[0]) /* eliminate unused code warnings */
{
if (TARGET_MIPS16)
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 2add5214ec9..44a6bc200de 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -3261,6 +3261,7 @@ extern int symbolic_operand ();
extern int text_segment_operand ();
extern int ultrasparc_adjust_cost ();
extern int uns_small_int ();
+extern int v8plus_regcmp_op ();
extern int v8plus_regcmp_p ();
extern int v9_regcmp_op ();
extern int v9_regcmp_p ();
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index 3c53cef81dd..8e50ac740d7 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -150,7 +150,7 @@ __do_global_dtors_aux ()
/* Stick a call to __do_global_dtors_aux into the .fini section. */
-static void
+static void __attribute__ ((__unused__))
fini_dummy ()
{
asm (FINI_SECTION_ASM_OP);
@@ -173,7 +173,7 @@ frame_dummy ()
__register_frame_info (__EH_FRAME_BEGIN__, &object);
}
-static void
+static void __attribute__ ((__unused__))
init_dummy ()
{
asm (INIT_SECTION_ASM_OP);
@@ -335,7 +335,7 @@ __do_global_ctors_aux ()
/* Stick a call to __do_global_ctors_aux into the .init section. */
-static void
+static void __attribute__ ((__unused__))
init_dummy ()
{
asm (INIT_SECTION_ASM_OP);
@@ -407,6 +407,9 @@ asm (TEXT_SECTION_ASM_OP);
not an SVR4-style .init section. __do_global_ctors can be non-static
in this case because we protect it with -hidden_symbol. */
static func_ptr __CTOR_END__[];
+#ifdef EH_FRAME_SECTION_ASM_OP
+extern void __frame_dummy (void);
+#endif
void
__do_global_ctors ()
{
diff --git a/gcc/cse.c b/gcc/cse.c
index d494b04466a..6d2e8c9c6e7 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
/* stdio.h must precede rtl.h for FFS. */
#include "system.h"
+#include <setjmp.h>
#include "rtl.h"
#include "regs.h"
@@ -31,8 +32,8 @@ Boston, MA 02111-1307, USA. */
#include "insn-config.h"
#include "recog.h"
#include "expr.h"
-
-#include <setjmp.h>
+#include "toplev.h"
+#include "output.h"
/* The basic idea of common subexpression elimination is to go
through the code, keeping a record of expressions that would
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 45329270f61..c208686e0ab 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -27,3 +27,4 @@ extern void dbxout_resume_previous_source_file PROTO ((void));
extern void dbxout_symbol PROTO ((tree, int));
extern void dbxout_function PROTO ((tree));
extern void dbxout_source_line PROTO ((FILE *, char*, int));
+extern void dbxout_begin_function PROTO ((tree));
diff --git a/gcc/final.c b/gcc/final.c
index 4679fa31adc..79990bc2356 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2276,7 +2276,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (CODE_LABEL_NUMBER (insn) <= max_labelno)
{
int align = LABEL_TO_ALIGNMENT (insn);
+#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
int max_skip = LABEL_TO_MAX_SKIP (insn);
+#endif
if (align && NEXT_INSN (insn))
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 2c6a9d1d99e..eca12422c89 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -141,7 +141,7 @@ yyy
#include "config.h"
/* Must precede rtl.h for FFS. */
-#include <stdio.h>
+#include "system.h"
#include "rtl.h"
#include "regs.h"
@@ -151,6 +151,7 @@ yyy
#include "insn-config.h"
#include "recog.h"
#include "basic-block.h"
+#include "output.h"
#include "obstack.h"
#define obstack_chunk_alloc gmalloc
@@ -541,7 +542,7 @@ static char *grealloc PROTO ((char *, unsigned int));
static char *gcse_alloc PROTO ((unsigned long));
static void alloc_gcse_mem PROTO ((rtx));
static void free_gcse_mem PROTO ((void));
-static void dump_cuid_table PROTO ((FILE *));
+extern void dump_cuid_table PROTO ((FILE *));
static void alloc_reg_set_mem PROTO ((int));
static void free_reg_set_mem PROTO ((void));
@@ -590,7 +591,7 @@ static void free_rd_mem PROTO ((void));
static void compute_kill_rd PROTO ((void));
static void handle_rd_kill_set PROTO ((rtx, int, int));
static void compute_rd PROTO ((void));
-static void dump_rd_table PROTO ((FILE *, char *, sbitmap *));
+extern void dump_rd_table PROTO ((FILE *, char *, sbitmap *));
static void alloc_avail_expr_mem PROTO ((int, int));
static void free_avail_expr_mem PROTO ((void));
@@ -610,7 +611,7 @@ static int one_classic_gcse_pass PROTO ((rtx, int));
static void alloc_cprop_mem PROTO ((int, int));
static void free_cprop_mem PROTO ((void));
-static void dump_cprop_data PROTO ((FILE *));
+extern void dump_cprop_data PROTO ((FILE *));
static void compute_transp PROTO ((rtx, int, sbitmap *, int));
static void compute_cprop_local_properties PROTO ((void));
static void compute_cprop_avinout PROTO ((void));
@@ -624,7 +625,7 @@ static int one_cprop_pass PROTO ((rtx, int));
static void alloc_pre_mem PROTO ((int, int));
static void free_pre_mem PROTO ((void));
-static void dump_pre_data PROTO ((FILE *));
+extern void dump_pre_data PROTO ((FILE *));
static void compute_pre_local_properties PROTO ((void));
static void compute_pre_avinout PROTO ((void));
static void compute_pre_antinout PROTO ((void));
@@ -786,7 +787,9 @@ static void
compute_can_copy ()
{
int i;
+#ifndef AVOID_CCMODE_COPIES
rtx reg,insn;
+#endif
char *free_point = (char *) oballoc (1);
bzero (can_copy_p, NUM_MACHINE_MODES);
@@ -918,7 +921,7 @@ free_gcse_mem ()
free (mem_set_in_block);
}
-static void
+void
dump_cuid_table (file)
FILE *file;
{
@@ -1014,7 +1017,7 @@ static rtx record_set_insn;
static void
record_set_info (dest, setter)
- rtx dest, setter;
+ rtx dest, setter ATTRIBUTE_UNUSED;
{
if (GET_CODE (dest) == SUBREG)
dest = SUBREG_REG (dest);
@@ -1823,14 +1826,14 @@ hash_scan_set (pat, insn, set_p)
static void
hash_scan_clobber (x, insn)
- rtx x, insn;
+ rtx x ATTRIBUTE_UNUSED, insn ATTRIBUTE_UNUSED;
{
/* Currently nothing to do. */
}
static void
hash_scan_call (x, insn)
- rtx x, insn;
+ rtx x ATTRIBUTE_UNUSED, insn ATTRIBUTE_UNUSED;
{
/* Currently nothing to do. */
}
@@ -1977,7 +1980,7 @@ static rtx last_set_insn;
static void
record_last_set_info (dest, setter)
- rtx dest, setter;
+ rtx dest, setter ATTRIBUTE_UNUSED;
{
if (GET_CODE (dest) == SUBREG)
dest = SUBREG_REG (dest);
@@ -2338,7 +2341,7 @@ repeat:
static void
mark_call (pat, insn)
- rtx pat, insn;
+ rtx pat ATTRIBUTE_UNUSED, insn;
{
mem_last_set = INSN_CUID (insn);
}
@@ -2466,7 +2469,7 @@ handle_rd_kill_set (insn, regno, bb)
}
}
-static void
+void
dump_rd_table (file, title, bmap)
FILE *file;
char *title;
@@ -3321,7 +3324,7 @@ free_cprop_mem ()
/* Dump copy/const propagation data. */
-static void
+void
dump_cprop_data (file)
FILE *file;
{
@@ -3915,7 +3918,7 @@ free_pre_mem ()
/* Dump PRE data. */
-static void
+void
dump_pre_data (file)
FILE *file;
{
@@ -4323,7 +4326,9 @@ pre_insert_insn (expr, bb)
if (GET_CODE (insn) == JUMP_INSN)
{
+#ifdef HAVE_cc0
rtx note;
+#endif
/* If this is a jump table, then we can't insert stuff here. Since
we know the previous real insn must be the tablejump, we insert
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 19999311788..379586b8728 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2157,7 +2157,7 @@ __bb_init_prg ()
bb_hashbuckets = (struct bb_edge **)
malloc (BB_BUCKETS * sizeof (struct bb_edge *));
if (bb_hashbuckets)
- bzero ((char *) bb_hashbuckets, BB_BUCKETS);
+ memset (bb_hashbuckets, 0, BB_BUCKETS * sizeof (struct bb_edge *));
}
if (bb_mode & 12)
diff --git a/gcc/output.h b/gcc/output.h
index dd9ad82a6bc..e2c9f4dcbf4 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -171,6 +171,9 @@ extern void make_function_rtl PROTO((tree));
extern void declare_weak PROTO ((tree));
#endif /* TREE_CODE */
+/* Emit any pending weak declarations. */
+extern void weak_finish PROTO ((void));
+
/* Decode an `asm' spec for a declaration as a register name.
Return the register number, or -1 if nothing specified,
or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
diff --git a/gcc/recog.h b/gcc/recog.h
index 8918c8950b1..6e6bb064824 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -32,6 +32,7 @@ extern int constrain_operands PROTO((int, int));
extern int memory_address_p PROTO((enum machine_mode, rtx));
extern int strict_memory_address_p PROTO((enum machine_mode, rtx));
extern int validate_replace_rtx PROTO((rtx, rtx, rtx));
+extern int validate_replace_src PROTO((rtx, rtx, rtx));
extern int reg_fits_class_p PROTO((rtx, enum reg_class, int,
enum machine_mode));
extern rtx *find_single_use PROTO((rtx, rtx, rtx *));
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 26b5aa59612..7cbcbb24a7c 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -799,8 +799,10 @@ extern int ceil_log2 PROTO((unsigned HOST_WIDE_INT));
#define plus_constant_for_output(X,C) \
plus_constant_for_output_wide (X, (HOST_WIDE_INT) (C))
+/* In explow.c */
extern rtx plus_constant_wide PROTO((rtx, HOST_WIDE_INT));
extern rtx plus_constant_for_output_wide PROTO((rtx, HOST_WIDE_INT));
+extern void optimize_save_area_alloca PROTO((rtx));
extern rtx gen_rtx PVPROTO((enum rtx_code,
enum machine_mode, ...));
@@ -1306,6 +1308,9 @@ extern void dump_combine_total_stats PROTO ((FILE *));
#ifdef BUFSIZ
extern void schedule_insns PROTO ((FILE *));
#endif
+#ifdef HAIFA
+extern void fix_sched_param PROTO ((char *, char *));
+#endif
/* In print-rtl.c */
extern void debug_rtx PROTO ((rtx));
@@ -1333,6 +1338,7 @@ extern void preserve_rtl_expr_result PROTO ((rtx));
extern void mark_temp_addr_taken PROTO ((rtx));
extern void update_temp_slot_address PROTO ((rtx, rtx));
extern void use_variable_after PROTO ((rtx, rtx));
+extern void purge_addressof PROTO ((rtx));
/* In reload.c */
extern int operands_match_p PROTO ((rtx, rtx));
@@ -1404,6 +1410,11 @@ extern rtx expand_mult_highpart PROTO ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT, rtx,
int, int));
+/* In gcse.c */
+#ifdef BUFSIZ
+extern void gcse_main PROTO ((rtx, FILE *));
+#endif
+
/* In global.c */
extern void mark_elimination PROTO ((int, int));
#ifdef BUFSIZ
@@ -1423,6 +1434,16 @@ extern void regclass PROTO ((rtx, int));
extern void reg_scan PROTO ((rtx, int, int));
extern void fix_register PROTO ((char *, int, int));
+/* In regmove.c */
+#ifdef BUFSIZ
+extern void regmove_optimize PROTO ((rtx, int, FILE *));
+#endif
+
+/* In reorg.c */
+#ifdef BUFSIZ
+extern void dbr_schedule PROTO ((rtx, FILE *));
+#endif
+
/* In optabs.c */
extern void init_optabs PROTO ((void));
@@ -1445,6 +1466,10 @@ extern void init_caller_save PROTO ((void));
/* In profile.c */
extern void init_branch_prob PROTO ((char *));
+#ifdef BUFSIZ
+extern void branch_prob PROTO ((rtx, FILE *));
+extern void end_branch_prob PROTO ((FILE *));
+#endif
extern void output_func_start_profiler PROTO ((void));
/* In reg-stack.c */
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 4f4a0fe38e3..fa9b365b752 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -51,4 +51,12 @@ extern void error_for_asm PVPROTO((struct rtx_def *, char *, ...))
ATTRIBUTE_PRINTF_2;
extern void warning_for_asm PVPROTO((struct rtx_def *, char *, ...))
ATTRIBUTE_PRINTF_2;
+#ifdef _JBLEN
+extern void set_float_handler PROTO((jmp_buf));
+#endif
+
+#ifdef BUFSIZ
+extern void output_quoted_string PROTO ((FILE *, char *));
+#endif
+
#endif /* __GCC_TOPLEV_H */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3a375735007..d60bfcb49f1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA. */
#include "defaults.h"
#include "real.h"
#include "toplev.h"
+#include "dbxout.h"
#include "obstack.h"
#include "c-pragma.h"