PCMPESTRM — Packed Compare Explicit Length Strings, Return MaskInstruction Operand EncodingDescriptionThe instruction compares data from two string fragments based on the encoded value in the imm8 contol byte (see Section 4.1, “Imm8 Control Byte Operation for PCMPESTRI / PCMPESTRM / PCMPISTRI / PCMPISTRM”), and gener-ates a mask stored to XMM0.Each string fragment is represented by two values. The first value is an xmm (or possibly m128 for the second operand) which contains the data elements of the string (byte or word data). The second value is stored in an input length register. The input length register is EAX/RAX (for xmm1) or EDX/RDX (for xmm2/m128). The length repre-sents the number of bytes/words which are valid for the respective xmm/m128 data. The length of each input is interpreted as being the absolute-value of the value in the length register. The absolute-value computation saturates to 16 (for bytes) and 8 (for words), based on the value of imm8[bit3] when the value in the length register is greater than 16 (8) or less than -16 (-8).The comparison and aggregation operations are performed according to the encoded value of Imm8 bit fields (see Section 4.1). As defined by imm8[6], IntRes2 is then either stored to the least significant bits of XMM0 (zero extended to 128 bits) or expanded into a byte/word-mask and then stored to XMM0.Note that the Arithmetic Flags are written in a non-standard manner in order to supply the most relevant informa-tion:CFlag – Reset if IntRes2 is equal to zero, set otherwiseZFlag – Set if absolute-value of EDX is < 16 (8), reset otherwiseSFlag – Set if absolute-value of EAX is < 16 (8), reset otherwiseOFlag –IntRes2[0]AFlag – ResetPFlag – ResetNote: In VEX.128 encoded versions, bits (MAXVL-1:128) of XMM0 are zeroed. VEX.vvvv is reserved and must be 1111b, VEX.L must be 0, otherwise the instruction will #UD.Opcode/InstructionOp/ En64/32 bit Mode SupportCPUID Feature FlagDescription66 0F 3A 60 /r imm8PCMPESTRM xmm1, xmm2/m128, imm8RMIV/VSSE4_2Perform a packed comparison of string data with explicit lengths, generating a mask, and storing the result in XMM0.VEX.128.66.0F3A 60 /r ibVPCMPESTRM xmm1, xmm2/m128, imm8RMIV/VAVXPerform a packed comparison of string data with explicit lengths, generating a mask, and storing the result in XMM0.Op/EnOperand 1Operand 2Operand 3Operand 4RMIModRM:reg (r)ModRM:r/m (r)imm8NA
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.