1 /* Generate code from machine description to recognize rtl as insns.
2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 GCC is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
21 /* This program is used to produce tmp-mddump.md, which represents
22 md-file with expanded iterators and after define_subst transformation
25 The only argument of the program is a source md-file (e.g.
26 config/i386/i386.md). STDERR is used for the program output. */
30 #include "coretypes.h"
35 #include "gensupport.h"
38 extern int main (int, char **);
41 main (int argc
, char **argv
)
45 int code
; /* not used */
46 progname
= "genmddump";
48 if (!init_rtx_reader_args (argc
, argv
))
49 return (FATAL_EXIT_CODE
);
51 /* Read the machine description. */
54 desc
= read_md_rtx (&pattern_lineno
, &code
);
57 printf (";; %s: %d\n", read_md_filename
, pattern_lineno
);
58 print_inline_rtx (stdout
, desc
, 0);
63 return (ferror (stdout
) != 0 ? FATAL_EXIT_CODE
: SUCCESS_EXIT_CODE
);