3-503
INSTRUCTION SET REFERENCE
PINSRW—Insert Word
Description
The PINSRW instruction loads a word from the lower half of a 32-bit integer register (or from
memory) and inserts it in the MM destination register, at a position defined by the two least
significant bits of the imm8 constant. The insertion is done in such a way that the three other
words from the destination register are left untouched.
Figure 3-64. Operation of the PINSRW Instruction
Operation
SEL = imm8 AND 0X3;
IF(SEL = 0) THEN
MASK=0X000000000000FFFF;
ELSE
IF(SEL = 1) THEN
MASK=0X00000000FFFF0000 :
ELSE
IF(SEL = 2) THEN
MASK=0XFFFF000000000000;
FI
FI
FI
DEST = (DEST AND NOT MASK) OR ((m16/r32[15-0] << (SEL * 16)) AND MASK);
OpcodeInstructionDescription
0F,C4,/r,ibPINSRW mm,
r32/m16, imm8
Insert the word from the lower half of r32 or from Mem16 into the
position in MM pointed to by imm8 without touching the other words.
Mm1
mm1
PINSRW mm1,r32/m16, 0x0A
0x985F
=
0x4326
0x985F
R32/m16