Optimizing for SIMD Integer Applications
4
4-13
Extract Word
The
pextrw
instruction takes the word in the designated MMX register
selected by the two least significant bits of the immediate value and
moves it to the lower half of a 32-bit integer register, see Figure 4-5 and
Example 4-7.
Example 4-6
Unpacking Two Packed-word Sources in a Non-interleaved Way
; Input:
;
MM0
packed-word source value
;
MM1
packed-word source value
; Output:
;
MM0
contains the two low-end words of the
;
original sources, non-interleaved
;
MM2
contains the two high end words of the
;
original sources, non-interleaved.
movq
MM2, MM0
; copy source1
punpckldq
MM0, MM1
; replace the two high-end words
; of MMO with two low-end words of
; MM1; leave the two low-end words
; of MM0 in place
punpckhdq
MM2, MM1
; move two high-end words of MM2
; to the two low-end words of MM2;
; place the two high-end words of
; MM1 in two high-end words of MM2
Summary of Contents for ARCHITECTURE IA-32
Page 1: ...IA 32 Intel Architecture Optimization Reference Manual Order Number 248966 013US April 2006...
Page 220: ...IA 32 Intel Architecture Optimization 3 40...
Page 434: ...IA 32 Intel Architecture Optimization 9 20...
Page 514: ...IA 32 Intel Architecture Optimization B 60...
Page 536: ...IA 32 Intel Architecture Optimization C 22...