blob: c0a4b219bc430ff5149061baa097156d9cb014ec [file] [log] [blame] [raw]
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>PSLLW/PSLLD/PSLLQ—Shift Packed Data Left Logical </title></head>
<body>
<h1>PSLLW/PSLLD/PSLLQ—Shift Packed Data Left Logical</h1>
<p><strong>Description</strong></p>
<p><strong>CPUID</strong></p>
<p><strong>Opcode/</strong></p>
<p><strong>Op/</strong></p>
<p><strong>64/32 bit</strong></p>
<p><strong>Feature</strong></p>
<p><strong>Instruction</strong></p>
<p><strong>En</strong></p>
<p><strong>Mode</strong></p>
<p><strong>Flag</strong></p>
<p><strong>Support</strong></p>
<p>0F F1 /<em>r</em><sup>1</sup></p>
<p>RM</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift words in <em>mm</em> left <em>mm/m64</em> while shifting in 0s.</p>
<p>PSLLW <em>mm, mm/m64</em></p>
<p>66 0F F1 /<em>r</em></p>
<p>RM</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift words in <em>xmm1</em> left by <em>xmm2/m128 </em>while shifting in 0s.</p>
<p>PSLLW <em>xmm1</em>, <em>xmm2/m128</em></p>
<p>0F 71 /6 ib</p>
<p>MI</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift words in <em>mm</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>PSLLW <em>mm1</em>, <em>imm8</em></p>
<p>66 0F 71 /6 ib</p>
<p>MI</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift words in <em>xmm1</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>PSLLW <em>xmm1</em>, <em>imm8</em></p>
<p>RM</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift doublewords in <em>mm</em> left by <em>mm/m64</em></p>
<p>0F F2 /<em>r</em><sup>1</sup></p>
<p>while shifting in 0s.</p>
<p>PSLLD<em> mm, mm/m64</em></p>
<p>66 0F F2 /<em>r</em></p>
<p>RM</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift doublewords in <em>xmm1</em> left by <em>xmm2/m128</em> while shifting in 0s.</p>
<p>PSLLD <em>xmm1</em>, <em>xmm2/m128</em></p>
<p>0F 72 /6 ib<sup>1</sup></p>
<p>MI</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift doublewords in <em>mm</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>PSLLD <em>mm, imm8</em></p>
<p>66 0F 72 /6 ib</p>
<p>MI</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift doublewords in <em>xmm1</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>PSLLD <em>xmm1</em>, <em>imm8</em></p>
<p>RM</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift quadword in <em>mm</em> left by <em>mm/m64 </em>while</p>
<p>0F F3 /<em>r</em><sup>1</sup></p>
<p>shifting in 0s.</p>
<p>PSLLQ <em>mm, mm/m64</em></p>
<p>66 0F F3 /<em>r</em></p>
<p>RM</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift quadwords in <em>xmm1</em> left by <em>xmm2/m128 </em>while shifting in 0s.</p>
<p>PSLLQ <em>xmm1</em>, <em>xmm2/m128</em></p>
<p>MI</p>
<p>V/V</p>
<p>MMX</p>
<p>Shift quadword in <em>mm</em> left by <em>imm8</em> while</p>
<p>0F 73 /6 ib<sup>1</sup></p>
<p>shifting in 0s.</p>
<p>PSLLQ <em>mm, imm8</em></p>
<p>66 0F 73 /6 ib</p>
<p>MI</p>
<p>V/V</p>
<p>SSE2</p>
<p>Shift quadwords in <em>xmm1</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>PSLLQ <em>xmm1</em>, <em>imm8</em></p>
<p>VEX.NDS.128.66.0F.WIG F1 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift words in <em>xmm2</em> left by amount specified in <em>xmm3/m128 </em>while shifting in 0s.</p>
<p>VPSLLW <em>xmm1, xmm2, xmm3/m128</em></p>
<p>VEX.NDD.128.66.0F.WIG 71 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift words in <em>xmm2</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>VPSLLW <em>xmm1, xmm2, imm8</em></p>
<p>VEX.NDS.128.66.0F.WIG F2 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift doublewords in <em>xmm2</em> left by amount specified in <em>xmm3/m128</em> while shifting in 0s.</p>
<p>VPSLLD <em>xmm1, xmm2, xmm3/m128</em></p>
<p>VEX.NDD.128.66.0F.WIG 72 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift doublewords in <em>xmm2 </em>left by<em> imm8 </em>while shifting in 0s.</p>
<p>VPSLLD <em>xmm1, xmm2, imm8</em></p>
<p>VEX.NDS.128.66.0F.WIG F3 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift quadwords in <em>xmm2</em> left by amount specified in <em>xmm3/m128</em> while shifting in 0s.</p>
<p>VPSLLQ <em>xmm1, xmm2, xmm3/m128</em></p>
<p>VEX.NDD.128.66.0F.WIG 73 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX</p>
<p>Shift quadwords in <em>xmm2</em> left by<em> imm8</em> while shifting in 0s.</p>
<p>VPSLLQ <em>xmm1, xmm2, imm8</em></p>
<p>VEX.NDS.256.66.0F.WIG F1 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift words in <em>ymm2</em> left by amount specified in <em>xmm3/m128</em> while shifting in 0s.</p>
<p>VPSLLW <em>ymm1, ymm2, xmm3/m128</em></p>
<p>VEX.NDD.256.66.0F.WIG 71 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift words in <em>ymm2</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>VPSLLW <em>ymm1, ymm2, imm8</em></p>
<p>VEX.NDS.256.66.0F.WIG F2 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift doublewords in <em>ymm2</em> left by amount specified in <em>xmm3/m128</em> while shifting in 0s.</p>
<p>VPSLLD <em>ymm1, ymm2, xmm3/m128</em></p>
<p>VEX.NDD.256.66.0F.WIG 72 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift doublewords in <em>ymm2</em> left by<em> imm8 </em>while shifting in 0s.</p>
<p>VPSLLD <em>ymm1, ymm2, imm8</em></p>
<p>VEX.NDS.256.66.0F.WIG F3 /r</p>
<p>RVM</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift quadwords in <em>ymm2</em> left by amount specified in <em>xmm3/m128</em> while shifting in 0s.</p>
<p>VPSLLQ <em>ymm1, ymm2, xmm3/m128</em></p>
<p>VEX.NDD.256.66.0F.WIG 73 /6 ib</p>
<p>VMI</p>
<p>V/V</p>
<p>AVX2</p>
<p>Shift quadwords in <em>ymm2</em> left by <em>imm8</em> while shifting in 0s.</p>
<p>VPSLLQ <em>ymm1, ymm2, imm8</em></p>
<p>NOTES:</p>
<p>1. See note in Section 2.4, “Instruction Exception Specification” in the <em>Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2A</em> and Section 22.25.3, “Exception Conditions of Legacy SIMD Instructions Operating on MMX Registers” in the <em>Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A</em>.</p>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>RM</td>
<td>ModRM:reg (r, w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr>
<tr>
<td>MI</td>
<td>ModRM:r/m (r, w)</td>
<td>imm8</td>
<td>NA</td>
<td>NA</td></tr>
<tr>
<td>RVM</td>
<td>ModRM:reg (w)</td>
<td>VEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr>
<tr>
<td>VMI</td>
<td>VEX.vvvv (w)</td>
<td>ModRM:r/m (r)</td>
<td>imm8</td>
<td>NA</td></tr></table>
<h2>Description</h2>
<p>Shifts the bits in the individual data elements (words, doublewords, or quadword) in the destination operand (first operand) to the left by the number of bits specified in the count operand (second operand). As the bits in the data elements are shifted left, the empty low-order bits are cleared (set to 0). If the value specified by the count operand is greater than 15 (for words), 31 (for doublewords), or 63 (for a quadword), then the destination operand is set to all 0s. Figure 4-13 gives an example of shifting words in a 64-bit operand.</p>
<svg width="568.799985" viewBox="111.840000 640385.040010 379.199990 87.599990" height="131.399985">
<text y="640403.267584" x="158.2199" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="30.975168">Pre-Shift</text>
<text y="640411.607484" x="168.72" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="21.320964">DEST</text>
<text y="640423.045488" x="161.58" style="font-size:6.960000pt" lengthAdjust="spacingAndGlyphs" textLength="27.928392">Shift Left</text>
<text y="640430.845388" x="160.92" style="font-size:6.960000pt" lengthAdjust="spacingAndGlyphs" textLength="28.5012">with Zero</text>
<text y="640438.645488" x="160.3799" style="font-size:6.960000pt" lengthAdjust="spacingAndGlyphs" textLength="29.379552">Extension</text>
<text y="640456.127884" x="153.3601" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="34.558986">Post-Shift</text>
<text y="640464.107384" x="167.7" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="21.320964">DEST</text>
<rect y="640395.6" x="192.84" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="62.88"></rect>
<rect y="640395.6" x="381.54" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="62.88"></rect>
<rect y="640395.6" x="255.72" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="62.88"></rect>
<rect y="640395.6" x="318.6" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="62.94"></rect>
<rect y="640448.58" x="192.24" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0600000001" width="62.94"></rect>
<path style="stroke:black" d="M192.600000,640395.360000 L192.600000,640413.600000 L193.080010,640413.600000 L193.080010,640395.360000 "></path>
<path style="stroke:black" d="M255.480000,640395.360000 L255.480000,640413.600000 L255.960000,640413.600000 L255.960000,640395.360000 "></path>
<path style="stroke:black" d="M318.360000,640395.360000 L318.360000,640413.600000 L318.839980,640413.600000 L318.839980,640395.360000 "></path>
<path style="stroke:black" d="M381.300000,640395.360000 L381.300000,640413.600000 L381.779980,640413.600000 L381.779980,640395.360000 "></path>
<path style="stroke:black" d="M192.840000,640395.360020 L192.840000,640395.840000 L255.960000,640395.840000 L255.960000,640395.360020 "></path>
<path style="stroke:black" d="M255.720000,640395.360020 L255.720000,640395.840000 L318.840000,640395.840000 L318.840000,640395.360020 "></path>
<path style="stroke:black" d="M318.600000,640395.360020 L318.600000,640395.840000 L381.780000,640395.840000 L381.780000,640395.360020 "></path>
<path style="stroke:black" d="M381.540000,640395.360020 L381.540000,640395.840000 L444.660000,640395.840000 L444.660000,640395.360020 "></path>
<path style="stroke:black" d="M255.480000,640395.600000 L255.480000,640413.840000 L255.960000,640413.840000 L255.960000,640395.600000 "></path>
<path style="stroke:black" d="M318.360000,640395.600000 L318.360000,640413.840000 L318.839980,640413.840000 L318.839980,640395.600000 "></path>
<path style="stroke:black" d="M381.300000,640395.600000 L381.300000,640413.840000 L381.779980,640413.840000 L381.779980,640395.600000 "></path>
<path style="stroke:black" d="M444.180000,640395.600000 L444.180000,640413.840000 L444.659980,640413.840000 L444.659980,640395.600000 "></path>
<path style="stroke:black" d="M192.600000,640413.360020 L192.600000,640413.840000 L255.720000,640413.840000 L255.720000,640413.360020 "></path>
<path style="stroke:black" d="M255.480000,640413.360020 L255.480000,640413.840000 L318.600000,640413.840000 L318.600000,640413.360020 "></path>
<path style="stroke:black" d="M318.360000,640413.360020 L318.360000,640413.840000 L381.540000,640413.840000 L381.540000,640413.360020 "></path>
<path style="stroke:black" d="M381.300000,640413.360020 L381.300000,640413.840000 L444.420000,640413.840000 L444.420000,640413.360020 "></path>
<path style="stroke:black" d="M236.520000,640413.780000 L236.520000,640428.720000 L237.000000,640428.720000 L237.000000,640413.780000 "></path>
<path style="stroke:black" d="M300.240000,640413.780000 L300.240000,640428.720000 L300.720010,640428.720000 L300.720010,640413.780000 "></path>
<path style="stroke:black" d="M418.680000,640413.840000 L418.680000,640428.780000 L419.159980,640428.780000 L419.159980,640413.840000 "></path>
<path style="stroke:black" d="M356.940000,640414.260000 L356.940000,640429.200000 L357.420010,640429.200000 L357.420010,640414.260000 "></path>
<path style="stroke:black" d="M210.780000,640428.239990 L210.780000,640428.720000 L236.760000,640428.720000 L236.760000,640428.239990 "></path>
<path style="stroke:black" d="M274.500000,640428.239990 L274.500000,640428.720000 L300.480000,640428.720000 L300.480000,640428.239990 "></path>
<path style="stroke:black" d="M392.940000,640428.299990 L392.940000,640428.780000 L418.920000,640428.780000 L418.920000,640428.299990 "></path>
<path style="stroke:black" d="M210.780000,640428.480000 L210.780000,640441.440000 L211.260000,640441.440000 L211.260000,640428.480000 "></path>
<path style="stroke:black" d="M274.500000,640428.480000 L274.500000,640441.380000 L274.980010,640441.380000 L274.980010,640428.480000 "></path>
<path style="stroke:black" d="M392.940000,640428.540000 L392.940000,640441.440000 L393.420010,640441.440000 L393.420010,640428.540000 "></path>
<path style="stroke:black" d="M331.260000,640428.719990 L331.260000,640429.200000 L357.180000,640429.200000 L357.180000,640428.719990 "></path>
<path style="stroke:black" d="M331.260000,640428.960000 L331.260000,640441.860000 L331.739980,640441.860000 L331.739980,640428.960000 "></path>
<path style="stroke:black" d="M274.560000,640441.740000 L276.120000,640441.140000 L277.080000,640440.780000 L276.780000,640441.800000 L275.220000,640447.200000 L274.740000,640448.880000 L274.260000,640447.200000 L272.700000,640441.800000 L272.400000,640440.780000 L273.360000,640441.140000 L273.660000,640441.500000 L275.220000,640446.900000 L274.260000,640447.200000 L274.260000,640446.900000 L275.820000,640441.500000 L276.780000,640441.800000 L276.480000,640442.100000 L274.920000,640442.700000 "></path>
<path style="stroke:black" d="M210.840000,640441.740000 L212.400000,640441.200000 L213.360000,640440.840000 L213.060000,640441.860000 L211.500000,640447.200000 L211.020000,640448.820000 L210.540000,640447.200000 L208.980000,640441.860000 L208.680000,640440.840000 L209.640000,640441.200000 L209.940000,640441.560000 L211.500000,640446.900000 L210.540000,640447.200000 L210.540000,640446.900000 L212.100000,640441.560000 L213.060000,640441.860000 L212.760000,640442.160000 L211.200000,640442.700000 "></path>
<path style="stroke:black" d="M393.000000,640441.800000 L394.560000,640441.200000 L395.520000,640440.840000 L395.220000,640441.860000 L393.660000,640447.260000 L393.180000,640449.000000 L392.700000,640447.260000 L391.200000,640441.860000 L390.900000,640440.840000 L391.860000,640441.200000 L392.160000,640441.560000 L393.660000,640446.960000 L392.700000,640447.260000 L392.700000,640446.960000 L394.260000,640441.560000 L395.220000,640441.860000 L394.920000,640442.160000 L393.360000,640442.760000 "></path>
<path style="stroke:black" d="M273.360000,640441.140000 L274.920000,640441.740000 L274.920000,640442.700000 L274.740000,640442.760000 L274.560000,640442.700000 L273.000000,640442.100000 "></path>
<path style="stroke:black" d="M274.500000,640441.140000 L274.500000,640442.220000 L274.980010,640442.220000 L274.980010,640441.140000 "></path>
<path style="stroke:black" d="M209.640000,640441.200000 L211.200000,640441.740000 L211.200000,640442.700000 L211.020000,640442.760000 L210.840000,640442.700000 L209.280000,640442.160000 "></path>
<path style="stroke:black" d="M210.780000,640441.200000 L210.780000,640442.220000 L211.260000,640442.220000 L211.260000,640441.200000 "></path>
<path style="stroke:black" d="M391.860000,640441.200000 L393.360000,640441.800000 L393.360000,640442.760000 L393.180000,640442.820000 L393.000000,640442.760000 L391.500000,640442.160000 "></path>
<path style="stroke:black" d="M392.940000,640441.200000 L392.940000,640442.280000 L393.420010,640442.280000 L393.420010,640441.200000 "></path>
<path style="stroke:black" d="M331.320000,640442.220000 L332.880000,640441.680000 L333.840000,640441.320000 L333.540000,640442.340000 L331.980000,640447.680000 L331.500000,640449.300000 L331.020000,640447.680000 L329.460000,640442.340000 L329.160000,640441.320000 L330.120000,640441.680000 L330.420000,640442.040000 L331.980000,640447.380000 L331.020000,640447.680000 L331.020000,640447.380000 L332.580000,640442.040000 L333.540000,640442.340000 L333.240000,640442.640000 L331.680000,640443.180000 "></path>
<path style="stroke:black" d="M274.740000,640442.220000 L276.300000,640441.620000 L274.740000,640447.020000 L273.180000,640441.620000 "></path>
<path style="stroke:black" d="M331.260000,640441.620000 L331.260000,640442.700000 L331.739980,640442.700000 L331.739980,640441.620000 "></path>
<path style="stroke:black" d="M211.020000,640442.220000 L212.580000,640441.680000 L211.020000,640447.020000 L209.460000,640441.680000 "></path>
<path style="stroke:black" d="M330.120000,640441.680000 L331.680000,640442.220000 L331.680000,640443.180000 L331.500000,640443.240000 L331.320000,640443.180000 L329.760000,640442.640000 "></path>
<path style="stroke:black" d="M393.180000,640442.280000 L394.740000,640441.680000 L393.180000,640447.080000 L391.680000,640441.680000 "></path>
<path style="stroke:black" d="M331.500000,640442.700000 L333.060000,640442.160000 L331.500000,640447.500000 L329.940000,640442.160000 "></path>
<text y="640407.347684" x="219.0598" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="9.777096">X3</text>
<text y="640407.347484" x="406.08" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="9.777096">X0</text>
<text y="640407.347684" x="282.775312" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="9.777096">X2</text>
<text y="640407.347684" x="343.793584" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="9.777096">X1</text>
<text y="640461.107384" x="197.0398" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="53.5835">X3 &lt;&lt; COUNT</text></svg>
<svg width="377.3700225" viewBox="192.240005 640448.579995 251.580015 18.060015" height="27.0900224999">
<rect y="640448.58" x="255.18" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0600000001" width="62.88"></rect>
<rect y="640448.58" x="318.06" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0600000001" width="62.88"></rect>
<rect y="640448.58" x="380.94" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0600000001" width="62.88"></rect>
<text y="640461.107384" x="260.8201" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="53.5832">X2 &lt;&lt; COUNT</text>
<text y="640461.107384" x="324.0599" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="53.5834">X1 &lt;&lt; COUNT</text>
<text y="640461.107184" x="384.6601" style="font-size:7.980000pt" lengthAdjust="spacingAndGlyphs" textLength="11.997132">X0 &lt;&lt; COUNT</text></svg>
<h3>Figure 4-13. PSLLW, PSLLD, and PSLLQ Instruction Operation Using 64-bit Operand</h3>
<p>The (V)PSLLW instruction shifts each of the words in the destination operand to the left by the number of bits spec-ified in the count operand; the (V)PSLLD instruction shifts each of the doublewords in the destination operand; and the (V)PSLLQ instruction shifts the quadword (or quadwords) in the destination operand.</p>
<p>In 64-bit mode, using a REX prefix in the form of REX.R permits this instruction to access additional registers (XMM8-XMM15).</p>
<p>Legacy SSE instructions: The destination operand is an MMX technology register; the count operand can be either an MMX technology register or an 64-bit memory location.</p>
<p>128-bit Legacy SSE version: The destination and first source operands are XMM registers. Bits (VLMAX-1:128) of the corresponding YMM destination register remain unchanged. The count operand can be either an XMM register or a 128-bit memory location or an 8-bit immediate. If the count operand is a memory address, 128 bits are loaded but the upper 64 bits are ignored.</p>
<p>VEX.128 encoded version: The destination and first source operands are XMM registers. Bits (VLMAX-1:128) of the destination YMM register are zeroed. The count operand can be either an XMM register or a 128-bit memory loca-tion or an 8-bit immediate. If the count operand is a memory address, 128 bits are loaded but the upper 64 bits are ignored.</p>
<p>VEX.256 encoded version: The destination and first source operands are YMM registers. The count operand can be either an XMM register or a 128-bit memory location or an 8-bit immediate.</p>
<p>Note: For shifts with an immediate count (VEX.128.66.0F 71-73 /6), VEX.vvvv encodes the destination register, and VEX.B + ModRM.r/m encodes the source register. VEX.L must be 0, otherwise instructions will #UD.</p>
<h2>Operation</h2>
<p><strong>PSLLW (with 64-bit operand)</strong></p>
<pre> IF (COUNT &gt; 15)
THEN
DEST[64:0] ← 0000000000000000H;
ELSE
DEST[15:0] ← ZeroExtend(DEST[15:0] &lt;&lt; COUNT);
(* Repeat shift operation for 2nd and 3rd words *)
DEST[63:48] ← ZeroExtend(DEST[63:48] &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLD (with 64-bit operand)</strong></p>
<pre> IF (COUNT &gt; 31)
THEN
DEST[64:0] ← 0000000000000000H;
ELSE
DEST[31:0] ← ZeroExtend(DEST[31:0] &lt;&lt; COUNT);
DEST[63:32] ← ZeroExtend(DEST[63:32] &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLQ (with 64-bit operand)</strong></p>
<pre> IF (COUNT &gt; 63)
THEN
DEST[64:0] ← 0000000000000000H;
ELSE
DEST ← ZeroExtend(DEST &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLW (with 128-bit operand)</strong></p>
<pre> COUNT ← COUNT_SOURCE[63:0];
IF (COUNT &gt; 15)
THEN
DEST[128:0] ← 00000000000000000000000000000000H;
ELSE
DEST[15:0] ← ZeroExtend(DEST[15:0] &lt;&lt; COUNT);
(* Repeat shift operation for 2nd through 7th words *)
DEST[127:112] ← ZeroExtend(DEST[127:112] &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLD (with 128-bit operand)</strong></p>
<pre> COUNT ← COUNT_SOURCE[63:0];
IF (COUNT &gt; 31)
THEN
DEST[128:0] ← 00000000000000000000000000000000H;
ELSE
DEST[31:0] ← ZeroExtend(DEST[31:0] &lt;&lt; COUNT);
(* Repeat shift operation for 2nd and 3rd doublewords *)
DEST[127:96] ← ZeroExtend(DEST[127:96] &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLQ (with 128-bit operand)</strong></p>
<pre> COUNT ← COUNT_SOURCE[63:0];
IF (COUNT &gt; 63)
THEN
DEST[128:0] ← 00000000000000000000000000000000H;
ELSE
DEST[63:0] ← ZeroExtend(DEST[63:0] &lt;&lt; COUNT);
DEST[127:64] ← ZeroExtend(DEST[127:64] &lt;&lt; COUNT);
FI;</pre>
<p><strong>PSLLW (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(DEST, SRC)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>PSLLW (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(DEST, imm8)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>VPSLLD (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(SRC1, SRC2)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>VPSLLD (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(SRC1, imm8)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>PSLLD (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(DEST, SRC)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>PSLLD (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(DEST, imm8)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>VPSLLQ (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_QWORDS(SRC1, SRC2)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>VPSLLQ (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_QWORDS(SRC1, imm8)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>PSLLQ (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_QWORDS(DEST, SRC)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>PSLLQ (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_QWORDS(DEST, imm8)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>VPSLLW (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(SRC1, SRC2)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>VPSLLW (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(SRC1, imm8)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>PSLLW (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(DEST, SRC)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>PSLLW (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_WORDS(DEST, imm8)
DEST[VLMAX-1:128] (Unmodified)</pre>
<p><strong>VPSLLD (xmm, xmm, xmm/m128)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(SRC1, SRC2)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>VPSLLD (xmm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS(SRC1, imm8)
DEST[VLMAX-1:128] ← 0</pre>
<p><strong>VPSLLW (ymm, ymm, xmm/m128)</strong></p>
<pre>DEST[255:0] ← LOGICAL_LEFT_SHIFT_WORDS_256b(SRC1, SRC2)</pre>
<p><strong>VPSLLW (ymm, imm8)</strong></p>
<pre>DEST[255:0] ← LOGICAL_LEFT_SHIFT_WORD_256bS(SRC1, imm8)</pre>
<p><strong>VPSLLD (ymm, ymm, xmm/m128)</strong></p>
<pre>DEST[255:0] ← LOGICAL_LEFT_SHIFT_DWORDS_256b(SRC1, SRC2)</pre>
<p><strong>VPSLLD (ymm, imm8)</strong></p>
<pre>DEST[127:0] ← LOGICAL_LEFT_SHIFT_DWORDS_256b(SRC1, imm8)</pre>
<p><strong>VPSLLQ (ymm, ymm, xmm/m128)</strong></p>
<pre>DEST[255:0] ← LOGICAL_LEFT_SHIFT_QWORDS_256b(SRC1, SRC2)</pre>
<p><strong>VPSLLQ (ymm, imm8)</strong></p>
<pre>DEST[255:0] ← LOGICAL_LEFT_SHIFT_QWORDS_256b(SRC1, imm8)</pre>
<h2>Intel C/C++ Compiler Intrinsic Equivalents</h2>
<p>PSLLW:</p>
<p>__m64 _mm_slli_pi16 (__m64 m, int count)</p>
<p>PSLLW:</p>
<p>__m64 _mm_sll_pi16(__m64 m, __m64 count)</p>
<p>(V)PSLLW:</p>
<p>__m128i _mm_slli_pi16(__m64 m, int count)</p>
<p>(V)PSLLW:</p>
<p>__m128i _mm_slli_pi16(__m128i m, __m128i count)</p>
<p>VPSLLW:</p>
<p>__m256i _mm256_slli_epi16 (__m256i m, int count)</p>
<p>VPSLLW:</p>
<p>__m256i _mm256_sll_epi16 (__m256i m, __m128i count)</p>
<p>PSLLD:</p>
<p>__m64 _mm_slli_pi32(__m64 m, int count)</p>
<p>PSLLD:</p>
<p>__m64 _mm_sll_pi32(__m64 m, __m64 count)</p>
<p>(V)PSLLD:</p>
<p>__m128i _mm_slli_epi32(__m128i m, int count)</p>
<p>(V)PSLLD:</p>
<p>__m128i _mm_sll_epi32(__m128i m, __m128i count)</p>
<p>VPSLLD:</p>
<p>__m256i _mm256_slli_epi32 (__m256i m, int count)</p>
<p>VPSLLD:</p>
<p>__m256i _mm256_sll_epi32 (__m256i m, __m128i count)</p>
<p>PSLLQ:</p>
<p>__m64 _mm_slli_si64(__m64 m, int count)</p>
<p>PSLLQ:</p>
<p>__m64 _mm_sll_si64(__m64 m, __m64 count)</p>
<p>(V)PSLLQ:</p>
<p>__m128i _mm_slli_epi64(__m128i m, int count)</p>
<p>(V)PSLLQ:</p>
<p>__m128i _mm_sll_epi64(__m128i m, __m128i count)</p>
<p>VPSLLQ:</p>
<p>__m256i _mm256_slli_epi64 (__m256i m, int count)</p>
<p>VPSLLQ:</p>
<p>__m256i _mm256_sll_epi64 (__m256i m, __m128i count)</p>
<h2>Flags Affected</h2>
<p>None.</p>
<h2>Numeric Exceptions</h2>
<p>None.</p>
<h2>Other Exceptions</h2>
<p>See Exceptions Type 4 and 7 for non-VEX-encoded instructions; additionally</p>
<table class="exception-table">
<tr>
<td>#UD</td>
<td>If VEX.L = 1.</td></tr></table></body></html>