Back to results
US 11,029,955 B2Granted
Instruction and logic for processing text strings
AssigneeIntel Corporation
InventorsMichael A. Julier, Jeffrey D. Gray, Srinivas Chennupaty, Sean P. Mirkes, Mark P. Seconi
Life of this patent
Estimating the term…
Abstract
Method, apparatus, and program means for performing a string comparison operation. In one embodiment, an apparatus includes execution resources to execute a first instruction. In response to the first instruction, said execution resources store a result of a comparison between each data element of a first and second operand corresponding to a first and second text string, respectively.
Claims28
A system comprising:
- a system memory;
- and
- a processor coupled with the system memory, the processor comprising:
- multiple levels of cache, including a Level 1 (L1) cache;
- a plurality of Single Instruction, Multiple Data (SIMD) registers, including a first source SIMD register to store a first source operand, and a second source SIMD register to store a second source operand, the first source operand to include a plurality of data elements, and the second source operand to include a plurality of data elements;
- a first register to store a plurality of bits, each bit to correspond to a different data element of the first source operand;
- a decoder to decode instructions, including a SIMD compare instruction, the SIMD compare instruction having a first field to identify the first source SIMD register, and having a second field to identify the second source SIMD register;
- and
- an execution unit coupled with the decoder and coupled with the plurality of SIMD registers, the execution unit to perform the SIMD compare instruction, to:
- compare a first data element of the second source operand with a first plurality of data elements of the first source operand for which the corresponding bits of the first register are one;
- and
- store a result in a destination register, a portion of the result to indicate results of comparison of the first data element with the first plurality of data elements of the first source operand for which the corresponding bits of the first register are one, wherein the result is not to store results of comparison for data elements of the first source operand for which the corresponding bits of the first register are zero.
9 more elements
A system comprising:
- a system memory;
- and
- a processor coupled with the system memory, the processor comprising:
- multiple levels of cache, including a Level 1 (L1) cache;
- a plurality of Single Instruction, Multiple Data (SIMD) registers, including a first source SIMD register to store a first source operand, and a second source SIMD register to store a second source operand, the first source operand to include a plurality of data elements, and the second source operand to include a plurality of data elements;
- a first register to store a plurality of bits, each bit to correspond to a different data element of the first source operand;
- means for decoding instructions, including a SIMD compare instruction, the SIMD compare instruction having a first field to identify the first source SIMD register, and having a second field to identify the second source SIMD register;
- and
- means for performing the SIMD compare instruction coupled with the means for decoding and coupled with the plurality of SIMD registers, the means for performing the SIMD compare instruction including:
- means for comparing a first data element of the second source operand with a first plurality of data elements of the first source operand for which the corresponding bits of the first register are one;
- and
- means for storing a result in a destination register, a portion of the result to indicate results of comparison of the first data element with the first plurality of data elements of the first source operand for which the corresponding bits of the first register are one, wherein the result is not to store results of comparison for data elements of the first source operand for which the corresponding bits of the first register are zero.
9 more elements
A system comprising:
- a system memory;
- and
- a processor coupled with the system memory, the processor comprising:
- multiple levels of cache, including a Level 1 (L1) cache;
- a plurality of Single Instruction, Multiple Data (SIMD) registers, including a first source SIMD register to store a first source operand, and a second source SIMD register to store a second source operand, the first source operand to include a plurality of data elements, and the second source operand to include a plurality of data elements;
- a first register to store a plurality of bits, each bit to correspond to a different data element of the first source operand;
- a first circuit to decode instructions, including a SIMD compare instruction, the SIMD compare instruction having a first field to identify the first source SIMD register, and having a second field to identify the second source SIMD register;
- and
- a second circuit coupled with the first circuit and coupled with the plurality of SIMD registers, the second circuit to perform the SIMD compare instruction, to:
- compare a first data element of the second source operand with a first plurality of data elements of the first source operand for which the corresponding bits of the first register are one;
- and
- store a result in a destination register, a portion of the result to indicate results of comparison of the first data element with the first plurality of data elements of the first source operand for which the corresponding bits of the first register are one, wherein the result is not to store results of comparison for data elements of the first source operand for which the corresponding bits of the first register are zero.
9 more elements
A method comprising:
- accessing a system memory;
- storing data in multiple levels of cache, including a Level 1 (L1) cache;
- storing data in a plurality of Single Instruction, Multiple Data (SIMD) registers, including storing a first source operand in a first source SIMD register, and storing a second source operand in a second source SIMD register, the first source operand including a plurality of data elements, and the second source operand including a plurality of data elements;
- storing a plurality of bits in a first register, each bit corresponding to a different data element of the first source operand;
- decoding instructions, including a SIMD compare instruction, the SIMD compare instruction having a first field identifying the first source SIMD register, and having a second field identifying the second source SIMD register;
- and
- performing the SIMD compare instruction, including:
- comparing a first data element of the second source operand with a first plurality of data elements of the first source operand for which the corresponding bits of the first register are one;
- and
- storing a result in a destination register, a portion of the result indicating results of comparison of the first data element with the first plurality of data elements of the first source operand for which the corresponding bits of the first register are one, wherein the result does not store results of comparison for data elements of the first source operand for which the corresponding bits of the first register are zero.
7 more elements
A system comprising:
- a system memory;
- and
- a processor coupled with the system memory, the processor comprising:
- a plurality of flags;
- a plurality of registers to store 128-bit packed data operands;
- a decoder to decode instructions including a packed comparison instruction, wherein the packed comparison instruction is to identify a first 128-bit source packed data operand in the plurality of registers, and a second 128-bit source packed data operand in memory or the plurality of registers, wherein valid data elements in the first and second 128-bit source packed data operands are to be implicitly indicated by null elements in the first and second 128-bit source packed data operands, and wherein the packed comparison instruction has an 8-bit immediate that is to include:
- a first two bits, wherein the first two bits being equal to 00B is to indicate that data elements of the first and second 128-bit source packed data operands are unsigned bytes, being equal to 01B is to indicate that the data elements are unsigned words, being equal to 10B is to indicate that the data elements are signed bytes, and being equal to 11B is to indicate that the data elements are signed words;
- a second two bits, wherein the second two bits being equal to 00B is to indicate that comparisons to be performed are to determine whether any of the valid data elements of the first and second 128-bit source packed data operands are equal, being equal to 01B is to indicate that the comparisons are to involve ranges, and being equal to 11B is to indicate that the comparisons are to determine whether the first and second 128-bit source packed data operands have an equal ordered plurality of data elements;
- a third two bits to control a negation operation, wherein the third two bits being equal to 00B is to indicate that all bits of a result of the comparisons are not to be negated, being equal to 01B is to indicate that said all bits of the result of the comparisons are to be negated, and being equal to 11B is to indicate that only bits of the result of the comparisons that correspond to the valid data elements of one of the first and second 128-bit source packed data operands are to be negated;
- and
- a fourth bit, wherein the fourth bit being equal to 0B is to indicate that an index of a least significant set bit of a result of the negation operation is to be stored in a register, and being equal to 1B is to indicate that an index of a most significant set bit of the result of the negation operation is to be stored in the register;
- and
- an execution unit coupled with the decoder to execute the packed comparison instruction.
10 more elements
Dependencies are inferred from the claim text.