<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../style/style.css" />
<title>SUBPS: Subtract Packed Single-Precision Floating-Point Values (x86 Instruction Set Reference)</title>
</head>
<body>
<div class="main_container"><h1>x86 Instruction Set Reference</h1>
<title>SUBPS: Subtract Packed Single-Precision Floating-Point Values (x86 Instruction Set Reference)</title>
<h1>SUBPS</h1>
<h2>Subtract Packed Single-Precision Floating-Point Values</h2>
<object>
<table class="box">
<tr>
<th>Opcode</th>
<th>Mnemonic</th>
<th>Description</th>
</tr>
<tr>
<td class="grid"><code>0F 5C /r</code></td>
<td class="grid"><code>SUBPS xmm1 xmm2/m128</code></td>
<td class="grid">Subtract packed single-precision floating-point values in xmm2/mem from xmm1.</td>
</tr>
</table>
</object>
<object>
<table class="box">
<tr>
<th>Description</th>
</tr>
<tr>
<td class="instruction_set_reference_box">
<p>Performs an SIMD subtract of the four packed single-precision floating-point values in the source operand (second operand) from the four packed single-precision floating-point values in the destination operand (first operand), and stores the packed single-precision floating-point results in the destination operand. The source operand can be an XMM register or a 128-bit memory location. The destination operand is an XMM register. See Figure 10-5 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1 for an illustration of an SIMD double-precision floating-point operation.</p>
</td>
</tr>
</table>
</object>
<object>
<table class="box">
<tr>
<th>Operation</th>
</tr>
<tr>
<td class="instruction_set_reference_box">
<pre>Destination<span class="operator">[</span><span class="number">0..31</span><span class="operator">]</span> <span class="operator">=</span> Destination<span class="operator">[</span><span class="number">0..31</span><span class="operator">]</span> <span class="operator">-</span> Source<span class="operator">[</span><span class="number">0..31</span><span class="operator">]</span><span class="operator">;</span>
Destination<span class="operator">[</span><span class="number">32..63</span><span class="operator">]</span> <span class="operator">=</span> Destination<span class="operator">[</span><span class="number">32..63</span><span class="operator">]</span> <span class="operator">-</span> Source<span class="operator">[</span><span class="number">32..63</span><span class="operator">]</span><span class="operator">;</span>
Destination<span class="operator">[</span><span class="number">64..95</span><span class="operator">]</span> <span class="operator">=</span> Destination<span class="operator">[</span><span class="number">64..95</span><span class="operator">]</span> <span class="operator">-</span> Source<span class="operator">[</span><span class="number">64..95</span><span class="operator">]</span><span class="operator">;</span>
Destination<span class="operator">[</span><span class="number">96..127</span><span class="operator">]</span> <span class="operator">=</span> Destination<span class="operator">[</span><span class="number">96..127</span><span class="operator">]</span> <span class="operator">-</span> Source<span class="operator">[</span><span class="number">96..127</span><span class="operator">]</span><span class="operator">;</span>
</pre>
</td>
</tr>
</table>
</object>
<object>
<table class="box">
<tr>
<th>Instruction</th>
<th>Latency</th>
<th>Throughput</th>
<th>Execution Unit</th>
</tr>
<tr><td class="grid"><code>CPUID</code></td><td class="grid">0F3n/0F2n/069n</td><td class="grid">0F3n/0F2n/069n</td><td class="grid">0F2n</td></tr>
<tr><td class="grid"><code>SUBPS xmm, xmm</code></td><td class="grid">5/4/4</td><td class="grid">2/2/2</td><td class="grid">FP_ADD</td></tr>
</table>
</object>
</div>
</body>
</html>