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

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

VGETMANTSS

Extract Float32 Vector of Normalized Mantissa from Float32 Vector

참고 사항

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

Opcode/
Instruction

Op/
En

64/32
bit Mode
Support

CPUID
Feature
Flag

Description

EVEX.NDS.LIG.66.0F3A.W0 27 /r ib
VGETMANTSS xmm1 {k1}{z} xmm2 xmm3/m32{sae} imm8

T1S

V/V

AVX512F

Extract the normalized mantissa from the low float32 element of xmm3/m32 using imm8 for sign control and mantissa interval normalization, store the mantissa to xmm1 under the writemask k1 and merge with the other elements of xmm2.

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

T1S

ModRM:reg (w)

EVEX.vvvv (r)

ModRM:r/m (r)

NA

Description

Convert the single-precision floating values in the low doubleword element of the second source operand (the third operand) to SP FP value with the mantissa normalization and sign control specified by the imm8 byte, see Figure 5-15. The converted result is written to the low doubleword element of the destination operand (the first operand) using writemask k1. Bits (127:32) of the XMM register destination are copied from corresponding bits in the first source operand. 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 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.

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.

The converted SP 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 zmm1. Elements in zmm1 with the corresponding bit clear in k1 retain their previous values.

Operation

VGETMANTSS (EVEX encoded version)

IF k1[0] OR *no writemask*
    THEN DEST[31:0] <-
                GetNormalizedMantissaSP(SRC2[31:0], sc, interv)
    ELSE 
          IF *merging-masking* ; merging-masking
                THEN *DEST[31:0] remains unchanged*
                ELSE  ; zeroing-masking
                      DEST[31:0] <-  0
          FI
FI;
DEST[127:32] <-  SRC1[127:64] 
DEST[MAX_VL-1:128] <-  0

Intel C/C++ Compiler Intrinsic Equivalent

VGETMANTSS __m128 _mm_getmant_ss(__m128 a, __m128 b, enum intv, enum sgn);
VGETMANTSS __m128 _mm_mask_getmant_ss(__m128 s, __mmask8 k, __m128 a, __m128 b,
                                      enum intv, enum sgn);
VGETMANTSS __m128 _mm_maskz_getmant_ss(__mmask8 k, __m128 a, __m128 b,
                                       enum intv, enum sgn);
VGETMANTSS __m128 _mm_getmant_round_ss(__m128 a, __m128 b, enum intv, enum sgn,
                                       int r);
VGETMANTSS __m128 _mm_mask_getmant_round_ss(__m128 s, __mmask8 k, __m128 a,
                                            __m128 b, enum intv, enum sgn,
                                            int r);
VGETMANTSS __m128 _mm_maskz_getmant_round_ss(__mmask8 k, __m128 a, __m128 b,
                                             enum intv, enum sgn, int r);

SIMD Floating-Point Exceptions

Denormal, Invalid

Other Exceptions

See Exceptions Type E3.

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

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