public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* An egcs prototype patch is available.
@ 1997-08-23  0:01 H.J. Lu
  1997-08-23  3:56 ` Another g++ prototype patch Jason Merrill
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 1997-08-23  0:01 UTC (permalink / raw)
  To: egcs

Hi,

I just put an egcs prototype patch at

ftp://ftp.yggdrasil.com/private/hjl/egcs-970821.proto.diff.gz

I am enclosing the changelog here.

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
--
Fri Aug 22 20:04:43 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* config/xm-linux.h: Define MD_CALL_PROTOTYPES.

	* config/i386/i386.md (gen_call): Add dummies for calling
	patterns.

	* genemit.c (gen_insn, gen_expand), genflags.c (gen_proto):
	Make number of args to 4 for "call" and "call_pop". Make number
	of args to 5 for "call_value" amd "call_value_pop".

Fri Aug 22 18:26:29 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile.in (c-lang.o): Also depend on c-lex.h c-tree.h.
	(c-typeck.o, stor-layout.o): Also depend on $(RTL_H) expr.h
	insn-codes.h.
	(c-iterate.o): Also depend on expr.h insn-codes.h.
	(c-common.o, c-parse.o, stmt.o, calls.o, regclass.o): Also
	depend on output.h.
	(toplev.o): Also depend on expr.h dwarf.h dwarf2.h insn-codes.h.
	(varasm.o): Also depend on bc-emit.h.
	(final.o): Also depend on dwarf.h dwarf2.h.
	(genconfig.o, genflags.o, gencodes.o, genemit.o, genopinit.o,
	genrecog.o, genextract.o, genpeep.o, genattr.o, genattrtab.o,
	genoutput.o): Also depend on libgen.c.
	(bc-optab.o): Also depend on bc-emit.h expr.h insn-codes.h.

	libgen.c: New. Define xmalloc, xrealloc, fatal, fancy_abort
	for genxxxx.

	* alias.c, basic-block.h, bc-emit.c, bc-emit.h, bc-optab.c,
	bc-optab.h, bi-arity.c, bi-defs.h, bi-lexer.c, bi-opcode.c,
	bi-opname.c, bi-parser.y, bitmap.h, bytecode.h, c-aux-info.c,
	c-common.c, c-decl.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-tree.h, c-typeck.c, calls.c, choose-temp.c, combine.c,
	crtstuff.c, cse.c, dbxout.c, dwarf.h, dwarf2.h, dwarfout.c,
	emit-rtl.c, except.c, except.h, explow.c, expmed.c, expr.c,
	final.c, flow.c, fold-const.c, function.h, gbl-ctors.h,
	genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c,
	genrecog.c, global.c, haifa-sched.c, hard-reg-set.h,
	integrate.c, jump.c, libgcc2.c, local-alloc.c, loop.c, loop.h,
	output.h, pexecute.c, print-rtl.c, print-tree.c, profile.c,
	real.c, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c,
	regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c,
	sched.c, stmt.c, stor-layout.c, stupid.c, toplev.c, tree.c,
	tree.h, unroll.c, varasm.c, config/svr4.h, config/i386/i386.c,
	config/i386/i386.h, config/i386/i386.md: Finish prototyping.

	* config/i386/linux.h: Include <stdio.h>.

	* print-tree.c: Move "tree.h" after <stdio.h>.

	* machmode.def, machmode.h, rtl.def, rtl.h, tree.def, tree.h:
	Allow just include for enum xxx.

	* obstack.c, obstack.h: Use the one from glibc 2.

	* loop.c (note_addr_stored): Add a dummy for calling pattern.

	* haifa-sched.c (classify_insn): Renamed to haifa_classify_insn
	to avoid name conflict with classify_insn in emit-rtl.c.

	* genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c,
	genrecog.c (xmalloc, xrealloc, fatal, fancy_abort): Removed.
	Include "libgen.c".

	* gansidecl.h, halfpic.h (STDIO_PROTO): Removed.

	* fold-const.c (fold_range_test): Return 0 by default.

	* final.c, toplev.c: Include "dwarf.h" if DWARF_DEBUGGING_INFO
	is define.
	Include "dwarf2.h" if DWARF2_DEBUGGING_INFO is define.

	* dwarf2.h, dwarf2out.c: Change enum dwarf_xxx to dwarf2_xxx.

	* dwarf2out.c (build_abbrev_table): Call xrealloc instead of
	xmalloc with 2 args.

	* combine.c, optabs.c: Move "insn-config.h" before "expr.h".

	* cccp.c, cexp.y (PROTO, VA_START): Don't define.
	Include "gansidecl.h".

	* calls (any_pending_cleanups): Pass 1 as the argument when
	calling it.

	* c-typeck.c, stor-layout.c: Include "rtl.h".

	* c-lang.c: Include "c-lex.h", "c-tree.h".

	* c-common.c, c-parse.in, calls.c, stmt.c: Include "output.h".

	* bi-parser.y, config/svr4.h: Include "gansidecl.h".

	* bi-arity.c, bi-opcode.c, bi-opname.c, toplev.c (xmalloc):
	Change type from int to unsigned.

	* bc-emit.c (sym_lookup), dwarfout.c (is_pseudo_reg,
	type_main_variant, is_tagged_type): Make static.

	* bc-optab.c, varasm.c: Include "bc-emit.h".

	* bc-optab.c, c-iterate.c, c-typeck.c, stor-layout.c: Include
	"expr.h".
	(expand_expr): Use proper values when calling the function.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Another g++ prototype patch
  1997-08-23  0:01 An egcs prototype patch is available H.J. Lu
@ 1997-08-23  3:56 ` Jason Merrill
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 1997-08-23  3:56 UTC (permalink / raw)
  To: egcs

>>>>> H J Lu <hjl@lucon.org> writes:

> 	* decl2.c: Include "dwarf.h" if DWARF_DEBUGGING_INFO is define.
> 	Include "dwarf2.h" if DWARF2_DEBUGGING_INFO is define.

Why?  Those headers are just implementation details that the frontend
doesn't need to know about.

Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Another g++ prototype patch
  1997-08-25 13:09 Building of generated parser files John Carr
@ 1997-08-25 17:55 ` Jason Merrill
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 1997-08-25 17:55 UTC (permalink / raw)
  To: egcs

>>>>> H J Lu <hjl@lucon.org> writes:

>> >>>>> H J Lu <hjl@lucon.org> writes:

>> > 	* decl2.c: Include "dwarf.h" if DWARF_DEBUGGING_INFO is define.
>> > 	Include "dwarf2.h" if DWARF2_DEBUGGING_INFO is define.

>> Why?  Those headers are just implementation details that the frontend
>> doesn't need to know about.

> I put the dwarf function prototypes in them.

I think that's wrong; those files are shared by GDB.  The prototypes should
go in tree.h.

Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Another g++ prototype patch
@ 1997-08-23 12:48 H.J. Lu
  0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1997-08-23 12:48 UTC (permalink / raw)
  To: egcs

> 
> >>>>> H J Lu <hjl@lucon.org> writes:
> 
> > 	* decl2.c: Include "dwarf.h" if DWARF_DEBUGGING_INFO is define.
> > 	Include "dwarf2.h" if DWARF2_DEBUGGING_INFO is define.
> 
> Why?  Those headers are just implementation details that the frontend
> doesn't need to know about.
> 

I put the dwarf function prototypes in them.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Another g++ prototype patch
@ 1997-08-23  0:01 H.J. Lu
  0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 1997-08-23  0:01 UTC (permalink / raw)
  To: egcs

Hi,

Here is another g++ prototype patch.

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Fri Aug 22 18:26:29 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile.in (parse.o, decl.o): Also depend on
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
	$(srcdir)/../except.h $(srcdir)/../output.h
	$(srcdir)/../except.h $(srcdir)/../dwarf.h
	$(srcdir)/../dwarf2.h.
	(typeck.o, init.o): Also depend on $(srcdir)/../expr.h
	../insn-codes.h.

	* call.c, cp-tree.h, hash.h: Finish prototyping.

	* expr.c (cplus_expand_expr): Make it static. 

	* decl2.c: Include "dwarf.h" if DWARF_DEBUGGING_INFO is define.
	Include "dwarf2.h" if DWARF2_DEBUGGING_INFO is define.

	* decl2.c, init.c, typeck.c: Include "expr.h".
	(expand_expr): Use proper values when calling the function.

Index: Makefile.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- Makefile.in	1997/08/16 03:49:00	1.1.1.1
+++ Makefile.in	1997/08/23 03:13:00
@@ -191,7 +191,8 @@
 PARSE_H = $(srcdir)/parse.h
 PARSE_C = $(srcdir)/parse.c
 
-parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h
+parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
+	$(srcdir)/../except.h $(srcdir)/../output.h
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
   `echo $(PARSE_C) | sed 's,^\./,,'`
 
@@ -224,15 +225,20 @@
 lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \
   $(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h $(srcdir)/../c-pragma.h
 decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
-  lex.h decl.h $(srcdir)/../stack.h
+  lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h  \
+  $(srcdir)/../except.h
 decl2.o : decl2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
-  lex.h decl.h
+  lex.h decl.h $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../except.h \
+  $(srcdir)/../output.h $(srcdir)/../except.h $(srcdir)/../dwarf.h \
+  $(srcdir)/../dwarf2.h
 typeck2.o : typeck2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
-typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H)
+typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
+  $(srcdir)/../expr.h ../insn-codes.h
 class.o : class.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
 call.o : call.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h class.h
 friend.o : friend.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H)
-init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H)
+init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
+  $(srcdir)/../expr.h ../insn-codes.h
 method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h
 cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) class.h
 search.o : search.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h
Index: call.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/call.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 call.c
--- call.c	1997/08/22 18:32:08	1.1.1.2
+++ call.c	1997/08/22 19:15:17
@@ -100,6 +100,7 @@
 static tree build_conv PROTO((enum tree_code, tree, tree));
 static void print_n_candidates PROTO((struct candidate *, int));
 static tree default_parm_conversions PROTO((tree, tree *));
+static int is_subseq PROTO((tree, tree));
 
 #define EVIL_RETURN(ARG)	((ARG).code = EVIL_CODE, (ARG))
 #define STD_RETURN(ARG)		((ARG).code = STD_CODE, (ARG))
Index: cp-tree.h
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/cp-tree.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 cp-tree.h
--- cp-tree.h	1997/08/22 18:32:08	1.1.1.2
+++ cp-tree.h	1997/08/22 19:34:53
@@ -2196,7 +2196,6 @@
 extern tree build_throw				PROTO((tree));
 
 /* in expr.c */
-/* skip cplus_expand_expr */
 extern void init_cplus_expand			PROTO((void));
 extern void fixup_result_decl			PROTO((tree, struct rtx_def *));
 extern int extract_init				PROTO((tree, tree));
@@ -2281,6 +2280,7 @@
 extern void add_defarg_fn			PROTO((tree));
 extern void do_pending_defargs			PROTO((void));
 extern int identifier_type			PROTO((tree));
+extern void yyhook				PROTO((int));
 
 /* in method.c */
 extern void init_method				PROTO((void));
Index: decl2.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/decl2.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 decl2.c
--- decl2.c	1997/08/22 18:32:10	1.1.1.2
+++ decl2.c	1997/08/22 18:46:41
@@ -37,8 +37,15 @@
 #include "lex.h"
 #include "output.h"
 #include "except.h"
+#include "expr.h"
 
-extern tree get_file_function_name ();
+#ifdef DWARF_DEBUGGING_INFO
+#include "dwarf.h"
+#endif
+
+#ifdef DWARF2_DEBUGGING_INFO
+#include "dwarf2.h"
+#endif
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
@@ -3004,7 +3011,7 @@
 		  expand_expr (expand_vec_init (decl, TREE_VEC_ELT (init, 0),
 						TREE_VEC_ELT (init, 1),
 						TREE_VEC_ELT (init, 2), 0),
-			       const0_rtx, VOIDmode, 0);
+			       const0_rtx, VOIDmode, EXPAND_NORMAL);
 		}
 	      else
 		expand_assignment (decl, init, 0, 0);
Index: expr.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/expr.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 expr.c
--- expr.c	1997/08/22 18:32:11	1.1.1.2
+++ expr.c	1997/08/22 18:49:05
@@ -30,10 +30,12 @@
 
 static tree extract_aggr_init PROTO((tree, tree));
 static tree extract_scalar_init PROTO((tree, tree));
+static rtx cplus_expand_expr PROTO((tree, rtx, enum machine_mode,
+				    enum expand_modifier));
 
 /* Hook used by expand_expr to expand language-specific tree codes.  */
 
-rtx
+static rtx
 cplus_expand_expr (exp, target, tmode, modifier)
      tree exp;
      rtx target;
Index: hash.h
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/hash.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 hash.h
--- hash.h	1997/08/16 03:49:01	1.1.1.1
+++ hash.h	1997/08/21 15:21:38
@@ -9,6 +9,9 @@
 #define MAX_HASH_VALUE 195
 /* maximum key range = 192, duplicates = 0 */
 
+static unsigned int hash PROTO((char *, unsigned int));
+static struct resword *is_reserved_word PROTO((char *, unsigned int));
+
 #ifdef __GNUC__
 inline
 #endif
@@ -33,7 +36,7 @@
       16,  47,   4,  31,  32,   5,   6,  62,  20,  96,
       17,  25, 196, 196, 196, 196, 196, 196,
     };
-  register int hval = len;
+  register unsigned int hval = len;
 
   switch (hval)
     {
Index: init.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/init.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 init.c
--- init.c	1997/08/22 18:32:11	1.1.1.2
+++ init.c	1997/08/22 18:33:44
@@ -29,6 +29,7 @@
 #include "flags.h"
 #include "output.h"
 #include "except.h"
+#include "expr.h"
 
 extern void compiler_error ();
 
@@ -1433,7 +1434,7 @@
 		    /* Unify the initialization targets.  */
 		    DECL_RTL (TREE_OPERAND (init, 0)) = DECL_RTL (exp);
 		  else
-		    DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, VOIDmode, 0);
+		    DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
 
 		  expand_expr_stmt (init);
 		  return;
@@ -1472,7 +1473,7 @@
 	      if (exp == DECL_RESULT (current_function_decl))
 		DECL_INITIAL (exp) = init;
 	      TREE_SIDE_EFFECTS (init) = 1;
-	      expand_expr (init, const0_rtx, VOIDmode, 0);
+	      expand_expr (init, const0_rtx, VOIDmode, EXPAND_NORMAL);
 	      free_temp_slots ();
 	      return;
 	    }
@@ -2641,7 +2642,7 @@
 	      do_pending_stack_adjust ();
 	      start_sequence_for_rtl_expr (xval);
 	      emit_note (0, -1);
-	      rtxval = expand_expr (alloc_expr, NULL_RTX, VOIDmode, 0);
+	      rtxval = expand_expr (alloc_expr, NULL_RTX, VOIDmode, EXPAND_NORMAL);
 	      do_pending_stack_adjust ();
 	      TREE_SIDE_EFFECTS (xval) = 1;
 	      RTL_EXPR_SEQUENCE (xval) = get_insns ();
@@ -3099,7 +3100,7 @@
 	      (rval,
 	       build_binary_op (MINUS_EXPR, maxindex, iterator, 1),
 	       type);
-	    expand_expr (e1, const0_rtx, VOIDmode, 0);
+	    expand_expr (e1, const0_rtx, VOIDmode, EXPAND_NORMAL);
 	    RTL_EXPR_SEQUENCE (cleanup) = get_insns ();
 	    end_sequence ();
 
Index: typeck.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/cp/typeck.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 typeck.c
--- typeck.c	1997/08/22 18:32:14	1.1.1.2
+++ typeck.c	1997/08/22 18:33:50
@@ -36,6 +36,7 @@
 #include "cp-tree.h"
 #include "flags.h"
 #include "output.h"
+#include "expr.h"
 
 #ifdef HAVE_STRING_H
 #include <string.h>
@@ -5620,7 +5621,7 @@
   do_pending_stack_adjust ();
   start_sequence_for_rtl_expr (xval);
   emit_note (0, -1);
-  rtxval = expand_expr (t, NULL_RTX, VOIDmode, 0);
+  rtxval = expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL);
   do_pending_stack_adjust ();
   TREE_SIDE_EFFECTS (xval) = 1;
   RTL_EXPR_SEQUENCE (xval) = get_insns ();
@@ -7094,7 +7095,7 @@
       if (o[i] != TREE_VALUE (tail))
 	{
 	  expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
-		       const0_rtx, VOIDmode, 0);
+		       const0_rtx, VOIDmode, EXPAND_NORMAL);
 	  free_temp_slots ();
 	}
       /* Detect modification of read-only values.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-08-25 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-23  0:01 An egcs prototype patch is available H.J. Lu
1997-08-23  3:56 ` Another g++ prototype patch Jason Merrill
  -- strict thread matches above, loose matches on Subject: below --
1997-08-25 13:09 Building of generated parser files John Carr
1997-08-25 17:55 ` Another g++ prototype patch Jason Merrill
1997-08-23 12:48 H.J. Lu
1997-08-23  0:01 H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).