diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 03:11:36 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 03:11:36 +0000 |
commit | e0020c9fe3d2c91658ad0f59cb6a55c44f909db3 (patch) | |
tree | b406472295ae0b130894cc19f02f43b36157fec6 /contrib/gcc/genflags.c | |
parent | b754d213ab76dee1e7bcd5acb4becd5658c0ca99 (diff) | |
parent | 5e00ec74d8ce58f99801200d4d3d0412c7cc1b28 (diff) | |
download | FreeBSD-src-e0020c9fe3d2c91658ad0f59cb6a55c44f909db3.zip FreeBSD-src-e0020c9fe3d2c91658ad0f59cb6a55c44f909db3.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r132718,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc/genflags.c')
-rw-r--r-- | contrib/gcc/genflags.c | 61 |
1 files changed, 25 insertions, 36 deletions
diff --git a/contrib/gcc/genflags.c b/contrib/gcc/genflags.c index 9480681..d310273 100644 --- a/contrib/gcc/genflags.c +++ b/contrib/gcc/genflags.c @@ -2,7 +2,7 @@ - some flags HAVE_... saying which simple standard instructions are available for this machine. Copyright (C) 1987, 1991, 1995, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -22,8 +22,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "bconfig.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "rtl.h" #include "obstack.h" #include "errors.h" @@ -38,17 +40,16 @@ static int max_id_len; /* Max operand encountered in a scan over some insn. */ static int max_opno; -static void max_operand_1 PARAMS ((rtx)); -static int num_operands PARAMS ((rtx)); -static void gen_proto PARAMS ((rtx)); -static void gen_macro PARAMS ((const char *, int, int)); -static void gen_insn PARAMS ((rtx)); +static void max_operand_1 (rtx); +static int num_operands (rtx); +static void gen_proto (rtx); +static void gen_macro (const char *, int, int); +static void gen_insn (rtx); /* Count the number of match_operand's found. */ static void -max_operand_1 (x) - rtx x; +max_operand_1 (rtx x) { RTX_CODE code; int i; @@ -80,8 +81,7 @@ max_operand_1 (x) } static int -num_operands (insn) - rtx insn; +num_operands (rtx insn) { int len = XVECLEN (insn, 1); int i; @@ -98,9 +98,7 @@ num_operands (insn) of arguments it takes. Any missing arguments are assumed to be at the end. */ static void -gen_macro (name, real, expect) - const char *name; - int real, expect; +gen_macro (const char *name, int real, int expect) { int i; @@ -129,8 +127,7 @@ gen_macro (name, real, expect) does nothing. */ static void -gen_proto (insn) - rtx insn; +gen_proto (rtx insn) { int num = num_operands (insn); int i; @@ -157,9 +154,9 @@ gen_proto (insn) } if (truth != 0) - printf ("extern rtx gen_%-*s PARAMS ((", max_id_len, name); + printf ("extern rtx gen_%-*s (", max_id_len, name); else - printf ("static inline rtx gen_%-*s PARAMS ((", max_id_len, name); + printf ("static inline rtx gen_%-*s (", max_id_len, name); if (num == 0) fputs ("void", stdout); @@ -167,11 +164,11 @@ gen_proto (insn) { for (i = 1; i < num; i++) fputs ("rtx, ", stdout); - + fputs ("rtx", stdout); } - puts ("));"); + puts (");"); /* Some back ends want to take the address of generator functions, so we cannot simply use #define for these dummy definitions. */ @@ -182,21 +179,18 @@ gen_proto (insn) { putchar ('('); for (i = 0; i < num-1; i++) - printf ("%c, ", 'a' + i); - printf ("%c)\n", 'a' + i); - for (i = 0; i < num; i++) - printf (" rtx %c ATTRIBUTE_UNUSED;\n", 'a' + i); + printf ("rtx %c ATTRIBUTE_UNUSED, ", 'a' + i); + printf ("rtx %c ATTRIBUTE_UNUSED)\n", 'a' + i); } else - puts ("()"); + puts ("(void)"); puts ("{\n return 0;\n}"); } } static void -gen_insn (insn) - rtx insn; +gen_insn (rtx insn) { const char *name = XSTR (insn, 0); const char *p; @@ -215,7 +209,7 @@ gen_insn (insn) max_id_len = len; if (truth == 0) - /* emit nothing */; + /* Emit nothing. */; else if (truth == 1) printf ("#define HAVE_%s 1\n", name); else @@ -236,12 +230,8 @@ gen_insn (insn) obstack_grow (&obstack, &insn, sizeof (rtx)); } -extern int main PARAMS ((int, char **)); - int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { rtx desc; rtx dummy; @@ -260,7 +250,7 @@ main (argc, argv) if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE) return (FATAL_EXIT_CODE); - + puts ("/* Generated automatically by the program `genflags'"); puts (" from the machine description file `md'. */\n"); puts ("#ifndef GCC_INSN_FLAGS_H"); @@ -297,8 +287,7 @@ main (argc, argv) /* Define this so we can link with print-rtl.o to get debug_rtx function. */ const char * -get_insn_name (code) - int code ATTRIBUTE_UNUSED; +get_insn_name (int code ATTRIBUTE_UNUSED) { return NULL; } |