[PATCH v2 1/8] x86/APX: optimize {nf} forms of ADD/SUB with specific immediates
Jan Beulich
jbeulich@suse.com
Fri Jun 28 08:32:10 GMT 2024
On 28.06.2024 10:28, Cui, Lili wrote:
>> @@ -7206,7 +7284,11 @@ md_assemble (char *line)
>> }
>>
>> if (optimize && !i.no_optimize && i.tm.opcode_modifier.optimize)
>> - optimize_encoding ();
>> + {
>> + if (i.has_nf)
>> + optimize_nf_encoding ();
>> + optimize_encoding ();
>> + }
>>
>
> I spent some time to understand these optimizations and found that the conversion between them is very clever. This patch is very interesting.
>
> By the way, I think from the name, optimize_encoding includes optimize_nf_encoding, how about moving optimize_nf_encoding into the function optimize_encoding?
That's an option, yes. Initially my plan was to have instead of what is in
context above
if (i.has_nf)
optimize_nf_encoding ();
else
optimize_encoding ();
But that didn't work out, yet I left the code structure close to the original.
Jan
More information about the Binutils
mailing list