IA-32 Intel® Architecture Optimization
4-22
pxor
MM0, MM0
pcmpeq
MM1, MM1
psubb
MM0, MM1 [psubw MM0, MM1] (psubd MM0, MM1)
; three instructions above generate
; the constant 1 in every
; packed-byte [or packed-word]
; (or packed-dword) field
pcmpeq
MM1, MM1
psrlw
MM1, 16-n(psrld MM1, 32-n)
; two instructions above generate
; the signed constant 2
n
–1 in every
; packed-word (or packed-dword) field
pcmpeq
MM1, MM1
psllw
MM1, n
(pslld MM1, n)
; two instructions above generate
; the signed constant -2n in every
; packed-word (or packed-dword) field
NOTE.
Because the SIMD integer instruction sets do
not support shift instructions for bytes,
2
n
–1
and
-2
n
are relevant only for packed words and packed
doublewords.
Example 4-15 Generating Constants
(continued)
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...