Processor (310) comprising: a decoding unit (314) for decoding a
data element comparison instruction (312), wherein the
data element comparison instruction (312) specifies a first packed
source data operand (322) containing at least sixteen 8-bit data elements, a second packed
source data operand (324) containing at least sixteen 8-bit data elements, and a
mask register (332), wherein the sixteen 8-bit data elements contained in the first packed
source data operand (322) and the sixteen 8-bit data elements contained in the second packed source data operand (324) each occupy 128 bits, wherein the sixteen 8-bit data elements contained in the first packed source data operand (322) specify the sixteen 8-bit data elements correspond to those contained in the second packed source data operand (324);and an
execution unit (318) coupled to the decoding unit (314), wherein the
execution unit (318), in response to the
data element comparison instruction (312), performs a data element comparison operation for each of the sixteen 8-bit data elements in the first packed source data operand (322) with all of the sixteen 8-bit data elements in the second packed source data operand (324) and stores a result
mask operand (328, 330) in the
mask register (332), wherein the result mask operand (328, 330) contains a different mask bit with a value of 1 for each of the sixteen 8-bit data elements in the first packed source data operand (322) when an operation of the data element comparison operation determines that the data element in the first packed source data operand (322) matches any of the sixteen 8-bit data elements in the second packed source data operand (324), and otherwise returns a value of 0.;