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

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

VFIXUPIMMPS

Fix Up Special Packed Float32 Values

참고 사항

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

Opcode/
Instruction

Op /
En

64/32
bit Mode
Support

CPUID
Feature
Flag

Description

EVEX.NDS.128.66.0F3A.W0 54 /r
VFIXUPIMMPS xmm1 {k1}{z} xmm2 xmm3/m128/m32bcst imm8

FV

V/V

AVX512VL
AVX512F

Fix up special numbers in float32 vector xmm1, float32 vector xmm2 and int32 vector xmm3/m128/m32bcst and store the result in xmm1, under writemask.

EVEX.NDS.256.66.0F3A.W0 54 /r
VFIXUPIMMPS ymm1 {k1}{z} ymm2 ymm3/m256/m32bcst imm8

FV

V/V

AVX512VL
AVX512F

Fix up special numbers in float32 vector ymm1, float32 vector ymm2 and int32 vector ymm3/m256/m32bcst and store the result in ymm1, under writemask.

EVEX.NDS.512.66.0F3A.W0 54 /r ib
VFIXUPIMMPS zmm1 {k1}{z} zmm2 zmm3/m512/m32bcst{sae} imm8

FV

V/V

AVX512F

Fix up elements of float32 vector in zmm2 using int32 vector table in zmm3/m512/m32bcst, combine with preserved elements from zmm1, and store the result in zmm1.

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

FV

ModRM:reg (r, w)

EVEX.vvvv

ModRM:r/m (r)

Imm8

Description

Perform fix-up of doubleword elements encoded in single-precision floating-point format in the first source operand (the second operand) using a 32-bit, two-level look-up table specified in the corresponding doubleword element of the second source operand (the third operand) with exception reporting specifier imm8. The elements that are fixed-up are selected by mask bits of 1 specified in the opmask k1. Mask bits of 0 in the opmask k1 or table response action of 0000b preserves the corresponding element of the first operand. The fixed-up elements from the first source operand and the preserved element in the first operand are combined as the final results in the destination operand (the first operand).

The destination and the first source operands are ZMM/YMM/XMM registers. The second 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.

The two-level look-up table perform a fix-up of each SP FP input data in the first source operand by decoding the input data encoding into 8 token types. A response table is defined for each token type that converts the input encoding in the first source operand with one of 16 response actions.

This instruction is specifically intended for use in fixing up the results of arithmetic calculations involving one source so that they match the spec, although it is generally useful for fixing up the results of multiple-instruction sequences to reflect special-number inputs. For example, consider rcp(0). Input 0 to rcp, and you should get INF according to the DX10 spec. However, evaluating rcp via Newton-Raphson, where x=approx(1/0), yields an incor-rect result. To deal with this, VFIXUPIMMPS can be used after the N-R reciprocal sequence to set the result to the correct value (i.e. INF when the input is 0).

If MXCSR.DAZ is not set, denormal input elements in the first source operand are considered as normal inputs and do not trigger any fixup nor fault reporting.

Imm8 is used to set the required flags reporting. It supports #ZE and #IE fault reporting (see details below).

MXCSR.DAZ is used and refer to zmm2 only (i.e. zmm1 is not considered as zero in case MXCSR.DAZ is set).

MXCSR mask bits are ignored and are treated as if all mask bits are set to masked response). If any of the imm8 bits is set and the condition met for fault reporting, MXCSR.IE or MXCSR.ZE might be updated.

Operation

VFIXUPIMMPS (EVEX)

(KL, VL) = (4, 128), (8, 256), (16, 512)
FOR j <-  0 TO KL-1
    i <-  j * 32
    IF k1[j] OR *no writemask*
          THEN 
                IF (EVEX.b = 1) AND (SRC2 *is memory*)
                      THEN
                            DEST[i+31:i] <-  FIXUPIMM_SP(DEST[i+31:i], SRC1[i+31:i], SRC2[31:0], imm8 [7:0])
                      ELSE 
                            DEST[i+31:i] <-  FIXUPIMM_SP(DEST[i+31:i], SRC1[i+31:i], SRC2[i+31:i], imm8 [7:0])
                FI;
          ELSE 
                IF *merging-masking* ; merging-masking
                      THEN *DEST[i+31:i] remains unchanged*
                      ELSE  DEST[i+31:i] <-  0 ; zeroing-masking
                FI
    FI;
