diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 08:45:12 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 08:45:12 +0000 |
commit | 5ab7f2859836f90a6b9ff0816bfdda210b97ecc7 (patch) | |
tree | 8171a7fe230372ff8186c6f2b999f0d7b358565c /gcc/gensupport.c | |
parent | bec5544e08aa0430ae786b18f6f15ae313b2e699 (diff) | |
download | gcc-5ab7f2859836f90a6b9ff0816bfdda210b97ecc7.tar.gz |
* 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".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index e56291e3a38..44443e2dce3 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -1,6 +1,6 @@ /* Support routines for the various generation passes. Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, Free Software Foundation, Inc. + 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -38,6 +38,10 @@ int insn_elision = 1; static struct obstack obstack; struct obstack *rtl_obstack = &obstack; +/* Counter for patterns that generate code: define_insn, define_expand, + define_split, define_peephole, and define_peephole2. See read_md_rtx(). + Any define_insn_and_splits are already in separate queues so that the + insn and the splitter get a unique number also. */ static int sequence_num; static int predicable_default; @@ -1397,7 +1401,9 @@ init_rtx_reader_args_cb (int argc, char **argv, condition_table = htab_create (500, hash_c_test, cmp_c_test, NULL); init_predicate_table (); obstack_init (rtl_obstack); - sequence_num = 0; + + /* Start at 1, to make 0 available for CODE_FOR_nothing. */ + sequence_num = 1; read_md_files (argc, argv, parse_opt, rtx_handle_directive); @@ -1419,7 +1425,11 @@ init_rtx_reader_args (int argc, char **argv) return init_rtx_reader_args_cb (argc, argv, 0); } -/* The entry point for reading a single rtx from an md file. */ +/* The entry point for reading a single rtx from an md file. Return + the rtx, or NULL if the md file has been fully processed. + Return the line where the rtx was found in LINENO. + Return the number of code generating rtx'en read since the start + of the md file in SEQNR. */ rtx read_md_rtx (int *lineno, int *seqnr) |