PCMPISTRM — Packed Compare Implicit Length Strings, Return MaskInstruction Operand EncodingDescriptionThe instruction compares data from two strings based on the encoded value in the imm8 byte (see Section 4.1, “Imm8 Control Byte Operation for PCMPESTRI / PCMPESTRM / PCMPISTRI / PCMPISTRM”) generating a mask stored to XMM0.Each string is represented by a single value. The value is an xmm (or possibly m128 for the second operand) which contains the data elements of the string (byte or word data). Each input byte/word is augmented with a valid/invalid tag. A byte/word is considered valid only if it has a lower index than the least significant null byte/word. (The least significant null byte/word is also considered invalid.) The comparison and aggregation operation 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 any byte/word of xmm2/mem128 is null, reset otherwiseSFlag – Set if any byte/word of xmm1 is null, 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.Effective Operand SizeIntel C/C++ Compiler Intrinsic Equivalent For Returning Mask__m128i _mm_cmpistrm (__m128i a, __m128i b, const int mode);Opcode/InstructionOp/ En64/32 bit Mode SupportCPUID Feature FlagDescription66 0F 3A 62 /r imm8PCMPISTRM xmm1, xmm2/m128, imm8RMV/VSSE4_2Perform a packed comparison of string data with implicit lengths, generating a mask, and storing the result in XMM0.VEX.128.66.0F3A.WIG 62 /r ibVPCMPISTRM xmm1, xmm2/m128, imm8RMV/VAVXPerform a packed comparison of string data with implicit lengths, generating a Mask, and storing the result in XMM0.Op/EnOperand 1Operand 2Operand 3Operand 4RMModRM:reg (r)ModRM:r/m (r)imm8NAOperating mode/sizeOperand1Operand 2Result16 bitxmmxmm/m128XMM032 bitxmmxmm/m128XMM064 bitxmmxmm/m128XMM0
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.