aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/genattr-common.c
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-10-13 16:28:19 -0700
committerDan Albert <danalbert@google.com>2015-10-13 16:28:19 -0700
commita8c075f72b231c37823661ba0d7d082a21cd39d9 (patch)
tree395aa3b848d56037292e50466643453485073018 /gcc-4.8/gcc/genattr-common.c
parent5aff2e0142aca13849b4e51de503e71d5010efa6 (diff)
downloadtoolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.zip
toolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.tar.gz
toolchain_gcc-a8c075f72b231c37823661ba0d7d082a21cd39d9.tar.bz2
Remove gcc-4.8.
Change-Id: Iee9c6985c613f58c82e33a91722d371579eb290f
Diffstat (limited to 'gcc-4.8/gcc/genattr-common.c')
-rw-r--r--gcc-4.8/gcc/genattr-common.c115
1 files changed, 0 insertions, 115 deletions
diff --git a/gcc-4.8/gcc/genattr-common.c b/gcc-4.8/gcc/genattr-common.c
deleted file mode 100644
index 69bfcae..0000000
--- a/gcc-4.8/gcc/genattr-common.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Generate attribute information shared between driver and core
- compilers (insn-attr-common.h) from machine description. Split out
- of genattr.c.
- Copyright (C) 1991-2013 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-
-#include "bconfig.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "rtl.h"
-#include "errors.h"
-#include "read-md.h"
-#include "gensupport.h"
-
-static void
-write_upcase (const char *str)
-{
- for (; *str; str++)
- putchar (TOUPPER(*str));
-}
-
-static void
-gen_attr (rtx attr)
-{
- const char *p, *tag;
-
- p = XSTR (attr, 1);
- if (*p != '\0')
- {
- printf ("enum attr_%s {", XSTR (attr, 0));
-
- while ((tag = scan_comma_elt (&p)) != 0)
- {
- write_upcase (XSTR (attr, 0));
- putchar ('_');
- while (tag != p)
- putchar (TOUPPER (*tag++));
- if (*p == ',')
- fputs (", ", stdout);
- }
- fputs ("};\n", stdout);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- rtx desc;
- bool have_delay = false;
- bool have_sched = false;
-
- progname = "genattr-common";
-
- if (!init_rtx_reader_args (argc, argv))
- return (FATAL_EXIT_CODE);
-
- puts ("/* Generated automatically by the program `genattr-common'");
- puts (" from the machine description file `md'. */\n");
- puts ("#ifndef GCC_INSN_ATTR_COMMON_H");
- puts ("#define GCC_INSN_ATTR_COMMON_H\n");
-
- /* Read the machine description. */
-
- while (1)
- {
- int line_no, insn_code_number;
-
- desc = read_md_rtx (&line_no, &insn_code_number);
- if (desc == NULL)
- break;
-
- if (GET_CODE (desc) == DEFINE_ATTR)
- gen_attr (desc);
-
- if (GET_CODE (desc) == DEFINE_DELAY)
- {
- if (!have_delay)
- {
- printf ("#define DELAY_SLOTS\n");
- have_delay = true;
- }
- }
- else if (GET_CODE (desc) == DEFINE_INSN_RESERVATION)
- {
- if (!have_sched)
- {
- printf ("#define INSN_SCHEDULING\n");
- have_sched = true;
- }
- }
- }
- puts ("\n#endif /* GCC_INSN_ATTR_COMMON_H */");
-
- if (ferror (stdout) || fflush (stdout) || fclose (stdout))
- return FATAL_EXIT_CODE;
-
- return SUCCESS_EXIT_CODE;
-}