diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-24 17:59:51 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-24 17:59:51 +0000 |
commit | 7f265a085886012549a1fd7e1c76a0687963f000 (patch) | |
tree | c3042a200d6b63e1964f926ac1b634a9c69f950d /gcc/gensupport.c | |
parent | dcfaf3931605e637f363c7a33ed5cc24c802b7ca (diff) | |
download | gcc-7f265a085886012549a1fd7e1c76a0687963f000.tar.gz |
gcc/
* genflags.c (gen_macro): Delete.
(gen_proto): Don't create GEN.*CALL.* macros.
* gensupport.h (get_file_location): Declare.
* gensupport.c (rtx_locs): New variable.
(read_md_rtx): Record rtx locations.
(get_file_location): New function.
* target-insns.def (call, call_pop, call_value, call_value_pop)
(sibcall, sibcall_value): New patterns.
* gentarget-def.c (parse_argument): New function.
(def_target_insn): Use it. Handle optional operands. Raise an
error if an .md pattern has the wrong number of operands for the
pattern name. Remove the names of unused operands from the prototype.
* builtins.c (expand_builtin_apply): Use targetm functions
instead of HAVE_call_value and GEN_CALL_VALUE.
* calls.c (emit_call_1): Likewise. Remove support for sibcall_pop
and sibcall_value_pop.
* config/aarch64/aarch64.md (untyped_call): Use gen_call instead
of GEN_CALL.
* config/alpha/alpha.md (untyped_call): Likewise.
* config/iq2000/iq2000.md (untyped_call): Likewise.
* config/m68k/m68k.md (untyped_call): Likewise.
* config/mips/mips.md (untyped_call): Likewise.
* config/pa/pa.md (untyped_call): Likewise.
* config/rs6000/rs6000.md (untyped_call): Likewise.
* config/sparc/sparc.md (untyped_call): Likewise.
* config/tilegx/tilegx.md (untyped_call): Likewise.
* config/tilepro/tilepro.md (untyped_call): Likewise.
* config/visium/visium.md (untyped_call): Likewise.
* config/alpha/alpha.c (alpha_emit_xfloating_libcall): Use
gen_call_value instead of GEN_CALL_VALUE.
* config/arm/arm.md (untyped_call): Likewise.
* config/cr16/cr16.c (cr16_function_arg): Remove reference to
GEN_CALL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227143 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 9e00f13a2f9..0480e17fac3 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -93,6 +93,9 @@ static struct queue_elem **other_tail = &other_queue; static struct queue_elem *define_subst_attr_queue; static struct queue_elem **define_subst_attr_tail = &define_subst_attr_queue; +/* Mapping from DEFINE_* rtxes to their location in the source file. */ +static hash_map <rtx, file_location> *rtx_locs; + static void remove_constraints (rtx); static int is_predicable (struct queue_elem *); @@ -2619,9 +2622,24 @@ read_md_rtx (md_rtx_info *info) else info->index = -1; + if (!rtx_locs) + rtx_locs = new hash_map <rtx, file_location>; + rtx_locs->put (info->def, info->loc); + return true; } +/* Return the file location of DEFINE_* rtx X, which was previously + returned by read_md_rtx. */ +file_location +get_file_location (rtx x) +{ + gcc_assert (rtx_locs); + file_location *entry = rtx_locs->get (x); + gcc_assert (entry); + return *entry; +} + /* Return the number of possible INSN_CODEs. Only meaningful once the whole file has been processed. */ unsigned int |