Commit 245fc639 by Zack Weinberg Committed by Zack Weinberg

r110122@banpei: zack | 2006-01-22 14:41:17 -0800

 r110122@banpei:  zack | 2006-01-22 14:41:17 -0800
 	* genextract.c: Don't include insn-config.h.  Do include vec.h.
         Declare vectors of int, char, and locstr.
         (locstr): New typedef.
         (struct extraction): Make all array fields into bare pointers.
         (insn_name_ptr, insn_name_ptr_size): Move down by get_insn_name.
         (insn_code_number): Delete.
         (accum_extract): New struct.
         (VEC_safe_set_locstr, VEC_char_to_string): New functions.
         (gen_insn): Take insn_code_number as an argument.  Use an
         accum_extract structure instead of loading data directly into
         a struct extraction, and having to know how big it might get.
         (walk_rtx): Operate entirely on an accum_extract structure.
         (print_path): Avoid unnecessary use of printf.
         (print_header): New function, split out of main.  Distinguish
         more carefully between an unrecognizable insn and an insn that
         has the code number of a define_expand.
         (main): Pass insn_code_number to gen_insn.  Call print_header
         only after parsing.  Avoid unnecessary use of printf.
         * Makefile.in (build/vec.o): New rule.
         (build/genextract): Depend on build/vec.o.
         (build/genextract.o): Don't depend on insn-config.h.

From-SVN: r110118
parent cbbbdc2c
2006-01-22 Zack Weinberg <zackw@panix.com> 2006-01-22 Zack Weinberg <zackw@panix.com>
* genextract.c: Don't include insn-config.h. Do include vec.h.
Declare vectors of int, char, and locstr.
(locstr): New typedef.
(struct extraction): Make all array fields into bare pointers.
(insn_name_ptr, insn_name_ptr_size): Move down by get_insn_name.
(insn_code_number): Delete.
(accum_extract): New struct.
(VEC_safe_set_locstr, VEC_char_to_string): New functions.
(gen_insn): Take insn_code_number as an argument. Use an
accum_extract structure instead of loading data directly into
a struct extraction, and having to know how big it might get.
(walk_rtx): Operate entirely on an accum_extract structure.
(print_path): Avoid unnecessary use of printf.
(print_header): New function, split out of main. Distinguish
more carefully between an unrecognizable insn and an insn that
has the code number of a define_expand.
(main): Pass insn_code_number to gen_insn. Call print_header
only after parsing. Avoid unnecessary use of printf.
* Makefile.in (build/vec.o): New rule.
(build/genextract): Depend on build/vec.o.
(build/genextract.o): Don't depend on insn-config.h.
2006-01-22 Zack Weinberg <zackw@panix.com>
* Makefile.in: Consolidate most rules that use $(CC_FOR_BUILD) and/or * Makefile.in: Consolidate most rules that use $(CC_FOR_BUILD) and/or
$(RUN_GEN). Use pattern rules to factor out as much boilerplate as $(RUN_GEN). Use pattern rules to factor out as much boilerplate as
practical. Eliminate per-generator-program link rules. practical. Eliminate per-generator-program link rules.
......
...@@ -2876,6 +2876,8 @@ build/rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \ ...@@ -2876,6 +2876,8 @@ build/rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \
$(RTL_H) real.h $(GGC_H) errors.h $(RTL_H) real.h $(GGC_H) errors.h
build/varray.o: varray.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \ build/varray.o: varray.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \
$(VARRAY_H) $(RTL_BASE_H) $(GGC_H) $(TREE_H) bitmap.h errors.h $(VARRAY_H) $(RTL_BASE_H) $(GGC_H) $(TREE_H) bitmap.h errors.h
build/vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) coretypes.h vec.h \
$(GGC_H) toplev.h
build/insn-conditions.o : insn-conditions.c $(CONFIG_H) $(SYSTEM_H) \ build/insn-conditions.o : insn-conditions.c $(CONFIG_H) $(SYSTEM_H) \
$(GTM_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) $(RECOG_H) real.h \ $(GTM_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) $(RECOG_H) real.h \
output.h $(FLAGS_H) hard-reg-set.h $(RESOURCE_H) toplev.h reload.h \ output.h $(FLAGS_H) hard-reg-set.h $(RESOURCE_H) toplev.h reload.h \
...@@ -2904,7 +2906,7 @@ build/genconstants.o : genconstants.c $(RTL_BASE_H) $(BCONFIG_H) \ ...@@ -2904,7 +2906,7 @@ build/genconstants.o : genconstants.c $(RTL_BASE_H) $(BCONFIG_H) \
build/genemit.o : genemit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \ build/genemit.o : genemit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h gensupport.h coretypes.h $(GTM_H) errors.h gensupport.h
build/genextract.o : genextract.c $(RTL_BASE_H) $(BCONFIG_H) \ build/genextract.o : genextract.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) insn-config.h errors.h gensupport.h $(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
build/genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \ build/genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h $(SYSTEM_H) coretypes.h $(GTM_H) errors.h gensupport.h
build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
...@@ -2952,6 +2954,7 @@ build/genpreds$(build_exeext) : $(BUILD_PRINT) ...@@ -2952,6 +2954,7 @@ build/genpreds$(build_exeext) : $(BUILD_PRINT)
build/gengenrtl$(build_exeext) : $(BUILD_ERRORS) build/gengenrtl$(build_exeext) : $(BUILD_ERRORS)
build/genmodes$(build_exeext) : $(BUILD_ERRORS) build/genmodes$(build_exeext) : $(BUILD_ERRORS)
build/genextract$(build_exeext): build/vec.o
# These programs are made from more than one source file. # These programs are made from more than one source file.
# The primary source file comes from the pattern rule above. # The primary source file comes from the pattern rule above.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment