WPACKlengthsign[condition] dest, op1, op2
其中:
length | 所需的數據長度,可以由以下字元之一指定: H -- 將 16 位(半字)壓縮到 8 位 W -- 將 32 位(字)壓縮到 16 位 D -- 將 64 位(雙字)壓縮到 32 位 |
sign | 確定進行“有符號”還是“無符號”算術運算: SS -- 有符號飽和 US -- 無符號飽和 |
condition | 可選。16 個條件之一。請參閱條件執行。 |
dest | 目標,“英特爾(R) 無線 MMX™”技術數據暫存器 |
op1 | 第一個源運算元,“英特爾(R) 無線 MMX™”技術數據暫存器 |
op2 | 第二個源運算元,“英特爾(R) 無線 MMX™”技術數據暫存器 |
將 op1 與 op2 中的數據壓縮到 dest 中,其中 op2 壓縮到上半部分,op1 壓縮到下半部分。此操作可以在 16、32 或 64 位數據長度的向量上執行,將它們壓縮至原始長度的一半。也就是說,例如,將 16 位半字壓縮到 dest 暫存器的位元組空間;將 32 位字壓縮到 16 位空間,等等。在有符號或無符號的值上可以執行截斷操作,並使用飽和演算法,其中任何到零的上溢均由最大值代替;任何下溢由最小值代替。
壓縮可以按照有符號飽和或無符號飽和執行。
指令中指定的任何條件必須與條件程式碼狀態相匹配,否則不執行該指令。
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cond
|
1110
|
wwss
|
op1
|
dest
|
0000
|
100
|
0
|
op2
|
限定符
|
欄位
|
值
|
---|---|---|
H
|
ww
|
01
|
W
|
ww
|
10
|
D
|
ww
|
11
|
保留
|
ww
|
00
|
US
|
ss
|
01
|
SS
|
ss
|
11
|
保留
|
ss
|
00
|
保留
|
ss
|
10
|
標誌
|
操作
|
---|---|
N
|
根據最終結果設定
|
Z
|
根據最終結果設定
|
C
|
清除
|
V
|
清除
|
限定符
|
SIMD 標誌
|
---|---|
H
|
SIMD8
|
W
|
SIMD16
|
D
|
SIMD32
|
if (H Specified)then
dest[byte 7] = saturate(op2[half 3], {US,SS}, 8)
dest[byte 6] = saturate(op2[half 2], {US,SS}, 8)
dest[byte 5] = saturate(op2[half 1], {US,SS}, 8)
dest[byte 4] = saturate(op2[half 0], {US,SS}, 8)
dest[byte 3] = saturate(op1[half 3], {US,SS}, 8)
dest[byte 2] = saturate(op1[half 2], {US,SS}, 8)
dest[byte 1] = saturate(op1[half 1], {US,SS}, 8)
dest[byte 0] = saturate(op1[half 0], {US,SS}, 8)
else if (W Specified) then
dest[half 3] = saturate(op2[word 1], {US,SS}, 16)
dest[half 2] = saturate(op2[word 0], {US,SS}, 16)
dest[half 1] = saturate(op1[word 1], {US,SS}, 16)
dest[half 0] = saturate(op1[word 0], {US,SS}, 16)
else if (D Specified) then
dest[word 1] = saturate(op2, {US,SS}, 32)
dest[word 0] = saturate(op1, {US,SS}, 32)