Extract Word; Example 4-6 Unpacking Two Packed-Word Sources In A Non-Interleaved Way - Intel ARCHITECTURE IA-32 Reference Manual

Architecture optimization
Table of Contents

Advertisement

Example 4-6
Unpacking Two Packed-word Sources in a Non-interleaved Way
; Input:
;
MM0
;
MM1
; Output:
;
MM0
;
;
MM2
;
movq
MM2, MM0
punpckldq
MM0, MM1
punpckhdq
MM2, MM1

Extract Word

The
pextrw
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.
packed-word source value
packed-word source value
contains the two low-end words of the
original sources, non-interleaved
contains the two high end words of the
original sources, non-interleaved.
; copy source1
; 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
; 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
instruction takes the word in the designated MMX register
Optimizing for SIMD Integer Applications
4
4-13

Advertisement

Table of Contents
loading

Table of Contents