diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-09 08:45:12 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-09 08:45:12 +0000 |
commit | e714561a2fab73a2592aed0418a00b0c906c0711 (patch) | |
tree | 8171a7fe230372ff8186c6f2b999f0d7b358565c /gcc/genoutput.c | |
parent | 701649fa8939e9a3b6328afc9fca2abe4b55c312 (diff) | |
download | gcc-e714561a2fab73a2592aed0418a00b0c906c0711.zip gcc-e714561a2fab73a2592aed0418a00b0c906c0711.tar.gz gcc-e714561a2fab73a2592aed0418a00b0c906c0711.tar.bz2 |
gensupport.c (init_rtx_reader_args_cb): Start counting code generating patterns from 1 to free up 0 for CODE_FOR_nothing.
* gensupport.c (init_rtx_reader_args_cb): Start counting code
generating patterns from 1 to free up 0 for CODE_FOR_nothing.
* gencodes.c (main): Give CODE_FOR_nothing the value 0. Add
the LAST_INSN_CODE marker at the end.
* genoutput.c (nothing): New static struct data.
(idata): Initialize to ¬hing.
(idata_end): Initialize to ¬hing.next.
(init_insn_for_nothing): New function to create dummy 'nothing' insn.
(main): Use it.
* genpeep.c (insn_code_number): Remove global variable.
(gen_peephole): Take it as an argument instead.
(main): Take insn_code_number from read_md_rtx.
* optabs.h: Revert r161809:
(optab_handlers): Change type of insn_code back to insn_code.
(optab_handler, widening_optab_handler, set_optab_handler,
set_widening_optab_handler, convert_optab_handler,
set_convert_optab_handler, direct_optab_handler,
set_direct_optab_handler): Remove int casts.
Revert to treating the insn_code field as "insn_code".
From-SVN: r189366
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r-- | gcc/genoutput.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c index bae2381..4e4e1ed 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -1,6 +1,7 @@ /* Generate code from to output assembler insns as recognized from rtl. Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2012 + Free Software Foundation, Inc. This file is part of GCC. @@ -171,9 +172,16 @@ struct data struct operand_data operand[MAX_MAX_OPERANDS]; }; +/* A dummy insn, for CODE_FOR_nothing. */ +static struct data nothing; + /* This variable points to the first link in the insn chain. */ +static struct data *idata = ¬hing; + +/* This variable points to the end of the insn chain. This is where + everything relevant from the machien description is appended to. */ +static struct data **idata_end = ¬hing.next; -static struct data *idata, **idata_end = &idata; static void output_prologue (void); static void output_operand_data (void); @@ -987,6 +995,14 @@ gen_split (rtx split, int lineno) place_operands (d); } +static void +init_insn_for_nothing (void) +{ + memset (¬hing, 0, sizeof (nothing)); + nothing.name = "*placeholder_for_nothing"; + nothing.filename = "<internal>"; +} + extern int main (int, char **); int @@ -996,11 +1012,12 @@ main (int argc, char **argv) progname = "genoutput"; + init_insn_for_nothing (); + if (!init_rtx_reader_args (argc, argv)) return (FATAL_EXIT_CODE); output_prologue (); - next_code_number = 0; next_index_number = 0; /* Read the machine description. */ |