This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] insn mnemonic attribute v2
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Nov 2010 14:30:46 -0800
- Subject: Re: [PATCH] insn mnemonic attribute v2
- References: <20101112213842.GA9369@bart>
I'd been thinking of something even more centralized.
For instance, in init_md_reader_args_cb, right near the end after
we have read and queued the entire input file, notice if the user
has defined an "mnemonic" attribute. E.g.
(define_attr "mnemonic" "")
At that point, loop the the queue of instructions and process with
your existing find_mnemonics (although no callback would be required),
and also examining their set_attr lists, as you do in genattr.c, gen_insn.
At which point there should be absolutely no changes required to either
genattr.c or genattrtab.c. Nor do you need a target macro to control
creation of this attribute.