diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-11-25 16:58:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-11-25 16:58:32 +0000 |
commit | 913d08334a78012ba496b669bc0077a98d6e9b3c (patch) | |
tree | 255cdd5d37dc128a7ad564ade1d1db3d7b9f9af2 /gcc/genrecog.c | |
parent | 7a12ace5bc2c9be0cbcd4b13bcd89f2e79a16318 (diff) | |
download | gcc-913d08334a78012ba496b669bc0077a98d6e9b3c.zip gcc-913d08334a78012ba496b669bc0077a98d6e9b3c.tar.gz gcc-913d08334a78012ba496b669bc0077a98d6e9b3c.tar.bz2 |
c-common.c (check_format_info): Don't call a variadic function with a non-literal format string.
* c-common.c (check_format_info): Don't call a variadic function
with a non-literal format string.
* c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise.
* c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else,
pedantic_lvalue_warning, error_init, pedwarn_init, warning_init):
Likewise.
* cccp.c (check_macro_name, do_xifdef, vwarning_with_line):
Likewise.
* collect2.c (collect_wait): Likewise.
* dbxout.c (dbxout_type): Likewise.
* gcc.c (do_spec_1): Likewise.
* genemit.c (gen_insn, gen_expand): Likewise.
* genrecog.c (write_switch, write_subroutine): Likewise.
* mips-tfile.c (catch_signal, botch): Likewise.
* print-rtl.c (print_rtx): Likewise.
* toplev.c (default_print_error_function, report_error_function,
_fatal_insn): Likewise.
From-SVN: r30666
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r-- | gcc/genrecog.c | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 464c4992..d428aff 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -1776,30 +1776,27 @@ write_switch (start, depth) || type == DT_elt_one_int || type == DT_elt_zero_wide) { - const char *str; - printf (" switch ("); switch (type) { case DT_mode: - str = "GET_MODE (x%d)"; + printf("GET_MODE (x%d)", depth); break; case DT_veclen: - str = "XVECLEN (x%d, 0)"; + printf("XVECLEN (x%d, 0)", depth); break; case DT_elt_zero_int: - str = "XINT (x%d, 0)"; + printf("XINT (x%d, 0)", depth); break; case DT_elt_one_int: - str = "XINT (x%d, 1)"; + printf("XINT (x%d, 1)", depth); break; case DT_elt_zero_wide: - str = "XWINT (x%d, 0)"; + printf("XWINT (x%d, 0)", depth); break; default: abort (); } - printf (str, depth); printf (")\n {\n"); do @@ -2159,31 +2156,6 @@ write_subroutine (head, type) struct decision_head *head; enum routine_type type; { - static const char * const proto_pattern[] = { - "%sint recog%s PROTO ((rtx, rtx, int *));\n", - "%srtx split%s PROTO ((rtx, rtx));\n", - "%srtx peephole2%s PROTO ((rtx, rtx, rtx *));\n" - }; - - static const char * const decl_pattern[] = { -"%sint\n\ -recog%s (x0, insn, pnum_clobbers)\n\ - register rtx x0;\n\ - rtx insn ATTRIBUTE_UNUSED;\n\ - int *pnum_clobbers ATTRIBUTE_UNUSED;\n", - -"%srtx\n\ -split%s (x0, insn)\n\ - register rtx x0;\n\ - rtx insn ATTRIBUTE_UNUSED;\n", - -"%srtx\n\ -peephole2%s (x0, insn, _plast_insn)\n\ - register rtx x0;\n\ - rtx insn ATTRIBUTE_UNUSED;\n\ - rtx *_plast_insn ATTRIBUTE_UNUSED;\n" - }; - int subfunction = head->first ? head->first->subroutine_number : 0; const char *s_or_e; char extension[32]; @@ -2198,8 +2170,32 @@ peephole2%s (x0, insn, _plast_insn)\n\ else strcpy (extension, "_insns"); - printf (proto_pattern[type], s_or_e, extension); - printf (decl_pattern[type], s_or_e, extension); + switch (type) + { + case RECOG: + printf ("%sint recog%s PROTO ((rtx, rtx, int *));\n", s_or_e, extension); + printf ("%sint\n\ +recog%s (x0, insn, pnum_clobbers)\n\ + register rtx x0;\n\ + rtx insn ATTRIBUTE_UNUSED;\n\ + int *pnum_clobbers ATTRIBUTE_UNUSED;\n", s_or_e, extension); + break; + case SPLIT: + printf ("%srtx split%s PROTO ((rtx, rtx));\n", s_or_e, extension); + printf ("%srtx\n\ +split%s (x0, insn)\n\ + register rtx x0;\n\ + rtx insn ATTRIBUTE_UNUSED;\n", s_or_e, extension); + break; + case PEEPHOLE2: + printf ("%srtx peephole2%s PROTO ((rtx, rtx, rtx *));\n", s_or_e, extension); + printf ("%srtx\n\ +peephole2%s (x0, insn, _plast_insn)\n\ + register rtx x0;\n\ + rtx insn ATTRIBUTE_UNUSED;\n\ + rtx *_plast_insn ATTRIBUTE_UNUSED;\n", s_or_e, extension); + break; + } printf ("{\n register rtx * const operands = &recog_data.operand[0];\n"); for (i = 1; i <= max_depth; i++) |