ENDFOR
DEST[MAX_VL-1:VL] <-  0
Immediate Control Description:

`embed <figure> <svg viewBox="0 0 396.480042 223.399994"> <rect x="0.000000" y="10.000000" width="0.480000" height="196.199997" fill-rule="nonzero" fill=" rgb(0,0,0) " stroke="black" /> <rect x="396.000000" y="10.000000" width="0.480040" height="196.199997" fill-rule="nonzero" fill=" rgb(0,0,0) " stroke="black" /> <rect x="0.000000" y="9.520020" width="396.480011" height="0.479980" fill-rule="nonzero" fill=" rgb(0,0,0) " stroke="black" /> <rect x="0.000000" y="206.260010" width="396.480011" height="0.480010" fill-rule="nonzero" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,62.260010 L225.420013,62.260010 L225.420013,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M221.700012,53.979980 L225.420013,44.260010 L228.420013,53.979980 L221.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,80.260010 L242.700012,80.260010 L242.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M239.700012,53.979980 L242.700012,44.260010 L246.420013,53.979980 L239.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,98.260010 L260.700012,98.260010 L260.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M257.700012,53.979980 L260.700012,44.260010 L264.480011,53.979980 L257.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,116.260010 L278.700012,116.260010 L278.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M275.700012,53.979980 L278.700012,44.260010 L282.480011,53.979980 L275.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,134.260010 L296.700012,134.260010 L296.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M293.700012,53.979980 L296.700012,44.260010 L300.480011,53.979980 L293.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,152.260010 L314.700012,152.260010 L314.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M311.700012,53.979980 L314.700012,44.260010 L317.700012,53.979980 L311.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,169.479980 L332.700012,169.479980 L332.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M329.700012,53.979980 L332.700012,44.260010 L335.700012,53.979980 L329.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <path d="M144.420013,187.479980 L350.700012,187.479980 L350.700012,53.260010" stoke="black" stroke=" rgb(0,0,0) " fill="white" fill-opacity="0" /> <path d="M347.700012,53.979980 L350.700012,44.260010 L353.700012,53.979980 L347.700012,53.979980" fill-rule="evenodd" fill=" rgb(0,0,0) " stroke="black" /> <rect x="216.420013" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="216.420013" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="234.420013" y="26.260010" width="17.280001" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="234.420013" y="26.260010" width="17.280001" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="251.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="251.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="269.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="269.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="287.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="287.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="305.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="305.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="323.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="323.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="341.700012" y="26.260010" width="18.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(250,250,250) " stroke="black" /> <rect x="341.700012" y="26.260010" width="18.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="53.260010" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="53.260010" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="89.260010" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="89.260010" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="107.260010" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="107.260010" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="71.260010" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="71.260010" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="125.260010" width="108.000000" height="17.219999" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="125.260010" width="108.000000" height="17.219999" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="142.479980" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="142.479980" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="160.479980" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="160.479980" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <rect x="36.420006" y="178.479980" width="108.000000" height="18.000000" fill-rule="nonzero" fill=" rgb(255,255,255) " stroke="black" /> <rect x="36.420006" y="178.479980" width="108.000000" height="18.000000" stoke="black" fill=" rgb(0,0,0) " stroke="black" /> <text x="130.919128" y="191.260010" textLength="7.201860" font-size="8px">E</text> <text x="115.920052" y="191.260010" textLength="7.201860" font-size="8px">#</text> <text x="84.420311" y="191.260010" textLength="0.000000" font-size="8px"> </text> <text x="84.420311" y="191.260010" textLength="0.000000" font-size="8px">

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

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