ia32-64/x86/phaddw.phaddd.html
2025-07-08 02:23:29 -03:00

370 lines
43 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:x86="http://www.felixcloutier.com/x86"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style.css"></link><title>PHADDW/PHADDD
— Packed Horizontal Add</title></head><body><header><nav><ul><li><a href='index.html'>Index</a></li><li>December 2023</li></ul></nav></header><h1>PHADDW/PHADDD
— Packed Horizontal Add</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op/En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>NP 0F 38 01 /r<sup>1</sup> PHADDW mm1, mm2/m64</td>
<td>RM</td>
<td>V/V</td>
<td>SSSE3</td>
<td>Add 16-bit integers horizontally, pack to mm1.</td></tr>
<tr>
<td>66 0F 38 01 /r PHADDW xmm1, xmm2/m128</td>
<td>RM</td>
<td>V/V</td>
<td>SSSE3</td>
<td>Add 16-bit integers horizontally, pack to xmm1.</td></tr>
<tr>
<td>NP 0F 38 02 /r PHADDD mm1, mm2/m64</td>
<td>RM</td>
<td>V/V</td>
<td>SSSE3</td>
<td>Add 32-bit integers horizontally, pack to mm1.</td></tr>
<tr>
<td>66 0F 38 02 /r PHADDD xmm1, xmm2/m128</td>
<td>RM</td>
<td>V/V</td>
<td>SSSE3</td>
<td>Add 32-bit integers horizontally, pack to xmm1.</td></tr>
<tr>
<td>VEX.128.66.0F38.WIG 01 /r VPHADDW xmm1, xmm2, xmm3/m128</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Add 16-bit integers horizontally, pack to xmm1.</td></tr>
<tr>
<td>VEX.128.66.0F38.WIG 02 /r VPHADDD xmm1, xmm2, xmm3/m128</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Add 32-bit integers horizontally, pack to xmm1.</td></tr>
<tr>
<td>VEX.256.66.0F38.WIG 01 /r VPHADDW ymm1, ymm2, ymm3/m256</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Add 16-bit signed integers horizontally, pack to ymm1.</td></tr>
<tr>
<td>VEX.256.66.0F38.WIG 02 /r VPHADDD ymm1, ymm2, ymm3/m256</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Add 32-bit signed integers horizontally, pack to ymm1.</td></tr></table>
<blockquote>
<p>1. See note in Section 2.5, “Intel® AVX and Intel® SSE Instruction Exception Classification,” in the Intel<sup>®</sup> 64 and IA-32 Architectures Software Developers Manual, Volume 2A, and Section 23.25.3, “Exception Conditions of Legacy SIMD Instructions Operating on MMX Registers,” in the Intel<sup>®</sup> 64 and IA-32 Architectures Software Developers Manual, Volume 3B.</p></blockquote>
<h2 id="instruction-operand-encoding">Instruction Operand Encoding<a class="anchor" href="#instruction-operand-encoding">
</a></h2>
<table>
<tr>
<th>Op/En</th>
<th>Operand 1</th>
<th>Operand 2</th>
<th>Operand 3</th>
<th>Operand 4</th></tr>
<tr>
<td>RM</td>
<td>ModRM:reg (r, w)</td>
<td>ModRM:r/m (r)</td>
<td>N/A</td>
<td>N/A</td></tr>
<tr>
<td>RVM</td>
<td>ModRM:reg (w)</td>
<td>VEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>N/A</td></tr></table>
<h2 id="description">Description<a class="anchor" href="#description">
</a></h2>
<p>(V)PHADDW adds two adjacent 16-bit signed integers horizontally from the source and destination operands and packs the 16-bit signed results to the destination operand (first operand). (V)PHADDD adds two adjacent 32-bit signed integers horizontally from the source and destination operands and packs the 32-bit signed results to the destination operand (first operand). When the source operand is a 128-bit memory operand, the operand must be aligned on a 16-byte boundary or a general-protection exception (#GP) will be generated.</p>
<p>Note that these instructions can operate on either unsigned or signed (twos complement notation) integers; however, it does not set bits in the EFLAGS register to indicate overflow and/or a carry. To prevent undetected overflow conditions, software must control the ranges of the values operated on.</p>
<p>Legacy SSE instructions: Both operands can be MMX registers. The second source operand can be an MMX register or a 64-bit memory location.</p>
<p>128-bit Legacy SSE version: The first source and destination operands are XMM registers. The second source operand can be an XMM register or a 128-bit memory location. Bits (MAXVL-1:128) of the corresponding YMM destination register remain unchanged.</p>
<p>In 64-bit mode, use the REX prefix to access additional registers.</p>
<p>VEX.128 encoded version: The first source and destination operands are XMM registers. The second source operand can be an XMM register or a 128-bit memory location. Bits (MAXVL-1:128) of the corresponding YMM register are zeroed.</p>
<p>VEX.256 encoded version: Horizontal addition of two adjacent data elements of the low 16-bytes of the first and second source operands are packed into the low 16-bytes of the destination operand. Horizontal addition of two adjacent data elements of the high 16-bytes of the first and second source operands are packed into the high 16-bytes of the destination operand. The first source and destination operands are YMM registers. The second source operand can be an YMM register or a 256-bit memory location.</p>
<svg style="width: 411.76051368000003pt; height: 62.42400000000011pt" viewBox="126.98152750000003 0.0 348.1337614 57.020000000000095">
<g xmlns="http://www.w3.org/2000/svg" style="fill: none; stroke: none">
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="144.24" x="303.24" y="2.0000000063191692e-05"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="447.0" y="0.2400000000000091"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="144.24" x="303.0" y="18.000020000000063"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="303.0" y="0.0"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="338.88" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="338.88" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="374.94" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="374.94" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="410.94" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="410.94" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="429.0" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="429.0" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="357.0" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="357.0" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="393.0" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="393.0" y="0.2400000000000091"></rect>
<rect height="0.23999" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="321.0" y="9.999999974752427e-06"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="321.0" y="0.2400000000000091"></rect>
<path d="M 315.78000000000003 43.440000000000055 L 315.3 43.56000000000006 L 315.66 44.58000000000004 L 316.14000000000004 44.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.6 44.10000000000002 L 316.92 43.08000000000004 L 317.70000000000005 42.48000000000002 L 317.76000000000005 43.5 L 317.94 49.08000000000004 L 318.0 50.879999999999995 L 316.98 49.379999999999995 L 313.86 44.75999999999999 L 313.26000000000005 43.92000000000007 L 314.28000000000003 43.92000000000007 L 314.70000000000005 44.22000000000003 L 317.82000000000005 48.84000000000003 L 316.98 49.379999999999995 L 316.92 49.139999999999986 L 316.74 43.56000000000006 L 317.76000000000005 43.5 L 317.52000000000004 43.92000000000007 L 316.20000000000005 44.940000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 314.28000000000003 43.91999999999996 L 315.90000000000003 43.979999999999905 L 316.20000000000005 44.93999999999994 L 316.08000000000004 45.059999999999945 L 315.90000000000003 45.059999999999945 L 314.28000000000003 45.0" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.90000000000003 44.51999999999998 L 317.22 43.5 L 317.40000000000003 49.07999999999993 L 314.28000000000003 44.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 307.62 18.720000000000027 L 307.56 18.480000000000018 L 307.08 18.660000000000082 L 307.14 18.899999999999977" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.78000000000003 43.440000000000055 L 315.84000000000003 43.680000000000064 L 315.36 43.860000000000014 L 315.3 43.620000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 307.62 18.720000000000027 L 307.14 18.899999999999977 L 315.3 43.620000000000005 L 315.78000000000003 43.440000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 427.38 43.440000000000055 L 426.9 43.56000000000006 L 427.2 44.58000000000004 L 427.68 44.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 427.14 44.10000000000002 L 428.46 43.08000000000004 L 429.24 42.48000000000002 L 429.3 43.5 L 429.53999999999996 49.08000000000004 L 429.59999999999997 50.82000000000005 L 428.58 49.379999999999995 L 425.4 44.75999999999999 L 424.8 43.92000000000007 L 425.82 43.92000000000007 L 426.24 44.22000000000003 L 429.41999999999996 48.84000000000003 L 428.58 49.379999999999995 L 428.52 49.139999999999986 L 428.28 43.56000000000006 L 429.3 43.5 L 429.06 43.92000000000007 L 427.74 44.940000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 425.82 43.91999999999996 L 427.44 43.979999999999905 L 427.74 44.93999999999994 L 427.62 45.059999999999945 L 427.44 45.059999999999945 L 425.82 45.0" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 427.44 44.51999999999998 L 428.76 43.5 L 429.0 49.07999999999993 L 425.82 44.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 419.64 20.75999999999999 L 419.58 20.519999999999982 L 419.09999999999997 20.700000000000045 L 419.15999999999997 20.93999999999994" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 427.38 43.440000000000055 L 427.44 43.680000000000064 L 426.96 43.860000000000014 L 426.9 43.620000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 419.64 20.75999999999999 L 419.15999999999997 20.93999999999994 L 426.9 43.620000000000005 L 427.38 43.43999999999994" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 436.56 43.860000000000014 L 436.08 43.74000000000001 L 435.9 44.82000000000005 L 436.38 44.940000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 436.02 44.39999999999998 L 437.64 44.10000000000002 L 438.65999999999997 43.860000000000014 L 438.18 44.819999999999936 L 435.71999999999997 49.860000000000014 L 434.94 51.48000000000002 L 434.82 49.74000000000001 L 434.28 44.15999999999997 L 434.15999999999997 43.07999999999993 L 435.0 43.620000000000005 L 435.24 43.98000000000002 L 435.78 49.559999999999945 L 434.82 49.74000000000001 L 434.82 49.43999999999994 L 437.28 44.39999999999998 L 438.18 44.819999999999936 L 437.88 45.059999999999945 L 436.26 45.360000000000014" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 435.0 43.620000000000005 L 436.38 44.460000000000036 L 436.26 45.360000000000014 L 436.02 45.41999999999996 L 435.9 45.299999999999955 L 434.52 44.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 436.14 44.879999999999995 L 437.76 44.58000000000004 L 435.3 49.620000000000005 L 434.76 44.039999999999964" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 440.82 20.039999999999964 L 440.82 19.799999999999955 L 440.34 19.74000000000001 L 440.34 19.980000000000018" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 436.56 43.860000000000014 L 436.56 44.10000000000002 L 436.08 44.039999999999964 L 436.08 43.80000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 440.82 20.039999999999964 L 440.34 19.980000000000018 L 436.08 43.799999999999955 L 436.56 43.860000000000014" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 394.26 43.08000000000004 L 393.78 42.960000000000036 L 393.42 43.98000000000002 L 393.9 44.10000000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 393.66 43.5 L 395.28000000000003 43.5 L 396.3 43.559999999999945 L 395.64000000000004 44.39999999999998 L 392.22 48.84000000000003 L 391.20000000000005 50.22000000000003 L 391.32000000000005 48.48000000000002 L 391.86 42.960000000000036 L 391.98 41.879999999999995 L 392.76000000000005 42.60000000000002 L 392.88000000000005 43.01999999999998 L 392.34000000000003 48.539999999999964 L 391.32000000000005 48.48000000000002 L 391.44 48.17999999999995 L 394.86 43.74000000000001 L 395.64000000000004 44.39999999999998 L 395.28000000000003 44.58000000000004 L 393.66 44.58000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 392.76 42.60000000000002 L 394.02 43.680000000000064 L 393.65999999999997 44.58000000000004 L 393.48 44.51999999999998 L 393.3 44.39999999999998 L 392.03999999999996 43.32000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 393.66 44.039999999999964 L 395.28000000000003 44.039999999999964 L 391.86 48.48000000000002 L 392.40000000000003 42.95999999999992" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 403.62 19.5 L 403.68 19.32000000000005 L 403.26 19.139999999999986 L 403.2 19.32000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 394.26 43.139999999999986 L 394.2 43.319999999999936 L 393.78 43.139999999999986 L 393.84 42.960000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 403.62 19.5 L 403.2 19.32000000000005 L 393.84000000000003 42.960000000000036 L 394.26 43.139999999999986" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 387.48 44.39999999999998 L 387.0 44.51999999999998 L 387.24 45.539999999999964 L 387.72 45.41999999999996" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 387.18 45.06000000000006 L 388.56 44.22000000000003 L 389.46 43.680000000000064 L 389.34000000000003 44.700000000000045 L 388.92 50.280000000000086 L 388.8 52.020000000000095 L 388.02 50.520000000000095 L 385.38 45.54000000000008 L 384.84000000000003 44.58000000000004 L 385.86 44.760000000000105 L 386.22 45.000000000000114 L 388.86 49.98000000000002 L 388.02 50.520000000000095 L 387.96 50.22000000000003 L 388.38 44.6400000000001 L 389.34000000000003 44.700000000000045 L 389.16 45.06000000000006 L 387.78000000000003 45.90000000000009" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 385.86 44.75999999999999 L 387.54 45.0 L 387.78000000000003 45.89999999999998 L 387.6 46.01999999999998 L 387.42 45.960000000000036 L 385.74 45.72000000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 387.48 45.48000000000002 L 388.86 44.639999999999986 L 388.44 50.22000000000003 L 385.8 45.24000000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 382.20000000000005 18.960000000000036 L 382.14000000000004 18.720000000000027 L 381.66 18.840000000000032 L 381.72 19.08000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 387.48 44.39999999999998 L 387.54 44.639999999999986 L 387.06 44.75999999999999 L 387.0 44.51999999999998" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 382.20000000000005 18.960000000000036 L 381.72 19.08000000000004 L 387.00000000000006 44.520000000000095 L 387.48 44.40000000000009" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 355.02 41.58000000000004 L 354.53999999999996 41.700000000000045 L 354.84 42.72000000000003 L 355.32 42.60000000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 354.78000000000003 42.24000000000001 L 356.1 41.22000000000003 L 356.88000000000005 40.620000000000005 L 356.94000000000005 41.700000000000045 L 357.00000000000006 47.34000000000003 L 357.00000000000006 49.139999999999986 L 356.04 47.58000000000004 L 353.04 42.84000000000003 L 352.44000000000005 41.940000000000055 L 353.52000000000004 42.0 L 353.88000000000005 42.299999999999955 L 356.88000000000005 47.039999999999964 L 356.04 47.58000000000004 L 355.98 47.27999999999997 L 355.92 41.639999999999986 L 356.94000000000005 41.700000000000045 L 356.70000000000005 42.06000000000006 L 355.38000000000005 43.08000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 353.52 42.0 L 355.14 42.120000000000005 L 355.38 43.08000000000004 L 355.26 43.200000000000045 L 355.02 43.200000000000045 L 353.4 43.08000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 355.08 42.65999999999997 L 356.4 41.639999999999986 L 356.46 47.27999999999997 L 353.46 42.539999999999964" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 348.18 19.139999999999986 L 348.12 18.899999999999977 L 347.64 19.019999999999982 L 347.7 19.25999999999999" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 355.02 41.58000000000004 L 355.08 41.82000000000005 L 354.59999999999997 41.940000000000055 L 354.53999999999996 41.700000000000045" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 348.18 19.139999999999986 L 347.7 19.25999999999999 L 354.54 41.69999999999993 L 355.02 41.58000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 362.88 40.91999999999996 L 362.4 40.799999999999955 L 362.21999999999997 41.819999999999936 L 362.7 41.93999999999994" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 362.40000000000003 41.39999999999998 L 364.02000000000004 41.15999999999997 L 364.98 40.98000000000002 L 364.50000000000006 41.879999999999995 L 361.98 46.860000000000014 L 361.20000000000005 48.360000000000014 L 361.08000000000004 46.67999999999995 L 360.54 41.10000000000002 L 360.42 40.07999999999993 L 361.26000000000005 40.620000000000005 L 361.50000000000006 41.039999999999964 L 362.04 46.620000000000005 L 361.08000000000004 46.67999999999995 L 361.14000000000004 46.43999999999994 L 363.66 41.45999999999992 L 364.50000000000006 41.879999999999995 L 364.14000000000004 42.120000000000005 L 362.52000000000004 42.360000000000014" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 361.26 40.620000000000005 L 362.7 41.460000000000036 L 362.52 42.360000000000014 L 362.34 42.41999999999996 L 362.21999999999997 42.299999999999955 L 360.78 41.460000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 362.46 41.879999999999995 L 364.08 41.639999999999986 L 361.56 46.620000000000005 L 361.02 41.039999999999964" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 367.02 19.440000000000055 L 367.08 19.200000000000045 L 366.59999999999997 19.08000000000004 L 366.53999999999996 19.32000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 362.88 40.91999999999996 L 362.82 41.15999999999997 L 362.34 41.039999999999964 L 362.4 40.799999999999955" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 367.02 19.440000000000055 L 366.53999999999996 19.32000000000005 L 362.4 40.80000000000007 L 362.88 40.92000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 325.32 42.65999999999997 L 324.84 42.539999999999964 L 324.71999999999997 43.559999999999945 L 325.2 43.67999999999995" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 324.84000000000003 43.139999999999986 L 326.40000000000003 42.84000000000003 L 327.42 42.539999999999964 L 326.94000000000005 43.559999999999945 L 324.66 48.65999999999997 L 323.94000000000005 50.34000000000003 L 323.76000000000005 48.539999999999964 L 323.04 42.960000000000036 L 322.86 41.879999999999995 L 323.76000000000005 42.41999999999996 L 324.00000000000006 42.77999999999997 L 324.72 48.360000000000014 L 323.76000000000005 48.539999999999964 L 323.76000000000005 48.24000000000001 L 326.04 43.139999999999986 L 326.94000000000005 43.559999999999945 L 326.64000000000004 43.799999999999955 L 325.08000000000004 44.10000000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 323.76 42.41999999999996 L 325.2 43.19999999999993 L 325.08 44.09999999999991 L 324.9 44.15999999999997 L 324.71999999999997 44.039999999999964 L 323.28 43.25999999999999" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 324.96 43.620000000000005 L 326.52 43.32000000000005 L 324.23999999999995 48.41999999999996 L 323.52 42.84000000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 328.8 18.480000000000018 L 328.8 18.24000000000001 L 328.32 18.180000000000064 L 328.32 18.420000000000073" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 325.32 42.65999999999997 L 325.32 42.89999999999998 L 324.84 42.83999999999992 L 324.84 42.60000000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 328.8 18.480000000000018 L 328.32 18.420000000000073 L 324.84000000000003 42.60000000000002 L 325.32 42.65999999999997" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 10.118204200000037pt; fill: #000" textLength="343.1337614" x="129.48152750000003" y="14.766349200000036">SRC2 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0 SRC1</text></g></svg>
<p>S7 S3 S3 S4 S3 S2 S1 S0</p>
<figure id="fig-4-10">
<svg style="width: 309.45599999999996pt; height: 76.32000000000009pt" viewBox="170.36 0.0 262.88 68.60000000000008">
<g xmlns="http://www.w3.org/2000/svg" style="fill: none; stroke: none">
<rect height="18.0" style="fill: rgb(100%, 100%, 100%)" width="144.06" x="248.58" y="45.36000000000007"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="144.3" x="248.58" y="45.12002000000007"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="392.40000000000003" y="45.36000000000007"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="144.3" x="248.34" y="63.12002000000007"></rect>
<rect height="18.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="248.34" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="284.22" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="320.28000000000003" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="356.34000000000003" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="374.34000000000003" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="302.34000000000003" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="338.34000000000003" y="45.12000000000006"></rect>
<rect height="18.48" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="266.34000000000003" y="45.12000000000006"></rect>
<path d="M 393.06 36.30000000000007 L 392.7 35.940000000000055 L 391.86 36.60000000000008 L 392.22 36.96000000000009" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 392.28000000000003 36.36000000000007 L 393.72 37.200000000000045 L 394.62 37.680000000000064 L 393.66 38.10000000000008 L 388.56 40.38000000000005 L 386.94000000000005 41.10000000000008 L 387.96000000000004 39.66000000000008 L 391.08000000000004 35.04000000000008 L 391.62 34.14000000000004 L 391.98 35.10000000000008 L 391.92 35.5800000000001 L 388.8 40.200000000000045 L 387.96000000000004 39.66000000000008 L 388.14000000000004 39.480000000000075 L 393.24 37.200000000000045 L 393.66 38.10000000000008 L 393.24 38.04000000000008 L 391.8 37.200000000000045" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 391.98 35.10000000000008 L 392.52000000000004 36.60000000000008 L 391.8 37.2000000000001 L 391.62 37.1400000000001 L 391.56 36.96000000000009 L 391.02000000000004 35.46000000000009" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 392.04 36.78000000000003 L 393.48 37.620000000000005 L 388.38 39.900000000000034 L 391.5 35.28000000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 430.56 4.680000000000064 L 430.74 4.560000000000059 L 430.44 4.2000000000000455 L 430.26 4.32000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 393.06 36.30000000000007 L 392.88 36.42000000000007 L 392.58 36.06000000000006 L 392.76 35.940000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 430.56 4.680000000000064 L 430.26 4.32000000000005 L 392.76 35.940000000000055 L 393.06 36.30000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 340.86 38.88000000000005 L 340.62 39.240000000000066 L 341.52000000000004 39.78000000000003 L 341.76 39.42000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 341.16 39.54000000000008 L 341.46000000000004 37.92000000000007 L 341.58000000000004 36.90000000000009 L 342.36 37.680000000000064 L 346.26000000000005 41.7000000000001 L 347.46000000000004 42.90000000000009 L 345.78000000000003 42.480000000000075 L 340.32000000000005 41.16000000000008 L 339.24 40.92000000000007 L 340.08000000000004 40.260000000000105 L 340.5 40.2000000000001 L 345.96000000000004 41.520000000000095 L 345.78000000000003 42.480000000000075 L 345.48 42.36000000000007 L 341.58000000000004 38.34000000000009 L 342.36 37.680000000000064 L 342.42 38.04000000000008 L 342.12 39.66000000000008" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 340.08 40.26000000000005 L 341.34 39.180000000000064 L 342.12 39.660000000000025 L 342.12 39.84000000000003 L 341.94 40.02000000000004 L 340.68 41.10000000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 341.64 39.60000000000008 L 341.94 37.980000000000075 L 345.84 42.00000000000006 L 340.38 40.680000000000064" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 281.46 5.100000000000023 L 281.28 4.980000000000018 L 281.03999999999996 5.399999999999977 L 281.21999999999997 5.519999999999982" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 340.86 38.88000000000005 L 341.04 39.00000000000006 L 340.8 39.42000000000007 L 340.62 39.30000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 281.46 5.100000000000023 L 281.21999999999997 5.519999999999982 L 340.62 39.30000000000001 L 340.86 38.879999999999995" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 318.66 40.02000000000004 L 318.42 40.38000000000005 L 319.38000000000005 40.920000000000016 L 319.62 40.56000000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 319.02 40.680000000000064 L 319.32 39.06000000000006 L 319.44 38.04000000000008 L 320.21999999999997 38.82000000000005 L 324.06 42.84000000000009 L 325.26 44.10000000000008 L 323.58 43.62000000000006 L 318.18 42.240000000000066 L 317.09999999999997 42.00000000000006 L 317.94 41.34000000000009 L 318.35999999999996 41.280000000000086 L 323.76 42.66000000000008 L 323.58 43.62000000000006 L 323.28 43.50000000000006 L 319.44 39.480000000000075 L 320.21999999999997 38.82000000000005 L 320.28 39.180000000000064 L 319.97999999999996 40.80000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 317.94 41.34000000000003 L 319.2 40.32000000000005 L 319.98 40.80000000000001 L 319.98 41.04000000000002 L 319.8 41.160000000000025 L 318.54 42.18000000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 319.5 40.740000000000066 L 319.8 39.12000000000006 L 323.64 43.14000000000004 L 318.24 41.76000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 250.44 0.12000000000000455 L 250.26 0.0 L 250.02 0.4199999999999591 L 250.2 0.5399999999999636" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 318.66 40.02000000000004 L 318.84000000000003 40.14000000000004 L 318.6 40.56000000000006 L 318.42 40.440000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 250.44 0.12000000000000455 L 250.2 0.5399999999999636 L 318.42 40.44 L 318.65999999999997 40.01999999999998" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 248.22 38.58000000000004 L 247.98 39.06000000000006 L 248.94 39.54000000000002 L 249.18 39.06000000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 248.58 39.240000000000066 L 248.76000000000002 37.62000000000006 L 248.76000000000002 36.60000000000008 L 249.60000000000002 37.32000000000005 L 253.74 41.10000000000008 L 255.06 42.30000000000007 L 253.32000000000002 42.00000000000006 L 247.8 40.92000000000007 L 246.78 40.740000000000066 L 247.5 40.08000000000004 L 247.98000000000002 39.96000000000009 L 253.5 40.980000000000075 L 253.32000000000002 42.00000000000006 L 253.08 41.82000000000005 L 248.94000000000003 38.04000000000008 L 249.60000000000002 37.32000000000005 L 249.72 37.740000000000066 L 249.54000000000002 39.36000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 247.5 40.08000000000004 L 248.7 38.940000000000055 L 249.54 39.360000000000014 L 249.54 39.54000000000002 L 249.42 39.660000000000025 L 248.22 40.80000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 249.06 39.30000000000007 L 249.24 37.680000000000064 L 253.38 41.46000000000009 L 247.86 40.440000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 173.28 1.32000000000005 L 173.1 1.2000000000000455 L 172.86 1.6200000000000045 L 173.04 1.740000000000009" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 248.22 38.64000000000004 L 248.4 38.76000000000005 L 248.16 39.180000000000064 L 247.98 39.06000000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 173.28 1.32000000000005 L 173.04 1.740000000000009 L 247.98000000000002 39.06000000000006 L 248.22 38.64000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 370.20000000000005 34.680000000000064 L 369.84000000000003 34.440000000000055 L 369.30000000000007 35.34000000000009 L 369.66 35.58000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 369.6 34.98000000000002 L 371.22 35.28000000000003 L 372.24 35.400000000000034 L 371.40000000000003 36.18000000000001 L 367.26000000000005 39.960000000000036 L 366.0 41.04000000000002 L 366.48 39.420000000000016 L 367.98 34.02000000000004 L 368.22 33.0 L 368.88 33.84000000000003 L 368.94 34.31999999999999 L 367.44 39.660000000000025 L 366.48 39.420000000000016 L 366.6 39.18000000000001 L 370.74 35.400000000000034 L 371.40000000000003 36.18000000000001 L 370.98 36.24000000000001 L 369.36 35.94" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 368.88 33.84000000000003 L 369.9 35.160000000000025 L 369.36 35.940000000000055 L 369.18 35.940000000000055 L 369.06 35.76000000000005 L 368.04 34.440000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 369.48 35.460000000000036 L 371.1 35.76000000000005 L 366.96000000000004 39.54000000000002 L 368.46000000000004 34.14000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 388.8 4.800000000000068 L 388.92 4.620000000000118 L 388.5 4.380000000000109 L 388.38 4.560000000000059" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 370.26 34.680000000000064 L 370.14 34.86000000000007 L 369.71999999999997 34.62000000000006 L 369.84 34.440000000000055" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 388.8 4.800000000000068 L 388.38 4.560000000000059 L 369.84000000000003 34.440000000000055 L 370.26 34.680000000000064" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 316.44 37.32000000000005 L 316.08 36.960000000000036 L 315.3 37.62000000000006 L 315.66 37.980000000000075" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.72 37.38000000000005 L 317.1 38.22000000000003 L 318.0 38.700000000000045 L 317.04 39.12000000000006 L 311.94000000000005 41.400000000000034 L 310.32000000000005 42.12000000000006 L 311.34000000000003 40.680000000000064 L 314.46000000000004 36.00000000000006 L 315.0 35.10000000000008 L 315.36 36.06000000000006 L 315.3 36.54000000000008 L 312.18 41.22000000000003 L 311.34000000000003 40.680000000000064 L 311.52000000000004 40.50000000000006 L 316.62 38.22000000000003 L 317.04 39.12000000000006 L 316.56 39.06000000000006 L 315.18 38.22000000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.36 36.06000000000006 L 315.96000000000004 37.62000000000006 L 315.18 38.220000000000084 L 315.0 38.10000000000008 L 315.0 37.980000000000075 L 314.40000000000003 36.42000000000007" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 315.48 37.80000000000007 L 316.86 38.64000000000004 L 311.76 40.92000000000007 L 314.88 36.240000000000066" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 353.94 5.6400000000001 L 354.12 5.5200000000000955 L 353.82 5.160000000000082 L 353.64 5.280000000000086" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 316.44 37.32000000000005 L 316.26 37.440000000000055 L 315.96 37.08000000000004 L 316.14 36.960000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 353.94 5.6400000000001 L 353.64 5.280000000000086 L 316.14 36.96000000000009 L 316.44 37.32000000000011" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 299.16 36.06000000000006 L 298.8 35.82000000000005 L 298.20000000000005 36.720000000000084 L 298.56 36.960000000000036" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 298.5 36.36000000000007 L 300.12 36.780000000000086 L 301.14 37.020000000000095 L 300.3 37.680000000000064 L 295.92 41.220000000000084 L 294.54 42.30000000000007 L 295.14 40.680000000000064 L 296.94 35.40000000000009 L 297.24 34.38000000000005 L 297.84 35.220000000000084 L 297.9 35.700000000000045 L 296.1 40.980000000000075 L 295.14 40.680000000000064 L 295.32 40.440000000000055 L 299.7 36.90000000000009 L 300.3 37.680000000000064 L 299.88 37.740000000000066 L 298.26 37.32000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 297.84000000000003 35.22000000000003 L 298.8 36.54000000000002 L 298.26000000000005 37.32000000000005 L 298.08000000000004 37.26000000000005 L 297.96000000000004 37.14000000000004 L 297.00000000000006 35.82000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 298.38 36.84000000000003 L 300.0 37.26000000000005 L 295.62 40.80000000000001 L 297.42 35.52000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 321.18 4.680000000000064 L 321.3 4.500000000000114 L 320.88 4.2000000000000455 L 320.76 4.380000000000109" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 299.22 36.12000000000006 L 299.1 36.30000000000007 L 298.68 36.00000000000006 L 298.8 35.82000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 321.18 4.680000000000064 L 320.76 4.380000000000109 L 298.8 35.82000000000005 L 299.22 36.12000000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 268.98 38.58000000000004 L 268.74 38.940000000000055 L 269.64000000000004 39.54000000000002 L 269.88 39.180000000000064" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 269.28000000000003 39.240000000000066 L 269.64000000000004 37.62000000000006 L 269.76000000000005 36.60000000000008 L 270.54 37.440000000000055 L 274.26000000000005 41.58000000000004 L 275.34000000000003 42.84000000000009 L 273.72 42.36000000000007 L 268.38000000000005 40.86000000000007 L 267.42 40.62000000000006 L 268.14000000000004 40.02000000000004 L 268.68 39.90000000000009 L 274.02000000000004 41.40000000000009 L 273.72 42.36000000000007 L 273.48 42.240000000000066 L 269.76000000000005 38.10000000000008 L 270.54 37.440000000000055 L 270.6 37.86000000000007 L 270.24 39.480000000000075" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 268.14 40.02000000000004 L 269.4 39.00000000000006 L 270.24 39.48000000000002 L 270.24 39.660000000000025 L 270.06 39.78000000000003 L 268.8 40.80000000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 269.76 39.36000000000007 L 270.12 37.740000000000066 L 273.84 41.88000000000005 L 268.5 40.38000000000005" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 211.86 2.7000000000000455 L 211.68 2.580000000000041 L 211.44000000000003 3.0 L 211.62 3.1200000000000045" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 268.98 38.58000000000004 L 269.16 38.700000000000045 L 268.92 39.12000000000006 L 268.74 39.00000000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 211.86 2.7000000000000455 L 211.62 3.1200000000000045 L 268.74 39.00000000000006 L 268.98 38.58000000000004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.917955999999947pt; fill: #000" textLength="13.320996999999977" x="241.14079099999998" y="41.46577440000004">255</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.917956pt; fill: #000" textLength="4.442995999999994" x="394.56" y="41.88610100000005">0</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.917956000000004pt; fill: #000" textLength="16.45586629999997" x="229.32" y="58.32610100000005">Dest</text></g></svg>
<figcaption><a href='phaddw.phaddd.html#fig-4-10'>Figure 4-10</a>. 256-bit VPHADDD Instruction Operation</figcaption></figure>
<h2 id="operation">Operation<a class="anchor" href="#operation">
</a></h2>
<h3 id="phaddw--with-64-bit-operands-">PHADDW (With 64-bit Operands)<a class="anchor" href="#phaddw--with-64-bit-operands-">
</a></h3>
<pre>mm1[15-0] = mm1[31-16] + mm1[15-0];
mm1[31-16] = mm1[63-48] + mm1[47-32];
mm1[47-32] = mm2/m64[31-16] + mm2/m64[15-0];
mm1[63-48] = mm2/m64[63-48] + mm2/m64[47-32];
</pre>
<h3 id="phaddw--with-128-bit-operands-">PHADDW (With 128-bit Operands)<a class="anchor" href="#phaddw--with-128-bit-operands-">
</a></h3>
<pre>xmm1[15-0] = xmm1[31-16] + xmm1[15-0];
xmm1[31-16] = xmm1[63-48] + xmm1[47-32];
xmm1[47-32] = xmm1[95-80] + xmm1[79-64];
xmm1[63-48] = xmm1[127-112] + xmm1[111-96];
xmm1[79-64] = xmm2/m128[31-16] + xmm2/m128[15-0];
xmm1[95-80] = xmm2/m128[63-48] + xmm2/m128[47-32];
xmm1[111-96] = xmm2/m128[95-80] + xmm2/m128[79-64];
xmm1[127-112] = xmm2/m128[127-112] + xmm2/m128[111-96];
</pre>
<h3 id="vphaddw--vex-128-encoded-version-">VPHADDW (VEX.128 Encoded Version)<a class="anchor" href="#vphaddw--vex-128-encoded-version-">
</a></h3>
<pre>DEST[15:0] := SRC1[31:16] + SRC1[15:0]
DEST[31:16] := SRC1[63:48] + SRC1[47:32]
DEST[47:32] := SRC1[95:80] + SRC1[79:64]
DEST[63:48] := SRC1[127:112] + SRC1[111:96]
DEST[79:64] := SRC2[31:16] + SRC2[15:0]
DEST[95:80] := SRC2[63:48] + SRC2[47:32]
DEST[111:96] := SRC2[95:80] + SRC2[79:64]
DEST[127:112] := SRC2[127:112] + SRC2[111:96]
DEST[MAXVL-1:128] := 0
</pre>
<h3 id="vphaddw--vex-256-encoded-version-">VPHADDW (VEX.256 Encoded Version)<a class="anchor" href="#vphaddw--vex-256-encoded-version-">
</a></h3>
<pre>DEST[15:0] := SRC1[31:16] + SRC1[15:0]
DEST[31:16] := SRC1[63:48] + SRC1[47:32]
DEST[47:32] := SRC1[95:80] + SRC1[79:64]
DEST[63:48] := SRC1[127:112] + SRC1[111:96]
DEST[79:64] := SRC2[31:16] + SRC2[15:0]
DEST[95:80] := SRC2[63:48] + SRC2[47:32]
DEST[111:96] := SRC2[95:80] + SRC2[79:64]
DEST[127:112] := SRC2[127:112] + SRC2[111:96]
DEST[143:128] := SRC1[159:144] + SRC1[143:128]
DEST[159:144] := SRC1[191:176] + SRC1[175:160]
DEST[175:160] := SRC1[223:208] + SRC1[207:192]
DEST[191:176] := SRC1[255:240] + SRC1[239:224]
DEST[207:192] := SRC2[127:112] + SRC2[143:128]
DEST[223:208] := SRC2[159:144] + SRC2[175:160]
DEST[239:224] := SRC2[191:176] + SRC2[207:192]
DEST[255:240] := SRC2[223:208] + SRC2[239:224]
</pre>
<h3 id="phaddd--with-64-bit-operands-">PHADDD (With 64-bit Operands)<a class="anchor" href="#phaddd--with-64-bit-operands-">
</a></h3>
<pre>mm1[31-0] = mm1[63-32] + mm1[31-0];
mm1[63-32] = mm2/m64[63-32] + mm2/m64[31-0];
</pre>
<h3 id="phaddd--with-128-bit-operands-">PHADDD (With 128-bit Operands)<a class="anchor" href="#phaddd--with-128-bit-operands-">
</a></h3>
<pre>xmm1[31-0] = xmm1[63-32] + xmm1[31-0];
xmm1[63-32] = xmm1[127-96] + xmm1[95-64];
xmm1[95-64] = xmm2/m128[63-32] + xmm2/m128[31-0];
xmm1[127-96] = xmm2/m128[127-96] + xmm2/m128[95-64];
</pre>
<h3 id="vphaddd--vex-128-encoded-version-">VPHADDD (VEX.128 Encoded Version)<a class="anchor" href="#vphaddd--vex-128-encoded-version-">
</a></h3>
<pre>DEST[31-0] := SRC1[63-32] + SRC1[31-0]
DEST[63-32] := SRC1[127-96] + SRC1[95-64]
DEST[95-64] := SRC2[63-32] + SRC2[31-0]
DEST[127-96] := SRC2[127-96] + SRC2[95-64]
DEST[MAXVL-1:128] := 0
</pre>
<h3 id="vphaddd--vex-256-encoded-version-">VPHADDD (VEX.256 Encoded Version)<a class="anchor" href="#vphaddd--vex-256-encoded-version-">
</a></h3>
<pre>DEST[31-0] := SRC1[63-32] + SRC1[31-0]
DEST[63-32] := SRC1[127-96] + SRC1[95-64]
DEST[95-64] := SRC2[63-32] + SRC2[31-0]
DEST[127-96] := SRC2[127-96] + SRC2[95-64]
DEST[159-128] := SRC1[191-160] + SRC1[159-128]
DEST[191-160] := SRC1[255-224] + SRC1[223-192]
DEST[223-192] := SRC2[191-160] + SRC2[159-128]
DEST[255-224] := SRC2[255-224] + SRC2[223-192]
</pre>
<h2 id="intel-c-c++-compiler-intrinsic-equivalents">Intel C/C++ Compiler Intrinsic Equivalents<a class="anchor" href="#intel-c-c++-compiler-intrinsic-equivalents">
</a></h2>
<pre>PHADDW __m64 _mm_hadd_pi16 (__m64 a, __m64 b)
</pre>
<pre>PHADDD __m64 _mm_hadd_pi32 (__m64 a, __m64 b)
</pre>
<pre>(V)PHADDW __m128i _mm_hadd_epi16 (__m128i a, __m128i b)
</pre>
<pre>(V)PHADDD __m128i _mm_hadd_epi32 (__m128i a, __m128i b)
</pre>
<pre>VPHADDW __m256i _mm256_hadd_epi16 (__m256i a, __m256i b)
</pre>
<pre>VPHADDD __m256i _mm256_hadd_epi32 (__m256i a, __m256i b)
</pre>
<h2 class="exceptions" id="simd-floating-point-exceptions">SIMD Floating-Point Exceptions<a class="anchor" href="#simd-floating-point-exceptions">
</a></h2>
<p>None.</p>
<h2 class="exceptions" id="other-exceptions">Other Exceptions<a class="anchor" href="#other-exceptions">
</a></h2>
<p>See <span class="not-imported">Table 2-21</span>, “Type 4 Class Exception Conditions,” additionally:</p>
<table>
<tr>
<td>#UD</td>
<td>If VEX.L = 1.</td></tr></table><footer><p>
This UNOFFICIAL, mechanically-separated, non-verified reference is provided for convenience, but it may be
inc<span style="opacity: 0.2">omp</span>lete or b<sub>r</sub>oke<sub>n</sub> in various obvious or non-obvious
ways. Refer to <a href="https://software.intel.com/en-us/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4">Intel® 64 and IA-32 Architectures Software Developers Manual</a> for anything serious.
</p></footer></body></html>