ia32-64/x86/hsubpd.html

269 lines
33 KiB
HTML
Raw Permalink Normal View History

2025-07-08 02:23:29 -03:00
<!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>HSUBPD
— Packed Double Precision Floating-Point Horizontal Subtract</title></head><body><header><nav><ul><li><a href='index.html'>Index</a></li><li>December 2023</li></ul></nav></header><h1>HSUBPD
— Packed Double Precision Floating-Point Horizontal Subtract</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op/En</th>
<th>64/32-bit Mode</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>66 0F 7D /r HSUBPD xmm1, xmm2/m128</td>
<td>RM</td>
<td>V/V</td>
<td>SSE3</td>
<td>Horizontal subtract packed double precision floating-point values from xmm2/m128 to xmm1.</td></tr>
<tr>
<td>VEX.128.66.0F.WIG 7D /r VHSUBPD xmm1,xmm2, xmm3/m128</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Horizontal subtract packed double precision floating-point values from xmm2 and xmm3/mem.</td></tr>
<tr>
<td>VEX.256.66.0F.WIG 7D /r VHSUBPD ymm1, ymm2, ymm3/m256</td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Horizontal subtract packed double precision floating-point values from ymm2 and ymm3/mem.</td></tr></table>
<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>The HSUBPD instruction subtracts horizontally the packed double precision floating-point numbers of both operands.</p>
<p>Subtracts the double precision floating-point value in the high quadword of the destination operand from the low quadword of the destination operand and stores the result in the low quadword of the destination operand.</p>
<p>Subtracts the double precision floating-point value in the high quadword of the source operand from the low quadword of the source operand and stores the result in the high quadword of the destination operand.</p>
<p>In 64-bit mode, use of the REX.R prefix permits this instruction to access additional registers (XMM8-XMM15).</p>
<p>See <a href='hsubpd.html#fig-3-21'>Figure 3-21</a> for HSUBPD; see <a href='hsubpd.html#fig-3-22'>Figure 3-22</a> for VHSUBPD.</p>
<figure id="fig-3-21">
<svg style="width: 393.5975999999999pt; height: 215.1672pt" viewBox="133.55100000000002 0.0 332.99799999999993 184.306">
<g xmlns="http://www.w3.org/2000/svg" style="stroke: none; fill: none">
<rect height="179.306" style="stroke: rgb(0%, 0%, 0%)" width="327.998" x="136.05100000000002" y="0.0"></rect>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="25.14699999999999"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="25.14699999999999"></rect>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="25.14699999999999"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="25.14699999999999"></rect>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="72.15999999999997"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="72.15999999999997"></rect>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="72.15999999999997"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="72.15999999999997"></rect>
<path d="M 227.891 123.99799999999999 L 227.891 118.07899999999998 L 149.171 118.07899999999998 L 149.171 61.77099999999999 L 359.09000000000003 61.77099999999999 L 359.09000000000003 51.382000000000005" style="fill-rule: nonzero; stroke: rgb(0%, 0%, 0%)"></path>
<path d="M 230.573 123.64799999999997 L 227.89100000000002 129.01299999999998 L 225.208 123.64799999999997 L 230.573 123.64799999999997" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="129.01299999999998"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="162.291" y="129.01299999999998"></rect>
<rect height="26.240000000000002" style="fill: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="129.01299999999998"></rect>
<rect height="26.240000000000002" style="stroke: rgb(0%, 0%, 0%)" width="131.199" x="293.49" y="129.01299999999998"></rect>
<path d="M 359.09000000000003 123.99799999999999 L 359.09000000000003 109.333 L 227.89100000000002 109.333 L 227.89100000000002 98.39999999999998" style="fill-rule: nonzero; stroke: rgb(0%, 0%, 0%)"></path>
<path d="M 361.772 123.64799999999997 L 359.09 129.01299999999998 L 356.407 123.64799999999997 L 361.772 123.64799999999997" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 227.891 51.387 L 227.891 61.77600000000001" style="fill-rule: nonzero; stroke: rgb(0%, 0%, 0%)"></path>
<path d="M 359.09000000000003 98.4 L 359.09000000000003 109.333" style="fill-rule: nonzero; stroke: rgb(0%, 0%, 0%)"></path>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.1993722000000275pt; fill: #000" textLength="102.81263280000019" x="242.08440000000002" y="17.63278699999995">HSUBPD xmm1, xmm2/m128</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.1993722000000275pt; fill: #000" textLength="21.162733400000036" x="429.88772079" y="37.56711779999995">xmm2</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.1993722000000275pt; fill: #000" textLength="28.097765799999962" x="213.8376" y="42.23208699999992">[127:64]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.1993722000000275pt; fill: #000" textLength="19.452299400000072" x="349.36170000000004" y="42.23208699999992">[63:0]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.1993722000000275pt; fill: #000" textLength="21.605891300000053" x="429.88772079" y="46.89675779999993">/m128</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="21.162733400000036" x="429.88772079" y="89.24477123">xmm1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="28.097765799999962" x="213.8376" y="89.24518699999999">[127:64]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="19.452299400000072" x="349.36170000000004" y="89.24518699999999">[63:0]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="24.19486640000008" x="429.88796083" y="141.43286075">Result:</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="66.97126579999994" x="194.4007" y="141.43318699999998">xmm2/m128[63:0] -</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="96.78724030000029" x="310.69190000000003" y="146.097987">xmm1[63:0] - xmm1[127:64]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="21.162733400000036" x="429.88796083" y="150.76250075000002">xmm1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="70.86639049999997" x="192.457025" y="150.762827">xmm2/m128[127:64]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="28.097765799999962" x="213.84770711000002" y="169.07009773999997">[127:64]</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 7.199372199999999pt; fill: #000" textLength="19.452299400000072" x="353.74410396999997" y="169.07009773999997">[63:0]</text></g></svg>
<figcaption><a href='hsubpd.html#fig-3-21'>Figure 3-21</a>. HSUBPD—Packed Double Precision Floating-Point Horizontal Subtract</figcaption></figure>
<figure id="fig-3-22">
<svg style="width: 381.0220230000001pt; height: 97.77604800000003pt" viewBox="139.58164749999997 0.0 322.5183525000001 86.48004000000003">
<g xmlns="http://www.w3.org/2000/svg" style="stroke: none; fill: none">
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.36" y="67.50006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.12" y="81.00006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="162.12" y="67.50004000000001"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="236.58" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.58" y="67.50006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.34" y="81.00006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="67.50004000000001"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="310.86" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.86" y="67.50006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.62" y="81.00006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="67.50004000000001"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.22" x="385.14" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="385.14" y="67.50006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.47998" x="459.12" y="67.74004000000002"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="384.90000000000003" y="81.00006000000008"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="67.50004000000001"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.22" x="162.36" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.36" y="0.0"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.12" y="13.5"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="162.12" y="4.0000000012696546e-05"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="236.58" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.58" y="0.0"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.34" y="13.5"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="4.0000000012696546e-05"></rect>
<path d="M 263.94 58.200039999999944 L 264.06 57.84003999999993 L 264.12 57.60003999999992 L 264.12 57.42003999999997 L 264.06 57.24003999999991 L 264.0 57.06003999999996 L 263.7 56.76003999999989 L 263.52 56.700039999999944 C 263.129 56.56903999999997 263.004 56.46903999999995 262.62 56.76003999999989L 262.44 56.880039999999894 L 262.32 57.0000399999999 L 262.2 57.18003999999996 C 261.899 58.13803999999993 262.695 58.89303999999993 263.64 58.440039999999954L 263.76 58.32003999999995 L 263.94 58.200039999999944" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 263.16 57.600040000000035 L 265.68 54.12004000000002 L 266.1 53.64004 L 266.46000000000004 54.12004000000002 L 276.06 66.42004000000009 L 277.14000000000004 67.80004000000008 L 275.52000000000004 67.20004000000006 L 260.88000000000005 61.860040000000026 L 260.22 61.62004000000002 L 260.64000000000004 61.080040000000054 L 261.18 60.90003999999999 L 275.82000000000005 66.24004000000002 L 275.52000000000004 67.20004000000006 L 275.28000000000003 67.02004 L 265.68 54.72004000000004 L 266.46000000000004 54.12004000000002 L 266.46000000000004 54.72004000000004 L 263.94 58.20004000000006" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 260.64 61.08003999999994 L 263.15999999999997 57.60003999999992 L 263.94 58.200039999999944 L 261.41999999999996 61.68003999999996" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 263.52 57.90003999999999 L 266.03999999999996 54.42003999999997 L 275.64 66.72004000000004 L 261.0 61.38004000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 203.46 12.960039999999935 L 202.32000000000002 14.58003999999994 L 262.56 58.440039999999954 L 263.7 56.82003999999995" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="310.86" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.86" y="0.0"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.62" y="13.5"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="4.0000000012696546e-05"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.22" x="385.14" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="385.14" y="0.0"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.47998" x="459.12" y="0.2400400000000218"></rect>
<rect height="0.48004" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="384.90000000000003" y="13.5"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="4.0000000012696546e-05"></rect>
<path d="M 425.64 51.48004000000003 L 425.82 51.420040000000085 L 426.0 51.360040000000026 C 426.911 51.02204000000006 426.75 49.66704000000004 425.82 49.50004000000001L 425.64 49.44004000000007 L 425.4 49.50004000000001 C 424.46999999999997 49.66704000000004 424.30899999999997 51.02204000000006 425.21999999999997 51.360040000000026L 425.4 51.420040000000085 L 425.64 51.48004000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 425.64 50.460039999999935 L 430.56 50.460039999999935 L 430.38 51.120039999999904 L 426.12 66.1200399999999 L 425.64 67.80003999999997 L 425.15999999999997 66.1200399999999 L 420.84 51.120039999999904 L 420.65999999999997 50.460039999999935 L 421.32 50.460039999999935 L 421.8 50.82003999999995 L 426.12 65.82003999999995 L 425.15999999999997 66.1200399999999 L 425.15999999999997 65.82003999999995 L 429.41999999999996 50.82003999999995 L 430.38 51.120039999999904 L 429.9 51.48003999999992 L 425.64 51.48003999999992" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<rect height="1.02" style="fill: rgb(0%, 0%, 0%)" width="4.32" x="421.32" y="50.46004000000005"></rect>
<path d="M 425.64 50.940039999999954 L 429.9 50.940039999999954 L 425.64 65.94003999999995 L 421.32 50.940039999999954" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<rect height="36.72" style="fill: rgb(0%, 0%, 0%)" width="1.98" x="424.68" y="13.740039999999908"></rect>
<rect height="1.98" style="fill: rgb(0%, 0%, 0%)" width="74.22" x="202.86" y="39.780039999999985"></rect>
<rect height="1.98" style="fill: rgb(0%, 0%, 0%)" width="74.28" x="351.36" y="39.780039999999985"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.22" x="162.36" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.36" y="30.420060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="162.12" y="43.920060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="162.12" y="30.42003999999997"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="236.58" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.58" y="30.420060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="236.34" y="43.920060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48" x="236.34" y="30.42003999999997"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.28" x="310.86" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.86" y="30.420060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.52" x="310.62" y="43.920060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="310.62" y="30.42003999999997"></rect>
<rect height="13.5" style="fill: rgb(100%, 100%, 100%)" width="74.22" x="385.14" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="385.14" y="30.420060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.47998" x="459.12" y="30.66003999999998"></rect>
<rect height="0.47998" style="fill: rgb(0%, 0%, 0%)" width="74.46000000000001" x="384.90000000000003" y="43.920060000000035"></rect>
<rect height="13.74" style="fill: rgb(0%, 0%, 0%)" width="0.48001000000000005" x="384.90000000000003" y="30.42003999999997"></rect>
<path d="M 412.26 58.440039999999954 L 412.38 58.08003999999994 C 412.507 57.071039999999925 411.467 56.4710399999999 410.7 57.18003999999996L 410.58 57.30003999999997 L 410.52 57.48003999999992 L 410.46 57.66003999999998 L 410.4 57.90003999999999 L 410.4 58.08003999999994 L 410.46 58.260040000000004 L 410.58 58.440039999999954 L 410.82 58.68003999999996 L 411.0 58.80003999999997 L 411.18 58.86003999999991 L 411.59999999999997 58.86003999999991 L 411.78 58.80003999999997 L 411.96 58.74003999999991 L 412.26 58.440039999999954" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 411.42 57.90003999999999 L 413.88 54.360040000000026 L 414.3 53.82003999999995 L 414.72 54.360040000000026 L 424.56 66.42003999999997 L 425.64000000000004 67.80003999999997 L 424.02000000000004 67.20003999999994 L 409.26 62.16003999999998 L 408.6 61.92003999999997 L 408.96000000000004 61.38004000000001 L 409.56 61.200039999999944 L 424.32 66.24004000000002 L 424.02000000000004 67.20003999999994 L 423.78000000000003 67.02004 L 413.94 54.960039999999935 L 414.72 54.360040000000026 L 414.72 54.960039999999935 L 412.26 58.50004000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 408.96000000000004 61.38004000000001 L 411.42 57.90003999999999 L 412.26000000000005 58.50004000000001 L 409.8 61.98004000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 411.84000000000003 58.200039999999944 L 414.3 54.66003999999998 L 424.14000000000004 66.72003999999993 L 409.38000000000005 61.68003999999996" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 348.6 12.960039999999935 L 347.46000000000004 14.58003999999994 L 410.88 58.74003999999991 L 412.02000000000004 57.120039999999904" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 277.08 51.48004000000003 L 277.32 51.420040000000085 L 277.5 51.360040000000026 C 278.411 51.02204000000006 278.25 49.66704000000004 277.32 49.50004000000001L 277.08 49.44004000000007 L 276.9 49.50004000000001 C 275.96999999999997 49.66704000000004 275.80899999999997 51.02204000000006 276.71999999999997 51.360040000000026L 276.9 51.420040000000085 L 277.08 51.48004000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 277.08 50.460039999999935 L 282.06 50.460039999999935 L 281.88 51.120039999999904 L 277.56 66.1200399999999 L 277.08 67.80003999999997 L 276.59999999999997 66.1200399999999 L 272.34 51.120039999999904 L 272.15999999999997 50.460039999999935 L 272.82 50.460039999999935 L 273.3 50.82003999999995 L 277.56 65.82003999999995 L 276.59999999999997 66.1200399999999 L 276.59999999999997 65.82003999999995 L 280.91999999999996 50.82003999999995 L 281.88 51.120039999999904 L 281.4 51.48003999999992 L 277.08 51.48003999999992" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<rect height="1.02" style="fill: rgb(0%, 0%, 0%)" width="4.26" x="272.82" y="50.46004000000005"></rect>
<path d="M 277.08 50.940039999999954 L 281.4 50.940039999999954 L 277.08 65.94003999999995 L 272.82 50.940039999999954" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<rect height="36.72" style="fill: rgb(0%, 0%, 0%)" width="1.98" x="276.12" y="13.740039999999908"></rect>
<path d="M 199.5 51.48004000000003 L 199.68 51.420040000000085 L 199.86 51.360040000000026 C 200.771 51.02204000000006 200.61 49.66704000000004 199.68 49.50004000000001L 199.5 49.44004000000007 L 199.26 49.50004000000001 C 198.33 49.66704000000004 198.169 51.02204000000006 199.08 51.360040000000026L 199.26 51.420040000000085 L 199.5 51.48004000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 199.5 50.460039999999935 L 204.42 50.460039999999935 L 204.24 51.120039999999904 L 199.98 66.1200399999999 L 199.5 67.80003999999997 L 199.02 66.1200399999999 L 194.7 51.120039999999904 L 194.52 50.460039999999935 L 195.18 50.460039999999935 L 195.66 50.82003999999995 L 199.98 65.82003999999995 L 199.02 66.1200399999999 L 199.02 65.82003999999995 L 203.28 50.82003999999995 L 204.24 51.120039999999904 L 203.76 51.48003999999992 L 199.5 51.48003999999992" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<rect height="1.02" style="fill: rgb(0%, 0%, 0%)" width="4.32" x="195.18" y="50.46004000000005"></rect>
<path d="M 199.5 50.940039999999954 L 203.76 50.940039999999954 L 199.5 65.94003999999995 L 195.18 50.940039999999954" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<rect height="6.300000000000001" style="fill: rgb(0%, 0%, 0%)" width="1.98" x="198.54" y="44.16003999999998"></rect>
<path d="M 348.0 51.48004000000003 L 348.18 51.420040000000085 L 348.36 51.360040000000026 L 348.54 51.30004000000008 L 348.72 51.180040000000076 L 348.84 51.00004000000001 L 348.9 50.88004000000001 L 348.96 50.64004 L 348.96 50.280039999999985 C 348.826 49.891039999999975 348.831 49.68403999999998 348.36 49.56004000000007L 348.0 49.44004000000007 L 347.76 49.50004000000001 C 346.83 49.66704000000004 346.669 51.02204000000006 347.58 51.360040000000026L 347.76 51.420040000000085 L 348.0 51.48004000000003" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 348.0 50.460039999999935 L 352.92 50.460039999999935 L 352.74 51.120039999999904 L 348.48 66.1200399999999 L 348.0 67.80003999999997 L 347.52 66.1200399999999 L 343.2 51.120039999999904 L 343.02 50.460039999999935 L 343.68 50.460039999999935 L 344.16 50.82003999999995 L 348.48 65.82003999999995 L 347.52 66.1200399999999 L 347.52 65.82003999999995 L 351.78 50.82003999999995 L 352.74 51.120039999999904 L 352.26 51.48003999999992 L 348.0 51.48003999999992" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<rect height="1.02" style="fill: rgb(0%, 0%, 0%)" width="4.32" x="343.68" y="50.46004000000005"></rect>
<path d="M 348.0 50.940039999999954 L 352.26 50.940039999999954 L 348.0 65.94003999999995 L 343.68 50.940039999999954" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<rect height="6.300000000000001" style="fill: rgb(0%, 0%, 0%)" width="1.98" x="347.04" y="44.16003999999998"></rect>
<path d="M 214.92000000000002 62.64004 L 215.04000000000002 62.82003999999995 L 215.16000000000003 62.940039999999954 C 215.929 63.729040000000055 216.924 63.12504000000001 216.9 62.16003999999998L 216.84 61.98004000000003 L 216.78000000000003 61.80003999999997 C 216.324 60.951040000000035 214.907 61.24703999999997 214.92000000000002 62.22004000000004L 214.92000000000002 62.64004" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 215.88 62.280039999999985 L 217.26 66.36004000000003 L 217.38 67.02004 L 216.78 67.08003999999994 L 201.18 67.74004000000002 L 199.44 67.80003999999997 L 200.88 66.78003999999999 L 213.78 57.960039999999935 L 214.32 57.600040000000035 L 214.56 58.200039999999944 L 214.32 58.80003999999997 L 201.42 67.62004000000002 L 200.88 66.78003999999999 L 201.12 66.72004000000004 L 216.72 66.06003999999996 L 216.78 67.08003999999994 L 216.24 66.72004000000004 L 214.85999999999999 62.64004" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 214.56 58.200039999999944 L 215.88 62.280039999999985 L 214.86 62.64004 L 213.54 58.56003999999996" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 215.4 62.460039999999935 L 216.78 66.54003999999998 L 201.18 67.20003999999994 L 214.08 58.380039999999894" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 270.66 45.12004000000002 L 270.06 43.260040000000004 L 215.58000000000004 61.38004000000001 L 216.18 63.24004000000002" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 366.72 62.40003999999999 L 366.84000000000003 62.58003999999994 L 366.96000000000004 62.700039999999944 C 367.56100000000004 63.48303999999996 368.79200000000003 62.873039999999946 368.70000000000005 61.92003999999997L 368.64000000000004 61.74004000000002 L 368.58000000000004 61.56003999999996 C 368.101 60.73303999999996 366.71500000000003 60.99404000000004 366.72 61.98004000000003L 366.72 62.40003999999999" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 367.68 62.040039999999976 L 369.12 66.12004000000002 L 369.24 66.78003999999999 L 368.64 66.84003999999993 L 353.1 67.68003999999996 L 351.36 67.74004000000002 L 352.8 66.72003999999993 L 365.52 57.720039999999926 L 366.06 57.360040000000026 L 366.3 57.960039999999935 L 366.12 58.56003999999996 L 353.4 67.56003999999996 L 352.8 66.72003999999993 L 353.04 66.66003999999998 L 368.58 65.82003999999995 L 368.64 66.84003999999993 L 368.16 66.48004000000003 L 366.72 62.40003999999999" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 366.3 57.960039999999935 L 367.68 62.040039999999976 L 366.72 62.40003999999999 L 365.28000000000003 58.32003999999995" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<path d="M 367.20000000000005 62.22004000000004 L 368.64000000000004 66.30004000000008 L 353.1 67.14004 L 365.82000000000005 58.14004" style="fill: rgb(0%, 0%, 0%); fill-rule: evenodd"></path>
<path d="M 419.22 45.12004000000002 L 418.56 43.260040000000004 L 367.38 61.14004 L 368.04 63.00004000000001" style="fill: rgb(0%, 0%, 0%); fill-rule: nonzero"></path>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.17216670000002" x="198.18" y="10.350937799999997">X3</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.232485099999963" x="272.46" y="10.350937799999997">X2</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.172166699999991" x="346.68" y="10.350937799999997">X1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.172166699999991" x="420.96000000000004" y="10.350937799999997">X0</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="20.0294787" x="142.38035447999997" y="12.03080523999995">SRC1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.17216670000002" x="198.18" y="40.71093780000001">Y3</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.232485099999963" x="272.46" y="40.71093780000001">Y2</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.172166699999991" x="346.68" y="40.71093780000001">Y1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="9.172166699999991" x="420.96000000000004" y="40.71093780000001">Y0</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="20.028724720000014" x="142.08164749999997" y="42.39080523999996">SRC2</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="68.81013690000003" x="142.08175882" y="77.91093779999994">DEST Y2 - Y3</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="25.010270579999997" x="260.22" y="77.91093779999994">X2 - X3</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="24.891895720000036" x="334.5" y="77.91093779999994">Y0 - Y1</text>
<text lengthAdjust="spacingAndGlyphs" style="font-size: 8.414416800000026pt; fill: #000" textLength="25.010270579999997" x="408.72" y="77.91093779999994">X0 - X1</text></g></svg>
<figcaption><a href='hsubpd.html#fig-3-22'>Figure 3-22</a>. VHSUBPD operation</figcaption></figure>
<p>128-bit Legacy SSE version: The second source can be an XMM register or an 128-bit memory location. The destination is not distinct from the first source XMM register and the upper bits (MAXVL-1:128) of the corresponding YMM register destination are unmodified.</p>
<p>VEX.128 encoded version: the first source operand is an XMM register or 128-bit memory location. The destination operand is an XMM register. The upper bits (MAXVL-1:128) of the corresponding YMM register destination are zeroed.</p>
<p>VEX.256 encoded version: The first source operand is a YMM register. The second source operand can be a YMM register or a 256-bit memory location. The destination operand is a YMM register.</p>
<h2 id="operation">Operation<a class="anchor" href="#operation">
</a></h2>
<h3 id="hsubpd--128-bit-legacy-sse-version-">HSUBPD (128-bit Legacy SSE Version)<a class="anchor" href="#hsubpd--128-bit-legacy-sse-version-">
</a></h3>
<pre>DEST[63:0] := SRC1[63:0] - SRC1[127:64]
DEST[127:64] := SRC2[63:0] - SRC2[127:64]
DEST[MAXVL-1:128] (Unmodified)
</pre>
<h3 id="vhsubpd--vex-128-encoded-version-">VHSUBPD (VEX.128 Encoded Version)<a class="anchor" href="#vhsubpd--vex-128-encoded-version-">
</a></h3>
<pre>DEST[63:0] := SRC1[63:0] - SRC1[127:64]
DEST[127:64] := SRC2[63:0] - SRC2[127:64]
DEST[MAXVL-1:128] := 0
</pre>
<h3 id="vhsubpd--vex-256-encoded-version-">VHSUBPD (VEX.256 Encoded Version)<a class="anchor" href="#vhsubpd--vex-256-encoded-version-">
</a></h3>
<pre>DEST[63:0] := SRC1[63:0] - SRC1[127:64]
DEST[127:64] := SRC2[63:0] - SRC2[127:64]
DEST[191:128] := SRC1[191:128] - SRC1[255:192]
DEST[255:192] := SRC2[191:128] - SRC2[255:192]
</pre>
<h2 id="intel-c-c++-compiler-intrinsic-equivalent">Intel C/C++ Compiler Intrinsic Equivalent<a class="anchor" href="#intel-c-c++-compiler-intrinsic-equivalent">
</a></h2>
<pre>HSUBPD __m128d _mm_hsub_pd(__m128d a, __m128d b)
</pre>
<pre>VHSUBPD __m256d _mm256_hsub_pd (__m256d a, __m256d b);
</pre>
<h2 class="exceptions" id="exceptions">Exceptions<a class="anchor" href="#exceptions">
</a></h2>
<p>When the source operand is a memory operand, the operand must be aligned on a 16-byte boundary or a general-protection exception (#GP) will be generated.</p>
<h2 class="exceptions" id="numeric-exceptions">Numeric Exceptions<a class="anchor" href="#numeric-exceptions">
</a></h2>
<p>Overflow, Underflow, Invalid, Precision, Denormal.</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-19</span>, “Type 2 Class Exception Conditions.”</p><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>