intelxed / xed

The X86 Encoder Decoder (XED), is a software library for encoding and decoding X86 (IA32 and Intel64) instructions
https://intelxed.github.io/
Apache License 2.0
1.38k stars 146 forks source link

KNC: Constraints for GATHER instructions #281

Closed flobernd closed 2 years ago

flobernd commented 2 years ago

Hi there,

sorry to bother you with KNC stuff again 😋

For EVEX there are some constraints documented for GATHER instructions:

If any pair of the index, mask, or destination registers are the same, this instruction results a UD fault

The old Xeon Phi / KNC documentation does not mention such constraints for MVEX GATHER instructions. However, usually the MVEX instructions behave very close to their EVEX counterparts. We are wondering, if the same constraint applies to MVEX instructions as well and is just not properly documented yet.

Do you know something about that?

Best, Florian

atal96 commented 2 years ago

The KNC GATHER instructions forbid using the same vector register for destination and for the index. I'm not sure if this will end up with #GP fault or #UD fault.

flobernd commented 2 years ago

@atal96 Thanks a lot for confirming :-)