This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] insn mnemonic attribute v2


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.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]