Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

zeroing idioms with APX

Beulich__Jan
Beginner
245 Views

May I ask whether at this relatively early stage it is already clear which APX insn forms are going to be treated as zeroing idioms? For REX2-prefixed ones I assume there'll be no difference to other legacy forms, but for especially for EVEX.NDD forms variations might be possible.

0 Kudos
2 Replies
j_agron
Employee
94 Views

Thank you for the good question.

Existing zero idioms are preserved in the new APX encoding space (for both REX2 and EVEX prefix spaces).

More details will be available in the Software Optimization Manuals as APX-enabled platforms go public.

  • REX2
    • Existing legacy-space zero idioms (such as XOR reg, reg and SUB reg, reg) will naturally also exist in the REX2 map=0/1 space.  Signatures of the instructions aren't altered by the REX2 prefix, as there are no additional operands.
  • EVEX
    • Existing EVEX-space vector-based zero idioms aren’t affected by APX
    • New EVEX-space integer-based zero idioms that had analogues in the integer space will exist in the EVEX map=4 space (i.e. NDD = EVEX XOR reg, reg; and EVEX XOR reg reg, etc.).  Signature-wise, these are similar to existing EVEX-space zero idioms for vector registers (documented in the SOM), and the only difference is that the new EVEX forms can be applied to integer GPRs.

 

0 Kudos
Beulich__Jan
Beginner
36 Views

Thanks for the reply. There's one problem there, though: Like in the manual you also mention only 2-operand instructions. Yet NDD ones take three operands, much like the relevant vector ones where the mnemonics start with V. Therefore saying "reg, reg" is insufficient. What is important to know is whether it is only the two sources which need to match, or whether all three registers (i.e. including the destination) need to be the same.

Correcting the manual in this regard would certainly also be nice.

0 Kudos
Reply