[PATCH 2/3] x86: disassembler macro for condition code

Jan Beulich jbeulich@suse.com
Thu May 30 06:36:12 GMT 2024


On 30.05.2024 07:52, Jiang, Haochen wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Wednesday, May 29, 2024 4:09 PM
>> To: Binutils <binutils@sourceware.org>
>> Cc: Cui, Lili <lili.cui@intel.com>; H.J. Lu <hjl.tools@gmail.com>
>> Subject: [PATCH 2/3] x86: disassembler macro for condition code
>>
>> Both CMPccXADD and APX'es {,CF}CMOVcc have almost identical entries
>> replicated 16 times each. Fold those to just one each by introducing a
>> %CC macro. (Note that the recording of ->condition_code in print_insn()
>> is merely for completeness for now; it's not used as long as only
>> VEX/EVEX encodings would consume it.)
>>
>> This then also renders condition codes printed consistent across all
>> respective insns; CMPxxXADD had a number of outliers so far.
> 
> Although the table seems much more "elegant" and alias is not that wrong,
> I suppose we should still stick to documentation and output what it is in
> documentation in disassembler for CMPccXADD, or the documentation is
> useless.

I did long ago ask for the documentation to be updated, to name all (and
in particular the more sensible) possible spellings, just like is the case
with other condition-code insns. I hope that the latest when the insn is
integrated into Vol 2 of the SDM, this will finally happen. As to more
sensible: We're talking of condition codes resulting from comparisons here.
Z/NZ is less meaningful there than E/NE; Z/NZ are the better forms for
things like TEST.

Jan


More information about the Binutils mailing list