Example 4-8, Pinsrw instruction code -15, Figure 4-6 – Intel ARCHITECTURE IA-32 User Manual

Page 235: Pinsrw instruction -15

Advertising
background image

Optimizing for SIMD Integer Applications

4

4-15

If all of the operands in a register are being replaced by a series of

pinsrw

instructions, it can be useful to clear the content and break the

dependence chain by either using the

pxor

instruction or loading the

register. See the “Clearing Registers” section in Chapter 2.

Figure 4-6

pinsrw

Instruction

Example 4-8

pinsrw

Instruction Code

; Input:

;

edx

pointer to source value

; Output:

;

mm0

register with new 16-bit value inserted

;

mov

eax, [edx]

pinsrw

mm0, eax, 1

O M15164

Y2

M M

R32

31

0

31

0

63

X4

X3

Y1

X1

Y1

Advertising