[PATCH 1/6] x86: allow opcode templates to be templated
H.J. Lu
hjl.tools@gmail.com
Mon Mar 9 12:15:42 GMT 2020
On Mon, Mar 9, 2020 at 2:19 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 06.03.2020 15:42, H.J. Lu wrote:
> > On Fri, Mar 6, 2020 at 12:11 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> In order to reduce redundancy as well as the chance of things going out
> >> of sync (see a later patch for an example), make the opcode table
> >> generator capable of recognizing and expanding templated templates. Use
> >> the new capability for compacting the general purpose conditional insns.
> >>
> >> opcodes/
> >> 2020-03-XX Jan Beulich <jbeulich@suse.com>
> >>
> >> * i386-gen.c (struct template_arg, struct template_instance,
> >> struct template_param, struct template, templates,
> >> parse_template, expand_templates): New.
> >> (process_i386_opcodes): Various local variables moved to
> >> expand_templates. Call parse_template and expand_templates.
> >> * i386-opc.tbl (cc): New. Use it for Jcc, SETcc, and CMOVcc.
> >> * i386-tbl.h: Re-generate.
> >
> > OK. Thanks.
>
> Now that this is in, a question I have is how far we want to go with
> using this templating. There are certainly more groups of insns which
> are sufficiently similar, but I guess using templates for just two or
> three insns wouldn't be helpful readability wise. An example of where
> I'm on the edge are the {,V}PCLMUL pseudos. Do you have any thoughts
> on the general question, or is it entirely up to me to decide where
> else to use this new functionality?
>
I will leave it entirely up to you. Thanks for your great work.
--
H.J.
More information about the Binutils
mailing list