[PATCH] Support APX CCMP and CTEST

Cui, Lili lili.cui@intel.com
Wed Jun 5 01:54:29 GMT 2024


> >> In the context of this patch (as a whole) - what meaning to we intend e.g.

> >>

> >>       {evex} cmp %eax, %ecx

> >>

> >> to have? Imo that should translate to CCMPT.

> >>

> >

> > Could you describe it in more detail? I'm a bit confused. Why should we

> support {evex} cmp %eax, %ecx ?

>

> To parallel {evex} use with other insns. And CCMPT really _is_ the EVEX

> encoding of CMP, considering CCMPcc's placement(s) in the opcode map.

>

> And just to mention it here: I also think there might better be a pseudo-insn

> aliasing to one of CCMPF or CTESTF, with no operands. I.e. merely specifying

> the new value for the respective EFLAGS bits. Yet adding such - requiring a

> mnemonic which then won't be used elsewhere in the future - can't very well

> be done without the assembler doc at least permitting for it.

>



For "ccmp {dfv = sf, cf, of, zf}" format, apx-asm-syntax will not be updated to keep it simple. If Binutil still wants to support this format, we need to pay attention to the following.


If one of the operands is memory, the instruction can page-fault even though the SCC is False.  From the APX spec:

[cid:image001.png@01DAB69F.77AEA340]



Thanks,

Lili.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240605/837ef59c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 39382 bytes
Desc: image001.png
URL: <https://sourceware.org/pipermail/binutils/attachments/20240605/837ef59c/attachment-0001.png>


More information about the Binutils mailing list