diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-29 21:07:12 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-29 21:07:12 +0000 |
commit | a014ec0fcf718a024af285a0b42b83b6df735ebd (patch) | |
tree | b92c3b92e723738ff4b915ca3eb1245bee47ad20 /gcc/genpreds.c | |
parent | 04bd1b812339656ba9b4d7926930d0e0e4afb508 (diff) | |
download | gcc-a014ec0fcf718a024af285a0b42b83b6df735ebd.tar.gz |
* genemit.c (main): Add tm-constrs.h to included headers.
* genoutput.c (output_prologue): Add tm-constrs.h to included headers.
* genpeep.c (main): Add tm-constrs.h to included headers.
* genpreds.c (write_satisfies_constraint_fns): Rename to ...
(write_tm_constrs_h): this and write complete file.
(write_tm_preds_h): Do not emit satisfies_constraint fns.
(write_insn_preds_c): Add tm-constrs.h to included headers.
(gen_constrs): New variable.
(parse_option): Parse "-c".
(main): Invoke write_tm_constrs_h.
* genrecog.c (write_header): Add tm-constrs.h to included headers.
* Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h.
(object_out_file): Add tm-constrs.h dependency.
(insn-emit.o): Same.
(insn-output.o): Same.
(insn-peep.o): Same.
(insn-preds.o): Same.
(insn-recog.o): Same.
(tm-constsr.h): New target.
(s-constrs-h): New target.
* config/rs6000/constraints.md: New file.
* config/rs6000/rs6000.c: Include tm-constrs.h.
(num_insn_constant_wide): Convert to satisfies_constraint.
(rs6000_rtx_costs): Convert to satisfies_constraint.
* config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete.
(CONST_OK_FOR_LETTER_P): Delete.
(CONST_DOUBLE_OK_FOR_LETTER_P): Delete.
(EXTRA_CONSTRAINT): Delete.
(EXTRA_MEMORY_CONSTRAINT): Delete.
(EXTRA_ADDRESS_CONSTRAINT): Delete.
* config/rs6000/predicates.md: Convert to satisfies_constraint.
* config/rs6000/rs6000.md: Include constraints.md. Convert to
satisfies_constraint.
* config/i386/i386.c: Include tm-constrs.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112508 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genpreds.c')
-rw-r--r-- | gcc/genpreds.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/gcc/genpreds.c b/gcc/genpreds.c index 425e7253f09..5289ebb0445 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -947,13 +947,19 @@ write_regclass_for_constraint (void) /* Write out the functions which compute whether a given value matches a given non-register constraint. */ static void -write_satisfies_constraint_fns (void) +write_tm_constrs_h (void) { struct constraint_data *c; + struct pred_data *p; + + printf ("\ +/* Generated automatically by the program '%s'\n\ + from the machine description file '%s'. */\n\n", progname, in_fname); + + puts ("\ +#ifndef GCC_TM_CONSTRS_H\n\ +#define GCC_TM_CONSTRS_H\n"); - /* A fair number of places include tm_p.h without including rtl.h. */ - puts ("#ifdef GCC_RTL_H\n"); - FOR_ALL_CONSTRAINTS (c) if (!c->is_register) { @@ -995,8 +1001,7 @@ write_satisfies_constraint_fns (void) write_predicate_expr (c->exp); fputs (";\n}\n", stdout); } - - puts ("\n#endif /* rtl.h visible */\n"); + puts ("#endif /* tm-constrs.h */"); } /* Write out the wrapper function, constraint_satisfied_p, that maps @@ -1172,10 +1177,6 @@ write_tm_preds_h (void) "insn_extra_address_constraint (lookup_constraint (s_))\n"); else puts ("#define EXTRA_ADDRESS_CONSTRAINT(c_,s_) false\n"); - - if (have_const_int_constraints || have_const_dbl_constraints - || have_extra_constraints) - write_satisfies_constraint_fns (); } puts ("#endif /* tm-preds.h */"); @@ -1216,7 +1217,8 @@ write_insn_preds_c (void) #include \"resource.h\"\n\ #include \"toplev.h\"\n\ #include \"reload.h\"\n\ -#include \"regs.h\"\n"); +#include \"regs.h\"\n\ +#include \"tm-constrs.h\"\n"); FOR_ALL_PREDICATES (p) write_one_predicate_function (p); @@ -1242,6 +1244,8 @@ write_insn_preds_c (void) /* Argument parsing. */ static bool gen_header; +static bool gen_constrs; + static bool parse_option (const char *opt) { @@ -1250,6 +1254,11 @@ parse_option (const char *opt) gen_header = true; return 1; } + else if (!strcmp (opt, "-c")) + { + gen_constrs = true; + return 1; + } else return 0; } @@ -1291,6 +1300,8 @@ main (int argc, char **argv) if (gen_header) write_tm_preds_h (); + else if (gen_constrs) + write_tm_constrs_h (); else write_insn_preds_c (); |