Include ggc.h in insn-output.c
Geoff Keating
geoffk@cygnus.com
Mon Jan 24 12:16:00 GMT 2000
On rs6000, I have an output pattern that calls ggc_alloc_string:
(define_insn "load_toc_aix_si"
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(const_int 0)] 7))]
"! TARGET_ELF && TARGET_32BIT"
"*
{
char buf[30];
ASM_GENERATE_INTERNAL_LABEL (buf, \"LCTOC\", 0);
operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1));
operands[2] = gen_rtx_REG (Pmode, 2);
return \"{l|lwz} %0,%1(%2)\";
}"
[(set_attr "type" "load")])
So I need to have ggc.h included in insn-output.c.
Any objections?
--
- Geoffrey Keating <geoffk@cygnus.com>
===File /home/geoffk/patches/cygnus/rs6000-outputggc.patch===
2000-01-24 Geoffrey Keating <geoffk@cygnus.com>
* genoutput.c (output_prologue): Include ggc.h in generated
files.
* Makefile.in (insn-output.o): Depends on ggc.h.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.367
diff -p -u -u -p -r1.367 Makefile.in
--- Makefile.in 2000/01/19 09:42:10 1.367
+++ Makefile.in 2000/01/24 20:13:08
@@ -1763,9 +1763,9 @@ s-attrtab : $(md_file) genattrtab $(srcd
$(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
touch s-attrtab
-insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h conditions.h \
- hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h $(RECOG_H) \
- function.h insn-codes.h system.h toplev.h flags.h
+insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) ggc.h $(REGS_H) real.h \
+ conditions.h hard-reg-set.h insn-config.h insn-flags.h insn-attr.h \
+ output.h $(RECOG_H) function.h insn-codes.h system.h toplev.h flags.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
insn-output.c: s-output ; @true
Index: genoutput.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/genoutput.c,v
retrieving revision 1.44
diff -p -u -u -p -r1.44 genoutput.c
--- genoutput.c 2000/01/17 17:16:21 1.44
+++ genoutput.c 2000/01/24 20:13:08
@@ -225,6 +225,7 @@ from the machine description file `md'.
printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n");
printf ("#include \"flags.h\"\n");
+ printf ("#include \"ggc.h\"\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"tm_p.h\"\n");
printf ("#include \"function.h\"\n");
============================================================
More information about the Gcc-patches
mailing list