forked from NRZCode/ia32-64
210 lines
8.1 KiB
HTML
210 lines
8.1 KiB
HTML
<!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>VSCALEFPD
|
||
— Scale Packed Float64 Values With Float64 Values</title></head><body><header><nav><ul><li><a href='index.html'>Index</a></li><li>December 2023</li></ul></nav></header><h1>VSCALEFPD
|
||
— Scale Packed Float64 Values With Float64 Values</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>EVEX.128.66.0F38.W1 2C /r VSCALEFPD xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst</td>
|
||
<td>A</td>
|
||
<td>V/V</td>
|
||
<td>AVX512VL AVX512F</td>
|
||
<td>Scale the packed double precision floating-point values in xmm2 using values from xmm3/m128/m64bcst. Under writemask k1.</td></tr>
|
||
<tr>
|
||
<td>EVEX.256.66.0F38.W1 2C /r VSCALEFPD ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst</td>
|
||
<td>A</td>
|
||
<td>V/V</td>
|
||
<td>AVX512VL AVX512F</td>
|
||
<td>Scale the packed double precision floating-point values in ymm2 using values from ymm3/m256/m64bcst. Under writemask k1.</td></tr>
|
||
<tr>
|
||
<td>EVEX.512.66.0F38.W1 2C /r VSCALEFPD zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er}</td>
|
||
<td>A</td>
|
||
<td>V/V</td>
|
||
<td>AVX512F</td>
|
||
<td>Scale the packed double precision floating-point values in zmm2 using values from zmm3/m512/m64bcst. Under writemask k1.</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>Tuple Type</th>
|
||
<th>Operand 1</th>
|
||
<th>Operand 2</th>
|
||
<th>Operand 3</th>
|
||
<th>Operand 4</th></tr>
|
||
<tr>
|
||
<td>A</td>
|
||
<td>Full</td>
|
||
<td>ModRM:reg (w)</td>
|
||
<td>EVEX.vvvv (r)</td>
|
||
<td>ModRM:r/m (r)</td>
|
||
<td>N/A</td></tr></table>
|
||
<h3 id="description">Description<a class="anchor" href="#description">
|
||
¶
|
||
</a></h3>
|
||
<p>Performs a floating-point scale of the packed double precision floating-point values in the first source operand by multiplying them by 2 to the power of the double precision floating-point values in second source operand.</p>
|
||
<p>The equation of this operation is given by:</p>
|
||
<p>zmm1 := zmm2*2<sup>floor(zmm3)</sup>.</p>
|
||
<p>Floor(zmm3) means maximum integer value ≤ zmm3.</p>
|
||
<p>If the result cannot be represented in double precision, then the proper overflow response (for positive scaling operand), or the proper underflow response (for negative scaling operand) is issued. The overflow and underflow responses are dependent on the rounding mode (for IEEE-compliant rounding), as well as on other settings in MXCSR (exception mask bits, FTZ bit), and on the SAE bit.</p>
|
||
<p>The first source operand is a ZMM/YMM/XMM register. The second source operand is a ZMM/YMM/XMM register, a 512/256/128-bit memory location or a 512/256/128-bit vector broadcasted from a 64-bit memory location. The destination operand is a ZMM/YMM/XMM register conditionally updated with writemask k1.</p>
|
||
<p>Handling of special-case input values are listed in <a href='vscalefpd.html#tbl-5-39'>Table 5-39</a> and <a href='vscalefpd.html#tbl-5-40'>Table 5-40</a>.</p>
|
||
<figure id="tbl-5-39">
|
||
<table>
|
||
<tr>
|
||
<th></th>
|
||
<th></th>
|
||
<th colspan="4">Src2</th>
|
||
<th>Set IE</th></tr>
|
||
<tr>
|
||
<th></th>
|
||
<th></th>
|
||
<th>±NaN</th>
|
||
<th>+Inf</th>
|
||
<th>-Inf</th>
|
||
<th>0/Denorm/Norm</th>
|
||
<th></th></tr>
|
||
<tr>
|
||
<td><strong>Src1</strong></td>
|
||
<td>±QNaN</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>+INF</td>
|
||
<td>+0</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>IF either source is SNAN</td></tr>
|
||
<tr>
|
||
<td></td>
|
||
<td>±SNaN</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>QNaN(Src1)</td>
|
||
<td>YES</td></tr>
|
||
<tr>
|
||
<td></td>
|
||
<td>±Inf</td>
|
||
<td>QNaN(Src2)</td>
|
||
<td>Src1</td>
|
||
<td>QNaN_Indefinite</td>
|
||
<td>Src1</td>
|
||
<td>IF Src2 is SNAN or -INF</td></tr>
|
||
<tr>
|
||
<td></td>
|
||
<td>±0</td>
|
||
<td>QNaN(Src2)</td>
|
||
<td>QNaN_Indefinite</td>
|
||
<td>Src1</td>
|
||
<td>Src1</td>
|
||
<td>IF Src2 is SNAN or +INF</td></tr>
|
||
<tr>
|
||
<td></td>
|
||
<td>Denorm/Norm</td>
|
||
<td>QNaN(Src2)</td>
|
||
<td>±INF (Src1 sign)</td>
|
||
<td>±0 (Src1 sign)</td>
|
||
<td>Compute Result</td>
|
||
<td>IF Src2 is SNAN</td></tr></table>
|
||
<figcaption><a href='vscalefpd.html#tbl-5-39'>Table 5-39</a>. VSCALEFPD/SD/PS/SS Special Cases</figcaption></figure>
|
||
<figure id="tbl-5-40">
|
||
<table>
|
||
<tr>
|
||
<th>Special Case</th>
|
||
<th>Returned value</th>
|
||
<th>Faults</th></tr>
|
||
<tr>
|
||
<td>|result| < 2<sup>-1074</sup></td>
|
||
<td>±0 or ±Min-Denormal (Src1 sign)</td>
|
||
<td>Underflow</td></tr>
|
||
<tr>
|
||
<td>|result| ≥ 2<sup>1024</sup></td>
|
||
<td>±INF (Src1 sign) or ±Max-normal (Src1 sign)</td>
|
||
<td>Overflow</td></tr></table>
|
||
<figcaption><a href='vscalefpd.html#tbl-5-40'>Table 5-40</a>. Additional VSCALEFPD/SD Special Cases</figcaption></figure>
|
||
<h3 id="operation">Operation<a class="anchor" href="#operation">
|
||
¶
|
||
</a></h3>
|
||
<pre>SCALE(SRC1, SRC2)
|
||
{
|
||
TMP_SRC2 := SRC2
|
||
TMP_SRC1 := SRC1
|
||
IF (SRC2 is denormal AND MXCSR.DAZ) THEN TMP_SRC2=0
|
||
IF (SRC1 is denormal AND MXCSR.DAZ) THEN TMP_SRC1=0
|
||
/* SRC2 is a 64 bits floating-point value */
|
||
DEST[63:0] := TMP_SRC1[63:0] * POW(2, Floor(TMP_SRC2[63:0]))
|
||
}
|
||
</pre>
|
||
<h4 id="vscalefpd--evex-encoded-versions-">VSCALEFPD (EVEX encoded versions)<a class="anchor" href="#vscalefpd--evex-encoded-versions-">
|
||
¶
|
||
</a></h4>
|
||
<pre>(KL, VL) = (2, 128), (4, 256), (8, 512)
|
||
IF (VL = 512) AND (EVEX.b = 1) AND (SRC2 *is register*)
|
||
THEN
|
||
SET_ROUNDING_MODE_FOR_THIS_INSTRUCTION(EVEX.RC);
|
||
ELSE
|
||
SET_ROUNDING_MODE_FOR_THIS_INSTRUCTION(MXCSR.RC);
|
||
FI;
|
||
FOR j := 0 TO KL-1
|
||
i := j * 64
|
||
IF k1[j] OR *no writemask* THEN
|
||
IF (EVEX.b = 1) AND (SRC2 *is memory*)
|
||
THEN DEST[i+63:i] := SCALE(SRC1[i+63:i], SRC2[63:0]);
|
||
ELSE DEST[i+63:i] := SCALE(SRC1[i+63:i], SRC2[i+63:i]);
|
||
FI;
|
||
ELSE
|
||
IF *merging-masking* ; merging-masking
|
||
THEN *DEST[i+63:i] remains unchanged*
|
||
ELSE
|
||
; zeroing-masking
|
||
DEST[i+63:i] := 0
|
||
FI
|
||
FI;
|
||
ENDFOR
|
||
DEST[MAXVL-1:VL] := 0
|
||
</pre>
|
||
<h3 id="intel-c-c++-compiler-intrinsic-equivalent">Intel C/C++ Compiler Intrinsic Equivalent<a class="anchor" href="#intel-c-c++-compiler-intrinsic-equivalent">
|
||
¶
|
||
</a></h3>
|
||
<pre>VSCALEFPD __m512d _mm512_scalef_round_pd(__m512d a, __m512d b, int rounding);
|
||
</pre>
|
||
<pre>VSCALEFPD __m512d _mm512_mask_scalef_round_pd(__m512d s, __mmask8 k, __m512d a, __m512d b, int rounding);
|
||
</pre>
|
||
<pre>VSCALEFPD __m512d _mm512_maskz_scalef_round_pd(__mmask8 k, __m512d a, __m512d b, int rounding);
|
||
</pre>
|
||
<pre>VSCALEFPD __m512d _mm512_scalef_pd(__m512d a, __m512d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m512d _mm512_mask_scalef_pd(__m512d s, __mmask8 k, __m512d a, __m512d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m512d _mm512_maskz_scalef_pd(__mmask8 k, __m512d a, __m512d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m256d _mm256_scalef_pd(__m256d a, __m256d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m256d _mm256_mask_scalef_pd(__m256d s, __mmask8 k, __m256d a, __m256d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m256d _mm256_maskz_scalef_pd(__mmask8 k, __m256d a, __m256d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m128d _mm_scalef_pd(__m128d a, __m128d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m128d _mm_mask_scalef_pd(__m128d s, __mmask8 k, __m128d a, __m128d b);
|
||
</pre>
|
||
<pre>VSCALEFPD __m128d _mm_maskz_scalef_pd(__mmask8 k, __m128d a, __m128d b);
|
||
</pre>
|
||
<h3 class="exceptions" id="simd-floating-point-exceptions">SIMD Floating-Point Exceptions<a class="anchor" href="#simd-floating-point-exceptions">
|
||
¶
|
||
</a></h3>
|
||
<p>Overflow, Underflow, Invalid, Precision, Denormal (for Src1).</p>
|
||
<p>Denormal is not reported for Src2.</p>
|
||
<h3 class="exceptions" id="other-exceptions">Other Exceptions<a class="anchor" href="#other-exceptions">
|
||
¶
|
||
</a></h3>
|
||
<p>See <span class="not-imported">Table 2-46</span>, “Type E2 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 Developer’s Manual</a> for anything serious.
|
||
</p></footer></body></html>
|