모두의 코드
VGETMANTPD (Intel x86/64 assembly instruction)

작성일 : 2020-09-01 이 글은 561 번 읽혔습니다.

VGETMANTPD

Extract Float64 Vector of Normalized Mantissas from Float64 Vector

참고 사항

아래 표를 해석하는 방법은 x86-64 명령어 레퍼런스 읽는 법 글을 참조하시기 바랍니다.

Opcode/
Instruction

Op/
En

64/32
bit Mode
Support

CPUID
Feature
Flag

Description

EVEX.128.66.0F3A.W1 26 /r ib
VGETMANTPD xmm1 {k1}{z} xmm2/m128/m64bcst imm8

FV

V/V

AVX512VL
AVX512F

Get Normalized Mantissa from float64 vector xmm2/m128/m64bcst and store the result in xmm1, using imm8 for sign control and mantissa interval normalization, under writemask.

EVEX.256.66.0F3A.W1 26 /r ib
VGETMANTPD ymm1 {k1}{z} ymm2/m256/m64bcst imm8

FV

V/V

AVX512VL
AVX512F

Get Normalized Mantissa from float64 vector ymm2/m256/m64bcst and store the result in ymm1, using imm8 for sign control and mantissa interval normalization, under writemask.

EVEX.512.66.0F3A.W1 26 /r ib
VGETMANTPD zmm1 {k1}{z} zmm2/m512/m64bcst{sae} imm8

FV

V/V

AVX512F

Get Normalized Mantissa from float64 vector zmm2/m512/m64bcst and store the result in zmm1, using imm8 for sign control and mantissa interval normalization, under writemask.

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

FVI

ModRM:reg (w)

ModRM:r/m (r)

Imm8

NA

Description

Convert double-precision floating values in the source operand (the second operand) to DP FP values with the mantissa normalization and sign control specified by the imm8 byte, see Figure 5-15. The converted results are written to the destination operand (the first operand) using writemask k1. The normalized mantissa is specified by interv (imm8[1:0]) and the sign control (sc) is specified by bits 3:2 of the immediate byte.

The destination operand is a ZMM/YMM/XMM register updated under the writemask. The source operand can be 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.

For each input DP FP value x, The conversion operation is:

GetMant(x) = $\pm$2k|x.significand|

where:

1 <= |x.significand| < 2

Unbiased exponent k depends on the interval range defined by interv and whether the exponent of the source is even or odd. The sign of the final result is determined by sc and the source sign.

8 m / 3 , 4 [ i l a v I 1 1 ] 0 : 1 [ 8 m m I ) 1 2 / 1 [ s a r t I : b 0 1 0 : 1 m 2 , / 1 [ s l e I : b 0 = ] l 0 1 [ 8 m [ i v r : b 0 0 ] : 1 [ 8 m m . ] [ 8 s s e l d r g , = a ! [ b i e f 0 m e I S i : i m C I e r = N o = e = r ) n I m S n o Z 2 s e I o 0 l n I q , m n i 3 1 o , 1 a 2 o 2 i t B z ) t i 4 n ( 6 v r / n 1 r I a a m r a n 2 b : 1 m a ] 8 i m C M = s 0 n 2 m m 2 s R a u ) l n v m 3 5 m e o : 0 l 2 f I s g e t 0 n ) e ) n g t i r s I I i [ S 7 3 i = t v t 8 3 : ] 0 b : n S R C i g n C t r ( ) 8 [ 3 : m ] 1 0 8 [ ] N = : _ b d i t e f i (
Figure 5-15. Imm8 Controls for VGETMANTPD/SD/PS/SS

If interv != 0 then k = -1, otherwise K = 0. The encoded value of imm8[1:0] and sign control are shown in

Figure 5-15.

Each converted DP FP result is encoded according to the sign control, the unbiased exponent k (adding bias) and a mantissa normalized to the range specified by interv.

The GetMant() function follows Table 5-9 when dealing with floating-point special numbers.

This instruction is writemasked, so only those elements with the corresponding bit set in vector mask register k1 are computed and stored into the destination. Elements in zmm1 with the corresponding bit clear in k1 retain their previous values.

Note: EVEX.vvvv is reserved and must be 1111b; otherwise instructions will #UD.

Table 5-9. GetMant() Special Float Values Behavior

Input

Result

Exceptions / Comments

NaN

QNaN(SRC)

Ignore intervIf (SRC = SNaN) then #IE

+'

1.0

Ignore interv

+0

1.0

Ignore interv

-0

IF (SC[0]) THEN +1.0 ELSE -1.0

Ignore interv

-'

IF (SC[1]) THEN {QNaN_Indefinite} ELSE { IF (SC[0]) THEN +1.0 ELSE -1.0

Ignore intervIf (SC[1]) then #IE

negative

SC[1] ? QNaN_Indefinite : Getmant(SRC)

If (SC[1]) then #IE

Operation

VGETMANTPD (EVEX encoded versions)

(KL, VL) = (2, 128), (4, 256), (8, 512)
FOR j <-  0 TO KL-1
    i <-  j * 64
    IF k1[j] OR *no writemask*
          THEN 
                IF (EVEX.b = 1) AND (SRC *is memory*)
                      THEN
                            DEST[i+63:i] !=<- GetNormalizedMantissaDP(SRC[63:0], sc, interv)
                      ELSE 
                            DEST[i+63:i] !=<- GetNormalizedMantissaDP(SRC[i+63:i], sc, interv)
                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[MAX_VL-1:VL] <-  0

Intel C/C++ Compiler Intrinsic Equivalent

VGETMANTPD __m512d _mm512_getmant_pd(__m512d a, enum intv, enum sgn);
VGETMANTPD __m512d _mm512_mask_getmant_pd(__m512d s, __mmask8 k, __m512d a,
                                          enum intv, enum sgn);
VGETMANTPD __m512d _mm512_maskz_getmant_pd(__mmask8 k, __m512d a, enum intv,
                                           enum sgn);
VGETMANTPD __m512d _mm512_getmant_round_pd(__m512d a, enum intv, enum sgn,
                                           int r);
VGETMANTPD __m512d _mm512_mask_getmant_round_pd(__m512d s, __mmask8 k,
                                                __m512d a, enum intv, enum sgn,
                                                int r);
VGETMANTPD __m512d _mm512_maskz_getmant_round_pd(__mmask8 k, __m512d a,
                                                 enum intv, enum sgn, int r);
VGETMANTPD __m256d _mm256_getmant_pd(__m256d a, enum intv, enum sgn);
VGETMANTPD __m256d _mm256_mask_getmant_pd(__m256d s, __mmask8 k, __m256d a,
                                          enum intv, enum sgn);
VGETMANTPD __m256d _mm256_maskz_getmant_pd(__mmask8 k, __m256d a, enum intv,
                                           enum sgn);
VGETMANTPD __m128d _mm_getmant_pd(__m128d a, enum intv, enum sgn);
VGETMANTPD __m128d _mm_mask_getmant_pd(__m128d s, __mmask8 k, __m128d a,
                                       enum intv, enum sgn);
VGETMANTPD __m128d _mm_maskz_getmant_pd(__mmask8 k, __m128d a, enum intv,
                                        enum sgn);

SIMD Floating-Point Exceptions

Denormal, Invalid

Other Exceptions

See Exceptions Type E2.

#UD If EVEX.vvvv != 1111B.

첫 댓글을 달아주세요!
프로필 사진 없음
강좌에 관련 없이 궁금한 내용은 여기를 사용해주세요

    댓글을 불러오는 중입니다..