Lines Matching defs:output_file
291 static FILE *output_file;
6959 fputs ("0 /* This is dummy el because the vect is empty */", output_file);
6963 fprintf (output_file, "%5ld", (long) vect[i]);
6967 fputs (",\n", output_file);
6970 fputs (", ", output_file);
7199 fprintf (output_file, "struct %s\n{\n", CHIP_NAME);
7204 fprintf (output_file, " ");
7205 output_state_member_type (output_file, automaton);
7206 fprintf (output_file, " ");
7207 output_chip_member_name (output_file, automaton);
7208 fprintf (output_file, ";\n");
7210 fprintf (output_file, "};\n\n");
7212 fprintf (output_file, "static struct %s %s;\n\n", CHIP_NAME, CHIP_NAME);
7237 fprintf (output_file,
7239 fprintf (output_file, "static const ");
7240 output_range_type (output_file, 0, automaton->insn_equiv_classes_num);
7241 fprintf (output_file, " ");
7242 output_translate_vect_name (output_file, automaton);
7243 fprintf (output_file, "[] ATTRIBUTE_UNUSED = {\n");
7245 fprintf (output_file, "};\n\n");
7304 fprintf (output_file, "/* Vector for %s. */\n", table_name);
7305 fprintf (output_file, "static const ");
7306 output_range_type (output_file, tab->min_comb_vect_el_value,
7308 fprintf (output_file, " ");
7309 (*output_full_vect_name_func) (output_file, tab->automaton);
7310 fprintf (output_file, "[] ATTRIBUTE_UNUSED = {\n");
7312 fprintf (output_file, "};\n\n");
7316 fprintf (output_file, "/* Comb vector for %s. */\n", table_name);
7317 fprintf (output_file, "static const ");
7318 output_range_type (output_file, tab->min_comb_vect_el_value,
7320 fprintf (output_file, " ");
7321 (*output_comb_vect_name_func) (output_file, tab->automaton);
7322 fprintf (output_file, "[] ATTRIBUTE_UNUSED = {\n");
7324 fprintf (output_file, "};\n\n");
7325 fprintf (output_file, "/* Check vector for %s. */\n", table_name);
7326 fprintf (output_file, "static const ");
7327 output_range_type (output_file, 0, tab->automaton->achieved_states_num);
7328 fprintf (output_file, " ");
7329 (*output_check_vect_name_func) (output_file, tab->automaton);
7330 fprintf (output_file, "[] = {\n");
7332 fprintf (output_file, "};\n\n");
7333 fprintf (output_file, "/* Base vector for %s. */\n", table_name);
7334 fprintf (output_file, "static const ");
7335 output_range_type (output_file, tab->min_base_vect_el_value,
7337 fprintf (output_file, " ");
7338 (*output_base_vect_name_func) (output_file, tab->automaton);
7339 fprintf (output_file, "[] = {\n");
7341 fprintf (output_file, "};\n\n");
7719 fprintf (output_file, "/* Vector of min issue delay of insns. */\n");
7720 fprintf (output_file, "static const ");
7721 output_range_type (output_file, 0, automaton->max_min_delay);
7722 fprintf (output_file, " ");
7723 output_min_issue_delay_vect_name (output_file, automaton);
7724 fprintf (output_file, "[] ATTRIBUTE_UNUSED = {\n");
7752 fprintf (output_file, "};\n\n");
7793 fprintf (output_file, "/* Vector for locked state flags. */\n");
7794 fprintf (output_file, "static const ");
7795 output_range_type (output_file, 0, 1);
7796 fprintf (output_file, " ");
7797 output_dead_lock_vect_name (output_file, automaton);
7798 fprintf (output_file, "[] = {\n");
7800 fprintf (output_file, "};\n\n");
7846 fprintf (output_file, "\n#if %s\n", CPU_UNITS_QUERY_MACRO_NAME);
7847 fprintf (output_file, "/* Vector for reserved units of states. */\n");
7848 fprintf (output_file, "static const ");
7849 output_range_type (output_file, 0, 255);
7850 fprintf (output_file, " ");
7851 output_reserved_units_table_name (output_file, automaton);
7852 fprintf (output_file, "[] = {\n");
7854 fprintf (output_file, "};\n#endif /* #if %s */\n\n",
7878 fprintf (output_file, "\n#define %s %d\n\n", ADVANCE_CYCLE_VALUE_NAME,
7881 fprintf (output_file, "\n#define %s %d\n\n", COLLAPSE_NDFA_VALUE_NAME,
7914 fprintf (output_file, "\nconst int max_insn_queue_index = %d;\n\n",
7947 fprintf (output_file, " case %d: /* %s */\n",
7970 fprintf (output_file, "\n %s = ", TEMPORARY_VARIABLE_NAME);
7971 output_min_issue_delay_vect_name (output_file, automaton);
7972 fprintf (output_file,
7975 output_translate_vect_name (output_file, automaton);
7976 fprintf (output_file, " [%s] + ", INTERNAL_INSN_CODE_NAME);
7977 fprintf (output_file, "%s->", CHIP_PARAMETER_NAME);
7978 output_chip_member_name (output_file, automaton);
7979 fprintf (output_file, " * %d", automaton->insn_equiv_classes_num);
7981 fprintf (output_file, "];\n");
7984 fprintf (output_file, ") / %d];\n",
7986 fprintf (output_file, " %s = (%s >> (8 - ((",
7988 output_translate_vect_name (output_file, automaton);
7989 fprintf (output_file, " [%s] + ", INTERNAL_INSN_CODE_NAME);
7990 fprintf (output_file, "%s->", CHIP_PARAMETER_NAME);
7991 output_chip_member_name (output_file, automaton);
7992 fprintf (output_file, " * %d)", automaton->insn_equiv_classes_num);
7994 (output_file, " %% %d + 1) * %d)) & %d;\n",
8001 fprintf (output_file, " %s = %s;\n",
8005 fprintf (output_file, " if (%s > %s)\n",
8007 fprintf (output_file, " %s = %s;\n",
8011 fprintf (output_file, " break;\n\n");
8018 fprintf (output_file,
8022 fprintf (output_file, "{\n int %s ATTRIBUTE_UNUSED;\n int %s = -1;\n",
8024 fprintf (output_file, "\n switch (%s)\n {\n", INTERNAL_INSN_CODE_NAME);
8026 fprintf (output_file,
8029 fprintf (output_file, " return %s;\n", RESULT_VARIABLE_NAME);
8030 fprintf (output_file, "}\n\n");
8040 fprintf (output_file, " {\n");
8047 fprintf (output_file, " ");
8048 output_state_member_type (output_file, el->automaton);
8049 fprintf (output_file, " ");
8050 output_temp_chip_member_name (output_file, el->automaton);
8051 fprintf (output_file, ";\n");
8056 fprintf (output_file, "\n %s = ", TEMPORARY_VARIABLE_NAME);
8057 output_trans_base_vect_name (output_file, el->automaton);
8058 fprintf (output_file, " [%s->", CHIP_PARAMETER_NAME);
8059 output_chip_member_name (output_file, el->automaton);
8060 fprintf (output_file, "] + ");
8061 output_translate_vect_name (output_file, el->automaton);
8062 fprintf (output_file, " [%s];\n", INTERNAL_INSN_CODE_NAME);
8063 fprintf (output_file, " if (");
8064 output_trans_check_vect_name (output_file, el->automaton);
8065 fprintf (output_file, " [%s] != %s->",
8067 output_chip_member_name (output_file, el->automaton);
8068 fprintf (output_file, ")\n");
8069 fprintf (output_file, " return %s (%s, %s);\n",
8072 fprintf (output_file, " else\n");
8073 fprintf (output_file, " ");
8075 output_temp_chip_member_name (output_file, el->automaton);
8078 fprintf (output_file, "%s->", CHIP_PARAMETER_NAME);
8079 output_chip_member_name (output_file, el->automaton);
8081 fprintf (output_file, " = ");
8082 output_trans_comb_vect_name (output_file, el->automaton);
8083 fprintf (output_file, " [%s];\n", TEMPORARY_VARIABLE_NAME);
8087 fprintf (output_file, "\n %s = ", TEMPORARY_VARIABLE_NAME);
8088 output_trans_full_vect_name (output_file, el->automaton);
8089 fprintf (output_file, " [");
8090 output_translate_vect_name (output_file, el->automaton);
8091 fprintf (output_file, " [%s] + ", INTERNAL_INSN_CODE_NAME);
8092 fprintf (output_file, "%s->", CHIP_PARAMETER_NAME);
8093 output_chip_member_name (output_file, el->automaton);
8094 fprintf (output_file, " * %d];\n",
8096 fprintf (output_file, " if (%s >= %d)\n",
8098 fprintf (output_file, " return %s (%s, %s);\n",
8101 fprintf (output_file, " else\n ");
8103 output_temp_chip_member_name (output_file, el->automaton);
8106 fprintf (output_file, "%s->", CHIP_PARAMETER_NAME);
8107 output_chip_member_name (output_file, el->automaton);
8109 fprintf (output_file, " = %s;\n", TEMPORARY_VARIABLE_NAME);
8117 fprintf (output_file, " %s->", CHIP_PARAMETER_NAME);
8118 output_chip_member_name (output_file, el->automaton);
8119 fprintf (output_file, " = ");
8120 output_temp_chip_member_name (output_file, el->automaton);
8121 fprintf (output_file, ";\n");
8123 fprintf (output_file, " return -1;\n");
8124 fprintf (output_file, " }\n");
8131 fprintf (output_file,
8135 fprintf (output_file, "{\n int %s ATTRIBUTE_UNUSED;\n", TEMPORARY_VARIABLE_NAME);
8136 fprintf (output_file, "\n switch (%s)\n {\n", INTERNAL_INSN_CODE_NAME);
8138 fprintf (output_file, "\n default:\n return -1;\n }\n");
8139 fprintf (output_file, "}\n\n");
8156 fprintf (output_file, " gcc_checking_assert (%s != 0);\n"
8172 fprintf (output_file, "\
8188 fprintf (output_file, "\
8196 fprintf (output_file,
8199 fprintf (output_file, " %s = %s[uid];\n",
8201 fprintf (output_file, "\
8211 fprintf (output_file, " return %s;\n}\n\n", INTERNAL_INSN_CODE_NAME);
8218 fprintf (output_file, "int\n%s (%s %s, rtx %s)\n",
8221 fprintf (output_file, "{\n int %s;\n", INTERNAL_INSN_CODE_NAME);
8222 fprintf (output_file, "\n if (%s == 0)\n", INSN_PARAMETER_NAME);
8223 fprintf (output_file, " %s = %s;\n",
8227 fprintf (output_file, " else if (%s == const0_rtx)\n",
8229 fprintf (output_file, " %s = %s;\n",
8232 fprintf (output_file, " else\n {\n");
8233 fprintf (output_file, " %s = %s (as_a <rtx_insn *> (%s));\n",
8236 fprintf (output_file, " if (%s > %s)\n return -1;\n }\n",
8238 fprintf (output_file, " return %s (%s, (struct %s *) %s);\n}\n\n",
8246 fprintf (output_file, "int\n%s (%s %s, rtx_insn *%s)\n",
8249 fprintf (output_file, "{\n int %s;\n", INTERNAL_INSN_CODE_NAME);
8250 fprintf (output_file, "\n if (%s != 0)\n {\n", INSN_PARAMETER_NAME);
8251 fprintf (output_file, " %s = %s (%s);\n", INTERNAL_INSN_CODE_NAME,
8253 fprintf (output_file, " if (%s > %s)\n return 0;\n",
8255 fprintf (output_file, " }\n else\n %s = %s;\n",
8257 fprintf (output_file, "\n return %s (%s, (struct %s *) %s);\n",
8260 fprintf (output_file, "}\n\n");
8269 fprintf (output_file, "static int\n%s (struct %s *ARG_UNUSED (%s))\n",
8271 fprintf (output_file, "{\n");
8277 fprintf (output_file, " if (");
8278 output_dead_lock_vect_name (output_file, automaton);
8279 fprintf (output_file, " [%s->", CHIP_PARAMETER_NAME);
8280 output_chip_member_name (output_file, automaton);
8281 fprintf (output_file, "])\n return 1/* TRUE */;\n");
8283 fprintf (output_file, " return 0/* FALSE */;\n}\n\n");
8290 fprintf (output_file, "int\n%s (%s %s)\n",
8292 fprintf (output_file, "{\n return %s ((struct %s *) %s);\n}\n\n",
8300 fprintf (output_file, "static inline void\n%s (struct %s *%s)\n",
8302 fprintf (output_file, "{\n memset (%s, 0, sizeof (struct %s));\n}\n\n",
8310 fprintf (output_file, "int\n%s (void)\n", SIZE_FUNC_NAME);
8311 fprintf (output_file, "{\n return sizeof (struct %s);\n}\n\n", CHIP_NAME);
8318 fprintf (output_file, "void\n%s (%s %s)\n",
8320 fprintf (output_file, "{\n %s ((struct %s *) %s);\n}\n\n", INTERNAL_RESET_FUNC_NAME,
8328 fprintf (output_file,
8332 fprintf (output_file, "{\n struct %s %s;\n int %s, %s, transition;\n",
8339 fprintf (output_file, " memcpy (&%s, %s, sizeof (%s));\n",
8341 fprintf (output_file, " %s (&%s);\n", INTERNAL_RESET_FUNC_NAME, CHIP_NAME);
8342 fprintf (output_file, " transition = %s (%s, &%s);\n",
8344 fprintf (output_file, " gcc_assert (transition <= 0);\n");
8345 fprintf (output_file, " return %s (%s, &%s);\n",
8348 fprintf (output_file, "}\n\n");
8373 fprintf (output_file, " static const %s default_latencies[] =\n {",
8380 fputs ("\n ", output_file);
8383 fprintf (output_file, "% 4d,",
8387 fputs ("\n };\n", output_file);
8398 fprintf (output_file, "static int\n"
8404 fprintf (output_file, "{\n");
8408 fputs (" return 0;\n}\n\n", output_file);
8412 fprintf (output_file, " switch (%s)\n {\n", INTERNAL_INSN_CODE_NAME);
8418 fprintf (output_file,
8429 fprintf (output_file, " case %d:\n",
8438 fprintf (output_file, " return %d;\n",
8443 fprintf (output_file,
8447 fprintf (output_file, " return %d;\n",
8456 fprintf (output_file, " break;\n");
8458 fputs (" }\n break;\n", output_file);
8461 fprintf (output_file, " }\n return default_latencies[%s];\n}\n\n",
8474 fprintf (output_file, "static int\n%s (int %s ATTRIBUTE_UNUSED)\n",
8476 fprintf (output_file, "{\n");
8480 fputs (" return 0;\n}\n\n", output_file);
8484 fprintf (output_file, " switch (%s)\n {\n", INTERNAL_INSN_CODE_NAME);
8491 fprintf (output_file,
8501 fprintf (output_file, " return %d; }\n break;\n", max);
8504 fprintf (output_file, " }\n return default_latencies[%s];\n}\n\n",
8512 fprintf (output_file, "int\n%s (rtx_insn *%s, rtx_insn *%s)\n",
8514 fprintf (output_file, "{\n int %s, %s;\n",
8520 fprintf (output_file, " return %s (%s, %s, %s, %s);\n}\n\n",
8530 fprintf (output_file, "int\n%s (rtx_insn *%s)\n",
8532 fprintf (output_file, "{\n int %s;\n",
8536 fprintf (output_file, " return %s (%s);\n}\n\n",
8547 fprintf (output_file,
8554 fprintf (output_file, " fputs (\"%s\", %s);\n}\n\n",
8561 output_file);
8571 fprintf (output_file, "\n \"%s\",",
8578 fprintf (output_file, "\n \"%s\"\n };\n int %s;\n\n",
8581 fprintf (output_file, " if (%s == 0)\n %s = %s;\n",
8584 fprintf (output_file, " else\n\
8595 fprintf (output_file, " fputs (reservation_names[%s], %s);\n}\n\n",
8636 fprintf (output_file, "int\n%s (const char *%s)\n",
8638 fprintf (output_file, "{\n struct %s {const char *%s; int %s;};\n",
8640 fprintf (output_file, " int %s, %s, %s, %s;\n", CMP_VARIABLE_NAME,
8642 fprintf (output_file, " static struct %s %s [] =\n {\n",
8649 fprintf (output_file, " {\"%s\", %d},\n",
8651 fprintf (output_file, " };\n\n");
8652 fprintf (output_file, " /* The following is binary search: */\n");
8653 fprintf (output_file, " %s = 0;\n", LOW_VARIABLE_NAME);
8654 fprintf (output_file, " %s = sizeof (%s) / sizeof (struct %s) - 1;\n",
8656 fprintf (output_file, " while (%s <= %s)\n {\n",
8658 fprintf (output_file, " %s = (%s + %s) / 2;\n",
8660 fprintf (output_file, " %s = strcmp (%s, %s [%s].%s);\n",
8663 fprintf (output_file, " if (%s < 0)\n", CMP_VARIABLE_NAME);
8664 fprintf (output_file, " %s = %s - 1;\n",
8666 fprintf (output_file, " else if (%s > 0)\n", CMP_VARIABLE_NAME);
8667 fprintf (output_file, " %s = %s + 1;\n",
8669 fprintf (output_file, " else\n");
8670 fprintf (output_file, " return %s [%s].%s;\n }\n",
8672 fprintf (output_file, " return -1;\n}\n\n");
8684 fprintf (output_file, "int\n%s (%s %s, int %s)\n",
8688 fprintf (output_file, "{\n gcc_assert (%s >= 0 && %s < %d);\n",
8696 fprintf (output_file, " if ((");
8697 output_reserved_units_table_name (output_file, automaton);
8698 fprintf (output_file, " [((struct %s *) %s)->", CHIP_NAME, STATE_NAME);
8699 output_chip_member_name (output_file, automaton);
8700 fprintf (output_file, " * %d + %s / 8] >> (%s %% 8)) & 1)\n",
8703 fprintf (output_file, " return 1;\n");
8705 fprintf (output_file, " return 0;\n}\n\n");
8713 fprintf (output_file,
8720 fprintf (output_file, " return false;\n}\n\n");
8724 fprintf (output_file, " int %s;\n\n", INTERNAL_INSN_CODE_NAME);
8726 fprintf (output_file, " if (%s == 0)\n %s = %s;\n",
8729 fprintf (output_file, " else\n\
8740 fprintf (output_file, " return %s != %s;\n}\n\n",
8749 fprintf (output_file,
8752 fprintf (output_file,
8758 fprintf (output_file,
8762 fprintf (output_file,
8773 fprintf (output_file,
8776 fprintf (output_file, " %s = XNEWVEC (int, %s);\n",
8778 fprintf (output_file, " %s ();\n}\n\n", DFA_CLEAN_INSN_CACHE_FUNC_NAME);
8785 fprintf (output_file, "void\n%s (void)\n{\n free (%s);\n}\n\n",
9318 output_file = stdout;
9518 fprintf (output_file, "\nstatic int *%s;\n", DFA_INSN_CODES_VARIABLE_NAME);
9519 fprintf (output_file, "\nstatic int %s;\n\n",
9537 fprintf (output_file, "\n#if %s\n\n", CPU_UNITS_QUERY_MACRO_NAME);
9541 fprintf (output_file, "\n#endif /* #if %s */\n\n",