annotate gcc/genmddump.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Generate code from machine description to recognize rtl as insns.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1987-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
7 under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
14 License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 /* This program is used to produce tmp-mddump.md, which represents
kono
parents:
diff changeset
22 md-file with expanded iterators and after define_subst transformation
kono
parents:
diff changeset
23 is performed.
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 The only argument of the program is a source md-file (e.g.
kono
parents:
diff changeset
26 config/i386/i386.md). STDERR is used for the program output. */
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 #include "bconfig.h"
kono
parents:
diff changeset
29 #include "system.h"
kono
parents:
diff changeset
30 #include "coretypes.h"
kono
parents:
diff changeset
31 #include "tm.h"
kono
parents:
diff changeset
32 #include "rtl.h"
kono
parents:
diff changeset
33 #include "errors.h"
kono
parents:
diff changeset
34 #include "read-md.h"
kono
parents:
diff changeset
35 #include "gensupport.h"
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 extern int main (int, const char **);
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 int
kono
parents:
diff changeset
41 main (int argc, const char **argv)
kono
parents:
diff changeset
42 {
kono
parents:
diff changeset
43 progname = "genmddump";
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 if (!init_rtx_reader_args (argc, argv))
kono
parents:
diff changeset
46 return (FATAL_EXIT_CODE);
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 /* Read the machine description. */
kono
parents:
diff changeset
49 md_rtx_info info;
kono
parents:
diff changeset
50 while (read_md_rtx (&info))
kono
parents:
diff changeset
51 {
kono
parents:
diff changeset
52 printf (";; %s: %d\n", info.loc.filename, info.loc.lineno);
kono
parents:
diff changeset
53 print_inline_rtx (stdout, info.def, 0);
kono
parents:
diff changeset
54 printf ("\n\n");
kono
parents:
diff changeset
55 }
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 fflush (stdout);
kono
parents:
diff changeset
58 return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
kono
parents:
diff changeset
59 }