Mercurial > hg > CbC > CbC_gcc
comparison gcc/genemit.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
23 #include "system.h" | 23 #include "system.h" |
24 #include "coretypes.h" | 24 #include "coretypes.h" |
25 #include "tm.h" | 25 #include "tm.h" |
26 #include "rtl.h" | 26 #include "rtl.h" |
27 #include "errors.h" | 27 #include "errors.h" |
28 #include "read-md.h" | |
28 #include "gensupport.h" | 29 #include "gensupport.h" |
29 | 30 |
30 | 31 |
31 static int max_opno; | 32 static int max_opno; |
32 static int max_dup_opno; | 33 static int max_dup_opno; |
396 or begin with '*'. They are in the machine description just | 397 or begin with '*'. They are in the machine description just |
397 to be recognized. */ | 398 to be recognized. */ |
398 if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*') | 399 if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*') |
399 return; | 400 return; |
400 | 401 |
401 printf ("/* %s:%d */\n", read_rtx_filename, lineno); | 402 printf ("/* %s:%d */\n", read_md_filename, lineno); |
402 | 403 |
403 /* Find out how many operands this function has. */ | 404 /* Find out how many operands this function has. */ |
404 operands = max_operand_vec (insn, 1); | 405 operands = max_operand_vec (insn, 1); |
405 if (max_dup_opno >= operands) | 406 if (max_dup_opno >= operands) |
406 fatal ("match_dup operand number has no match_operand"); | 407 fatal ("match_dup operand number has no match_operand"); |
511 for (i = 0; i < operands; i++) | 512 for (i = 0; i < operands; i++) |
512 printf (" operands[%d] = operand%d;\n", i, i); | 513 printf (" operands[%d] = operand%d;\n", i, i); |
513 | 514 |
514 /* Output the special code to be executed before the sequence | 515 /* Output the special code to be executed before the sequence |
515 is generated. */ | 516 is generated. */ |
516 print_rtx_ptr_loc (XSTR (expand, 3)); | 517 print_md_ptr_loc (XSTR (expand, 3)); |
517 printf ("%s\n", XSTR (expand, 3)); | 518 printf ("%s\n", XSTR (expand, 3)); |
518 | 519 |
519 /* Output code to copy the arguments back out of `operands' | 520 /* Output code to copy the arguments back out of `operands' |
520 (unless we aren't going to use them at all). */ | 521 (unless we aren't going to use them at all). */ |
521 if (XVEC (expand, 1) != 0) | 522 if (XVEC (expand, 1) != 0) |
640 /* The fourth operand of DEFINE_SPLIT is some code to be executed | 641 /* The fourth operand of DEFINE_SPLIT is some code to be executed |
641 before the actual construction. */ | 642 before the actual construction. */ |
642 | 643 |
643 if (XSTR (split, 3)) | 644 if (XSTR (split, 3)) |
644 { | 645 { |
645 print_rtx_ptr_loc (XSTR (split, 3)); | 646 print_md_ptr_loc (XSTR (split, 3)); |
646 printf ("%s\n", XSTR (split, 3)); | 647 printf ("%s\n", XSTR (split, 3)); |
647 } | 648 } |
648 | 649 |
649 /* Output code to copy the arguments back out of `operands' */ | 650 /* Output code to copy the arguments back out of `operands' */ |
650 for (i = 0; i < operands; i++) | 651 for (i = 0; i < operands; i++) |
830 { | 831 { |
831 rtx desc; | 832 rtx desc; |
832 | 833 |
833 progname = "genemit"; | 834 progname = "genemit"; |
834 | 835 |
835 if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE) | 836 if (!init_rtx_reader_args (argc, argv)) |
836 return (FATAL_EXIT_CODE); | 837 return (FATAL_EXIT_CODE); |
837 | 838 |
838 /* Assign sequential codes to all entries in the machine description | 839 /* Assign sequential codes to all entries in the machine description |
839 in parallel with the tables in insn-output.c. */ | 840 in parallel with the tables in insn-output.c. */ |
840 | 841 |
859 printf ("#include \"insn-config.h\"\n"); | 860 printf ("#include \"insn-config.h\"\n"); |
860 printf ("#include \"hard-reg-set.h\"\n"); | 861 printf ("#include \"hard-reg-set.h\"\n"); |
861 printf ("#include \"recog.h\"\n"); | 862 printf ("#include \"recog.h\"\n"); |
862 printf ("#include \"resource.h\"\n"); | 863 printf ("#include \"resource.h\"\n"); |
863 printf ("#include \"reload.h\"\n"); | 864 printf ("#include \"reload.h\"\n"); |
864 printf ("#include \"toplev.h\"\n"); | 865 printf ("#include \"diagnostic-core.h\"\n"); |
865 printf ("#include \"regs.h\"\n"); | 866 printf ("#include \"regs.h\"\n"); |
866 printf ("#include \"tm-constrs.h\"\n"); | 867 printf ("#include \"tm-constrs.h\"\n"); |
867 printf ("#include \"ggc.h\"\n"); | 868 printf ("#include \"ggc.h\"\n"); |
868 printf ("#include \"basic-block.h\"\n"); | 869 printf ("#include \"basic-block.h\"\n"); |
869 printf ("#include \"integrate.h\"\n\n"); | 870 printf ("#include \"integrate.h\"\n\n"); |
885 case DEFINE_INSN: | 886 case DEFINE_INSN: |
886 gen_insn (desc, line_no); | 887 gen_insn (desc, line_no); |
887 break; | 888 break; |
888 | 889 |
889 case DEFINE_EXPAND: | 890 case DEFINE_EXPAND: |
890 printf ("/* %s:%d */\n", read_rtx_filename, line_no); | 891 printf ("/* %s:%d */\n", read_md_filename, line_no); |
891 gen_expand (desc); | 892 gen_expand (desc); |
892 break; | 893 break; |
893 | 894 |
894 case DEFINE_SPLIT: | 895 case DEFINE_SPLIT: |
895 printf ("/* %s:%d */\n", read_rtx_filename, line_no); | 896 printf ("/* %s:%d */\n", read_md_filename, line_no); |
896 gen_split (desc); | 897 gen_split (desc); |
897 break; | 898 break; |
898 | 899 |
899 case DEFINE_PEEPHOLE2: | 900 case DEFINE_PEEPHOLE2: |
900 printf ("/* %s:%d */\n", read_rtx_filename, line_no); | 901 printf ("/* %s:%d */\n", read_md_filename, line_no); |
901 gen_split (desc); | 902 gen_split (desc); |
902 break; | 903 break; |
903 | 904 |
904 default: | 905 default: |
905 break; | 906 break; |