This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 02/13] x86: drop ShortForm attribute
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Beulich <jbeulich at suse dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 4 Nov 2019 09:13:23 -0800
- Subject: Re: [PATCH 02/13] x86: drop ShortForm attribute
- References: <773baa32-a12c-5da3-32a4-3db5a424d102@suse.com> <da5eab10-c2c1-9f05-2050-cab7e7b9d9e6@suse.com> <CAMe9rOpv=DsvmY_SkXHKD+TwQB+1pE6VmxNByhy6-9FWhJJ1eA@mail.gmail.com> <162fc3af-785f-9986-88d1-bf46f8038b18@suse.com>
On Mon, Nov 4, 2019 at 2:31 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 31.10.2019 18:49, H.J. Lu wrote:
> > On Wed, Oct 30, 2019 at 1:23 AM Jan Beulich <jbeulich@suse.com> wrote:
> >> @@ -6208,6 +6209,21 @@ check_string (void)
> >> return 1;
> >> }
> >>
> >> +static bfd_boolean
> >> +is_short_form (const insn_template *t)
> >> +{
> >> + unsigned int op, num_reg;
> >> +
> >> + if (t->opcode_modifier.modrm || t->operands > 2)
> >> + return FALSE;
> >> +
> >> + for (num_reg = op = 0; op < t->operands; ++op)
> >> + if (t->operand_types[op].bitfield.reg)
> >> + ++num_reg;
> >> +
> >> + return num_reg == 1;
> >> +}
> >> +
> >
> > So this replaces a bit check with a function. What is the real advantage?
>
> Space savings - one bit per template, which sums up with the large
> number of templates there are.
>
Is that really necessary?
--
H.J.