This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 02/13] x86: drop ShortForm attribute


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.


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