This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Prototyping functions in target header files
- To: egcs-patches at cygnus dot com
- Subject: Prototyping functions in target header files
- From: Bernd Schmidt <crux at pool dot informatik dot rwth-aachen dot de>
- Date: Thu, 10 Sep 1998 17:15:28 +0200 (MET DST)
Here's an updated version of a patch I sent a few months ago. This patch
makes it possible to split the various machine/machine.h files into one
that contains only prototypes, and one that contains the rest. The header
that contains the prototypes is included by several source files immediately
after tree.h/rtl.h.
So far, only i386.h is converted, but converting the other targets is
straightforward.
Bernd
* configure.in: Create a new file, "tm_p.h", from a list in
"tm_p_file". For ix86 systems, set up "tm_p_file" to include
"i386/i386-protos.h".
* Makefile.in (distclean): Remove "tm_p.h".
* i386/i386.h: Move function declarations from here...
* i386/i386-protos.h: ...to here. Add prototypes.
* i386/i386.c: Include "tm_p.h".
(i386_compare_gen, i386_compare_gen_eq): Add prototypes.
Change "struct rtx_def *" to "rtx" in some places.
* calls.c: Include tm_p.h
* c-typeck.c: Likewise.
* combine.c: Likewise.
* explow.c: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* final.c: Likewise.
* flow.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* global.c: Likewise.
* haifa-sched.c: Likewise.
* jump.c: Likewise.
* local-alloc.c: Likewise.
* loop.c: Likewise.
* optabs.c: Likewise.
* recog.c: Likewise.
* reg-stack.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* sched.c: Likewise.
* stmt.c: Likewise.
* unroll.c: Likewise.
* tree.c: Likewise.
* genrecog.c: Make generated file include "tm_p.h".
* genemit.c: Likewise.
* genoutput.c: Likewise.
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.153
diff -u -r1.153 configure.in
--- configure.in 1998/09/09 02:43:20 1.153
+++ configure.in 1998/09/10 14:58:47
@@ -388,6 +388,7 @@
# Set default cpu_type, tm_file and xm_file so it can be updated in
# each machine entry.
+ tm_p_file=
cpu_type=`echo $machine | sed 's/-.*$//'`
case $machine in
alpha*-*-*)
@@ -403,6 +404,7 @@
i[34567]86-*-*)
changequote([,])dnl
cpu_type=i386
+ tm_p_file=i386/i386-protos.h
;;
hppa*-*-*)
cpu_type=pa
@@ -3395,9 +3397,9 @@
build_xm_file="auto-build.h ${build_xm_file}"
fi
-vars="host_xm_file tm_file xm_file build_xm_file"
-links="config.h tm.h tconfig.h hconfig.h"
-defines="host_xm_defines null_defines xm_defines build_xm_defines"
+vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
+links="config.h tm.h tm_p.h tconfig.h hconfig.h"
+defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
rm -f config.bak
if test -f config.status; then mv -f config.status config.bak; fi
@@ -3410,7 +3412,8 @@
set $defines; define=$1; shift; defines=$*
rm -f $link
-
+ # Make sure the file is created, even if it is empty.
+ echo > $link
# Define TARGET_CPU_DEFAULT if the system wants one.
# This substitutes for lots of *.h files.
if test "$target_cpu_default" != "" -a $link = tm.h
Index: Makefile.in
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/Makefile.in,v
retrieving revision 1.1.1.57
diff -u -p -r1.1.1.57 Makefile.in
--- Makefile.in 1998/09/07 20:53:55 1.1.1.57
+++ Makefile.in 1998/09/08 14:20:36
@@ -2242,7 +2242,7 @@ clean: mostlyclean lang.clean
# Delete all files that users would normally create
# while building and installing GCC.
distclean: clean lang.distclean
- -rm -f tm.h config.h auto-host.h auto-build.h tconfig.h hconfig.h
+ -rm -f tm.h tm_p.h config.h auto-host.h auto-build.h tconfig.h hconfig.h
-rm -f md cstamp-h
-rm -f config.status config.run config.cache config.bak
-rm -f Make-lang Make-hooks Make-host Make-target
Index: c-typeck.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/c-typeck.c,v
retrieving revision 1.1.1.15
diff -u -p -r1.1.1.15 c-typeck.c
--- c-typeck.c 1998/09/07 20:53:57 1.1.1.15
+++ c-typeck.c 1998/09/08 14:11:13
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "tree.h"
#include "c-tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "output.h"
#include "rtl.h"
Index: calls.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/calls.c,v
retrieving revision 1.1.1.22
diff -u -p -r1.1.1.22 calls.c
--- calls.c 1998/09/07 20:53:58 1.1.1.22
+++ calls.c 1998/09/08 14:11:11
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "expr.h"
#include "regs.h"
Index: combine.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/combine.c,v
retrieving revision 1.1.1.35
diff -u -p -r1.1.1.35 combine.c
--- combine.c 1998/09/07 20:54:00 1.1.1.35
+++ combine.c 1998/09/08 14:20:58
@@ -77,6 +77,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h" /* stdio.h must precede rtl.h for FFS. */
+#include "tm_p.h"
#include "flags.h"
#include "regs.h"
#include "hard-reg-set.h"
Index: explow.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/explow.c,v
retrieving revision 1.1.1.14
diff -u -p -r1.1.1.14 explow.c
--- explow.c 1998/07/12 18:35:13 1.1.1.14
+++ explow.c 1998/09/08 14:11:11
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "expr.h"
#include "hard-reg-set.h"
Index: expmed.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/expmed.c,v
retrieving revision 1.1.1.17
diff -u -p -r1.1.1.17 expmed.c
--- expmed.c 1998/09/07 20:54:14 1.1.1.17
+++ expmed.c 1998/09/08 14:11:11
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "insn-flags.h"
#include "insn-codes.h"
Index: expr.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/expr.c,v
retrieving revision 1.1.1.48
diff -u -p -r1.1.1.48 expr.c
--- expr.c 1998/09/07 20:54:15 1.1.1.48
+++ expr.c 1998/09/08 14:11:11
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "machmode.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "obstack.h"
#include "flags.h"
#include "regs.h"
Index: final.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/final.c,v
retrieving revision 1.1.1.33
diff -u -p -r1.1.1.33 final.c
--- final.c 1998/09/07 20:54:18 1.1.1.33
+++ final.c 1998/09/08 14:11:11
@@ -49,6 +49,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "rtl.h"
+#include "tm_p.h"
#include "regs.h"
#include "insn-config.h"
#include "insn-flags.h"
Index: flow.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/flow.c,v
retrieving revision 1.1.1.36
diff -u -p -r1.1.1.36 flow.c
--- flow.c 1998/09/07 20:54:19 1.1.1.36
+++ flow.c 1998/09/08 14:11:11
@@ -111,6 +111,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "basic-block.h"
#include "insn-config.h"
#include "regs.h"
Index: fold-const.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/fold-const.c,v
retrieving revision 1.1.1.31
diff -u -p -r1.1.1.31 fold-const.c
--- fold-const.c 1998/09/07 20:54:19 1.1.1.31
+++ fold-const.c 1998/09/08 14:13:03
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "tree.h"
#include "rtl.h"
+#include "tm_p.h"
#include "toplev.h"
/* Handle floating overflow for `const_binop'. */
Index: function.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/function.c,v
retrieving revision 1.1.1.34
diff -u -p -r1.1.1.34 function.c
--- function.c 1998/09/07 20:54:20 1.1.1.34
+++ function.c 1998/09/08 14:11:11
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "except.h"
#include "function.h"
Index: genemit.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/genemit.c,v
retrieving revision 1.1.1.15
diff -u -p -r1.1.1.15 genemit.c
--- genemit.c 1998/09/07 20:54:27 1.1.1.15
+++ genemit.c 1998/09/08 14:11:11
@@ -766,6 +766,7 @@ from the machine description file `md'.
printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n");
printf ("#include \"rtl.h\"\n");
+ printf ("#include \"tm_p.h\"\n");
printf ("#include \"expr.h\"\n");
printf ("#include \"real.h\"\n");
printf ("#include \"flags.h\"\n");
Index: genoutput.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/genoutput.c,v
retrieving revision 1.1.1.13
diff -u -p -r1.1.1.13 genoutput.c
--- genoutput.c 1998/09/07 20:54:27 1.1.1.13
+++ genoutput.c 1998/09/08 14:11:13
@@ -193,6 +193,7 @@ from the machine description file `md'.
printf ("#include \"system.h\"\n");
printf ("#include \"flags.h\"\n");
printf ("#include \"rtl.h\"\n");
+ printf ("#include \"tm_p.h\"\n");
printf ("#include \"regs.h\"\n");
printf ("#include \"hard-reg-set.h\"\n");
printf ("#include \"real.h\"\n");
Index: genrecog.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/genrecog.c,v
retrieving revision 1.1.1.15
diff -u -p -r1.1.1.15 genrecog.c
--- genrecog.c 1998/09/07 20:54:27 1.1.1.15
+++ genrecog.c 1998/09/08 14:11:11
@@ -1746,6 +1746,7 @@ from the machine description file `md'.
printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n");
printf ("#include \"rtl.h\"\n");
+ printf ("#include \"tm_p.h\"\n");
printf ("#include \"insn-config.h\"\n");
printf ("#include \"recog.h\"\n");
printf ("#include \"real.h\"\n");
Index: global.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/global.c,v
retrieving revision 1.1.1.12
diff -u -p -r1.1.1.12 global.c
--- global.c 1998/06/29 18:05:17 1.1.1.12
+++ global.c 1998/09/08 14:11:11
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "machmode.h"
#include "hard-reg-set.h"
#include "rtl.h"
+#include "tm_p.h"
#include "flags.h"
#include "basic-block.h"
#include "regs.h"
Index: haifa-sched.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/haifa-sched.c,v
retrieving revision 1.1.1.33
diff -u -p -r1.1.1.33 haifa-sched.c
--- haifa-sched.c 1998/09/07 20:54:28 1.1.1.33
+++ haifa-sched.c 1998/09/08 14:11:12
@@ -158,6 +158,7 @@
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "basic-block.h"
#include "regs.h"
#include "hard-reg-set.h"
Index: jump.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/jump.c,v
retrieving revision 1.1.1.24
diff -u -p -r1.1.1.24 jump.c
--- jump.c 1998/09/07 20:54:31 1.1.1.24
+++ jump.c 1998/09/08 14:11:12
@@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "flags.h"
#include "hard-reg-set.h"
#include "regs.h"
Index: local-alloc.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/local-alloc.c,v
retrieving revision 1.1.1.18
diff -u -p -r1.1.1.18 local-alloc.c
--- local-alloc.c 1998/06/29 18:05:26 1.1.1.18
+++ local-alloc.c 1998/09/08 14:11:12
@@ -62,6 +62,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "flags.h"
#include "basic-block.h"
#include "regs.h"
Index: loop.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/loop.c,v
retrieving revision 1.1.1.37
diff -u -p -r1.1.1.37 loop.c
--- loop.c 1998/09/07 20:54:32 1.1.1.37
+++ loop.c 1998/09/08 14:11:12
@@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "obstack.h"
#include "expr.h"
#include "insn-config.h"
Index: optabs.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/optabs.c,v
retrieving revision 1.1.1.12
diff -u -p -r1.1.1.12 optabs.c
--- optabs.c 1998/09/07 20:54:34 1.1.1.12
+++ optabs.c 1998/09/08 14:11:12
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "insn-flags.h"
#include "insn-codes.h"
Index: recog.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/recog.c,v
retrieving revision 1.1.1.12
diff -u -p -r1.1.1.12 recog.c
--- recog.c 1998/09/07 20:54:37 1.1.1.12
+++ recog.c 1998/09/08 14:11:12
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "insn-config.h"
#include "insn-attr.h"
#include "insn-flags.h"
Index: reg-stack.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/reg-stack.c,v
retrieving revision 1.1.1.17
diff -u -p -r1.1.1.17 reg-stack.c
--- reg-stack.c 1998/06/11 15:31:10 1.1.1.17
+++ reg-stack.c 1998/09/08 14:11:12
@@ -161,6 +161,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "tree.h"
#include "rtl.h"
+#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "hard-reg-set.h"
Index: regclass.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/regclass.c,v
retrieving revision 1.1.1.21
diff -u -p -r1.1.1.21 regclass.c
--- regclass.c 1998/09/07 20:54:41 1.1.1.21
+++ regclass.c 1998/09/08 14:11:12
@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "hard-reg-set.h"
#include "flags.h"
#include "basic-block.h"
Index: reload.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/reload.c,v
retrieving revision 1.1.1.36
diff -u -p -r1.1.1.36 reload.c
--- reload.c 1998/09/07 20:54:42 1.1.1.36
+++ reload.c 1998/09/08 14:11:12
@@ -90,6 +90,7 @@ a register with any other reload. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "insn-config.h"
#include "insn-codes.h"
#include "recog.h"
Index: reload1.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/reload1.c,v
retrieving revision 1.1.1.37
diff -u -p -r1.1.1.37 reload1.c
--- reload1.c 1998/09/07 20:54:42 1.1.1.37
+++ reload1.c 1998/09/08 14:11:12
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "machmode.h"
#include "hard-reg-set.h"
#include "rtl.h"
+#include "tm_p.h"
#include "obstack.h"
#include "insn-config.h"
#include "insn-flags.h"
Index: sched.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/sched.c,v
retrieving revision 1.1.1.27
diff -u -p -r1.1.1.27 sched.c
--- sched.c 1998/09/07 20:54:44 1.1.1.27
+++ sched.c 1998/09/08 14:11:12
@@ -120,6 +120,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "basic-block.h"
#include "regs.h"
#include "hard-reg-set.h"
Index: stmt.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/stmt.c,v
retrieving revision 1.1.1.32
diff -u -p -r1.1.1.32 stmt.c
--- stmt.c 1998/09/07 20:54:45 1.1.1.32
+++ stmt.c 1998/09/08 14:11:13
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "flags.h"
#include "except.h"
#include "function.h"
Index: tree.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/tree.c,v
retrieving revision 1.1.1.34
diff -u -p -r1.1.1.34 tree.c
--- tree.c 1998/09/07 20:54:48 1.1.1.34
+++ tree.c 1998/09/08 14:13:10
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include <setjmp.h>
#include "flags.h"
#include "tree.h"
+#include "tm_p.h"
#include "except.h"
#include "function.h"
#include "obstack.h"
Index: unroll.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/unroll.c,v
retrieving revision 1.1.1.25
diff -u -p -r1.1.1.25 unroll.c
--- unroll.c 1998/08/05 11:58:54 1.1.1.25
+++ unroll.c 1998/09/08 14:11:13
@@ -149,6 +149,7 @@ enum unroll_types { UNROLL_COMPLETELY, U
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tm_p.h"
#include "insn-config.h"
#include "integrate.h"
#include "regs.h"
Index: config/i386/i386.c
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/config/i386/i386.c,v
retrieving revision 1.1.1.26
diff -u -p -r1.1.1.26 i386.c
--- config/i386/i386.c 1998/09/07 20:55:19 1.1.1.26
+++ config/i386/i386.c 1998/09/08 14:14:43
@@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "tree.h"
+#include "tm_p.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "real.h"
@@ -30,7 +32,6 @@ Boston, MA 02111-1307, USA. */
#include "insn-flags.h"
#include "output.h"
#include "insn-attr.h"
-#include "tree.h"
#include "flags.h"
#include "except.h"
#include "function.h"
@@ -166,9 +167,10 @@ enum reg_class regclass_map[FIRST_PSEUDO
/* Test and compare insns in i386.md store the information needed to
generate branch and scc insns here. */
-struct rtx_def *i386_compare_op0 = NULL_RTX;
-struct rtx_def *i386_compare_op1 = NULL_RTX;
-struct rtx_def *(*i386_compare_gen)(), *(*i386_compare_gen_eq)();
+rtx i386_compare_op0 = NULL_RTX;
+rtx i386_compare_op1 = NULL_RTX;
+rtx (*i386_compare_gen) PROTO((rtx, rtx));
+rtx (*i386_compare_gen_eq) PROTO((rtx, rtx));
/* which cpu are we scheduling for */
enum processor_type ix86_cpu;
@@ -467,9 +469,9 @@ optimization_options (level, size)
/* Sign-extend a 16-bit constant */
-struct rtx_def *
+rtx
i386_sext16_if_const (op)
- struct rtx_def *op;
+ rtx op;
{
if (GET_CODE (op) == CONST_INT)
{
@@ -4604,14 +4606,16 @@ assign_386_stack_local (mode, n)
return i386_stack_locals[(int) mode][n];
}
-int is_mul(op,mode)
+int
+is_mul (op,mode)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == MULT);
}
-int is_div(op,mode)
+int
+is_div (op,mode)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
Index: config/i386/i386.h
===================================================================
RCS file: /usr/local/cvs/gcs/gcc/config/i386/i386.h,v
retrieving revision 1.1.1.28
diff -u -p -r1.1.1.28 i386.h
--- config/i386/i386.h 1998/09/07 20:55:19 1.1.1.28
+++ config/i386/i386.h 1998/09/08 14:30:23
@@ -2280,12 +2280,6 @@ while (0)
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ((OP) == EQ || (OP) == NE) ? CCFPEQmode : VOIDmode)
-/* Define the information needed to generate branch and scc insns. This is
- stored from the compare operation. Note that we can't use "rtx" here
- since it hasn't been defined! */
-
-extern struct rtx_def *(*i386_compare_gen)(), *(*i386_compare_gen_eq)();
-
/* Tell final.c how to eliminate redundant test instructions. */
/* Here we define machine-dependent flags and fields in cc_status
@@ -2661,80 +2655,6 @@ do { \
} while (0)
-/* Functions in i386.c */
-extern void override_options ();
-extern void order_regs_for_local_alloc ();
-extern char *output_strlen_unroll ();
-extern struct rtx_def *i386_sext16_if_const ();
-extern int i386_aligned_p ();
-extern int i386_cc_probably_useless_p ();
-extern int i386_valid_decl_attribute_p ();
-extern int i386_valid_type_attribute_p ();
-extern int i386_return_pops_args ();
-extern int i386_comp_type_attributes ();
-extern void init_cumulative_args ();
-extern void function_arg_advance ();
-extern struct rtx_def *function_arg ();
-extern int function_arg_partial_nregs ();
-extern char *output_strlen_unroll ();
-extern void output_op_from_reg ();
-extern void output_to_reg ();
-extern char *singlemove_string ();
-extern char *output_move_double ();
-extern char *output_move_memory ();
-extern char *output_move_pushmem ();
-extern int standard_80387_constant_p ();
-extern char *output_move_const_single ();
-extern int symbolic_operand ();
-extern int call_insn_operand ();
-extern int expander_call_insn_operand ();
-extern int symbolic_reference_mentioned_p ();
-extern int ix86_expand_binary_operator ();
-extern int ix86_binary_operator_ok ();
-extern int ix86_expand_unary_operator ();
-extern int ix86_unary_operator_ok ();
-extern void emit_pic_move ();
-extern void function_prologue ();
-extern int simple_386_epilogue ();
-extern void function_epilogue ();
-extern int legitimate_address_p ();
-extern struct rtx_def *legitimize_pic_address ();
-extern struct rtx_def *legitimize_address ();
-extern void print_operand ();
-extern void print_operand_address ();
-extern void notice_update_cc ();
-extern void split_di ();
-extern int binary_387_op ();
-extern int shift_op ();
-extern int VOIDmode_compare_op ();
-extern char *output_387_binary_op ();
-extern char *output_fix_trunc ();
-extern char *output_float_compare ();
-extern char *output_fp_cc0_set ();
-extern void save_386_machine_status ();
-extern void restore_386_machine_status ();
-extern void clear_386_stack_locals ();
-extern struct rtx_def *assign_386_stack_local ();
-extern int is_mul ();
-extern int is_div ();
-extern int last_to_set_cc ();
-extern int doesnt_set_condition_code ();
-extern int sets_condition_code ();
-extern int str_immediate_operand ();
-extern int is_fp_insn ();
-extern int is_fp_dest ();
-extern int is_fp_store ();
-extern int agi_dependent ();
-extern int reg_mentioned_in_mem ();
-extern char *output_int_conditional_move ();
-extern char *output_fp_conditional_move ();
-extern int ix86_can_use_return_insn_p ();
-
-#ifdef NOTYET
-extern struct rtx_def *copy_all_rtx ();
-extern void rewrite_address ();
-#endif
-
/* Variables in i386.c */
extern char *ix86_cpu_string; /* for -mcpu=<xxx> */
extern char *ix86_arch_string; /* for -march=<xxx> */
@@ -2752,17 +2672,9 @@ extern int i386_branch_cost; /* values
extern char *hi_reg_name[]; /* names for 16 bit regs */
extern char *qi_reg_name[]; /* names for 8 bit regs (low) */
extern char *qi_high_reg_name[]; /* names for 8 bit regs (high) */
-extern enum reg_class regclass_map[]; /* smalled class containing REGNO */
+extern enum reg_class regclass_map[]; /* smallest class containing REGNO */
extern struct rtx_def *i386_compare_op0; /* operand 0 for comparisons */
extern struct rtx_def *i386_compare_op1; /* operand 1 for comparisons */
-
-/* External variables used */
-extern int optimize; /* optimization level */
-extern int obey_regdecls; /* TRUE if stupid register allocation */
-
-/* External functions used */
-extern struct rtx_def *force_operand ();
-
/*
Local variables:
--- /dev/null Thu Oct 2 22:23:28 1997
+++ config/i386/i386-protos.h Tue Sep 8 16:35:34 1998
@@ -0,0 +1,124 @@
+/* Definitions of target machine for GNU compiler for Intel X86
+ (386, 486, Pentium).
+ Copyright (C) 1988, 92, 94-97, 1998 Free Software Foundation, Inc.
+
+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. */
+
+struct function;
+
+/* Functions in i386.c */
+extern void override_options PROTO((void));
+extern void order_regs_for_local_alloc PROTO((void));
+
+extern void function_prologue PROTO((FILE *, int));
+extern void function_epilogue PROTO((FILE *, int));
+extern void ix86_expand_prologue PROTO((void));
+extern void ix86_expand_epilogue PROTO((void));
+extern int ix86_can_use_return_insn_p PROTO((void));
+extern void save_386_machine_status PROTO((struct function *));
+extern void restore_386_machine_status PROTO((struct function *));
+extern void clear_386_stack_locals PROTO((void));
+extern void load_pic_register PROTO((int));
+
+#ifdef TREE_CODE
+
+extern int i386_valid_decl_attribute_p PROTO((tree, tree, tree, tree));
+extern int i386_valid_type_attribute_p PROTO((tree, tree, tree, tree));
+extern int i386_return_pops_args PROTO((tree, tree, int));
+extern int i386_comp_type_attributes PROTO((tree, tree));
+extern void function_arg_advance PROTO((CUMULATIVE_ARGS *, enum machine_mode,
+ tree, int));
+extern int function_arg_partial_nregs PROTO((CUMULATIVE_ARGS *,
+ enum machine_mode, tree, int));
+#ifdef RTX_CODE
+extern void init_cumulative_args PROTO((CUMULATIVE_ARGS *, tree, rtx));
+extern rtx function_arg PROTO((CUMULATIVE_ARGS *, enum machine_mode,
+ tree, int));
+#endif /* defined RTX_CODE */
+#endif /* defined TREE_CODE */
+
+#ifdef RTX_CODE
+
+extern int i386_aligned_p PROTO((rtx));
+extern rtx assign_386_stack_local PROTO((enum machine_mode, int));
+extern char *output_strlen_unroll PROTO((rtx *operands));
+extern rtx i386_sext16_if_const PROTO((rtx));
+extern int i386_cc_probably_useless_p PROTO((rtx));
+extern char *output_strlen_unroll PROTO((rtx *));
+extern void output_op_from_reg PROTO((rtx, char *));
+extern void output_to_reg PROTO((rtx, int, rtx));
+extern char *singlemove_string PROTO((rtx *));
+extern char *output_move_double PROTO((rtx *));
+extern char *output_move_memory PROTO((rtx *, rtx, int, int, int));
+extern char *output_move_pushmem PROTO((rtx *, rtx, int, int, int));
+extern int standard_80387_constant_p PROTO((rtx));
+extern char *output_move_const_single PROTO((rtx *));
+extern int symbolic_operand PROTO((rtx, enum machine_mode));
+extern int call_insn_operand PROTO((rtx, enum machine_mode));
+extern int expander_call_insn_operand PROTO((rtx, enum machine_mode));
+extern int symbolic_reference_mentioned_p PROTO((rtx));
+extern int ix86_expand_binary_operator PROTO((enum rtx_code,
+ enum machine_mode, rtx *));
+extern int ix86_binary_operator_ok PROTO((enum rtx_code, enum machine_mode,
+ rtx *));
+extern int ix86_expand_unary_operator PROTO((enum rtx_code,
+ enum machine_mode, rtx *));
+extern int ix86_unary_operator_ok PROTO((enum rtx_code, enum machine_mode,
+ rtx *));
+extern char *output_int_conditional_move PROTO((int, rtx *));
+extern char *output_fp_conditional_move PROTO((int, rtx *));
+extern void emit_pic_move PROTO((rtx *, enum machine_mode));
+extern int legitimate_address_p PROTO((enum machine_mode, rtx, int));
+extern rtx legitimize_pic_address PROTO((rtx, rtx));
+extern rtx legitimize_address PROTO((rtx, rtx, enum machine_mode));
+extern void print_operand PROTO((FILE *, rtx, int));
+extern void print_operand_address PROTO((FILE *, rtx));
+extern void notice_update_cc PROTO((rtx));
+extern void split_di PROTO((rtx *, int, rtx *, rtx *));
+extern int binary_387_op PROTO((rtx, enum machine_mode));
+extern int shift_op PROTO((rtx, enum machine_mode));
+extern int VOIDmode_compare_op PROTO((rtx, enum machine_mode));
+extern char *output_387_binary_op PROTO((rtx, rtx *));
+extern char *output_fix_trunc PROTO((rtx, rtx *));
+extern char *output_float_compare PROTO((rtx, rtx *));
+extern char *output_fp_cc0_set PROTO((rtx));
+extern int is_mul PROTO((rtx, enum machine_mode));
+extern int is_div PROTO((rtx, enum machine_mode));
+extern int last_to_set_cc PROTO((rtx, rtx));
+extern int doesnt_set_condition_code PROTO((rtx));
+extern int sets_condition_code PROTO((rtx));
+extern int str_immediate_operand PROTO((rtx, enum machine_mode));
+extern int is_fp_insn PROTO((rtx));
+extern int is_fp_dest PROTO((rtx));
+extern int is_fp_store PROTO((rtx));
+extern int agi_dependent PROTO((rtx, rtx));
+extern int reg_mentioned_in_mem PROTO((rtx, rtx));
+
+/* Define the information needed to generate branch and scc insns. This is
+ stored from the compare operation. Note that we can't use "rtx" here
+ since it hasn't been defined! */
+
+extern rtx (*i386_compare_gen) PROTO((rtx, rtx));
+extern rtx (*i386_compare_gen_eq) PROTO((rtx, rtx));
+
+#ifdef NOTYET
+extern rtx copy_all_rtx PROTO((rtx));
+extern void rewrite_address PROTO((rtx));
+#endif
+
+#endif /* defined RTX_CODE */