[PATCH 02/13] x86: drop ShortForm attribute
Jan Beulich
jbeulich@suse.com
Mon Nov 4 10:31:00 GMT 2019
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.
Jan
More information about the Binutils
mailing list