Tuesday, 31 January 2017

Value Conversion Operations and Corresponding instruction

Conversion Operations

Visual Studio .NET 2003
Microsoft Specific
The conversions operations are listed in the Conversion Operations table followed by a description of each intrinsic with the most recent mnemonic naming convention. The alternate name is provided if you have used these intrinsics before.

Conversion Operations
Intrinsic name Corresponding instruction
_mm_cvtss_si32 CVTSS2SI
_mm_cvtps_pi32 CVTPS2PI
_mm_cvttss_si32 CVTTSS2SI
_mm_cvttps_pi32 CVTTPS2PI
_mm_cvtsi32_ss CVTSI2SS
_mm_cvtpi32_ps CVTTPS2PI
_mm_cvtpi16_ps Composite
_mm_cvtpu16_ps Composite
_mm_cvtpi8_ps Composite
_mm_cvtpu8_ps Composite
_mm_cvtpi32x2_ps Composite
_mm_cvtps_pi16 Composite
_mm_cvtps_pi8 Composite

For an explanation of the syntax used in code samples in this topic, see Floating-Point Intrinsics Using Streaming SIMD Extensions.
int _mm_cvtss_si32(__m128 a );

CVTSS2SI

Converts the lower single-precision, floating-point value of a to a 32-bit integer according to the current rounding mode.
r := (int)a0
__m64 _mm_cvtps_pi32(__m128 a );

CVTPS2PI

Converts the two lower single-precision, floating-point values of a to two 32-bit integers according to the current rounding mode, returning the integers in packed form.
r0 := (int)a0
r1 := (int)a1
int _mm_cvttss_si32(__m128 a );

CVTTSS2SI

Converts the lower single-precision, floating-point value of a to a 32-bit integer with truncation.
r := (int)a0
__m64 _mm_cvttps_pi32(__m128 a );

CVTTPS2PI

Converts the two lower single-precision, floating-point values of a to two 32-bit integer with truncation, returning the integers in packed form.
r0 := (int)a0
r1 := (int)a1
__m128 _mm_cvtsi32_ss(__m128 a , int b );

CVTSI2SS

Converts the 32-bit integer value b to an single-precision, floating-point value; the upper three single-precision, floating-point values are passed through from a.
r0 := (float)b
r1 := a1 ; r2 := a2 ; r3 := a3
__m128 _mm_cvtpi32_ps(__m128 a , __m64 b );

CVTPI2PS

Converts the two 32-bit integer values in packed form in b to two single-precision, floating-point values; the upper two single-precision, floating-point values are passed through from a.
r0 := (float)b0
r1 := (float)b1
r2 := a2
r3 := a3
__m128 _mm_cvtpi16_ps(__m64 a );

(composite)

Converts the four 16-bit signed integer values in a to four single-precision, floating-point values.
r0 := (float)a0
r1 := (float)a1
r2 := (float)a2
r3 := (float)a3
__m128 _mm_cvtpu16_ps(__m64 a );

(composite)

Converts the four 16-bit unsigned integer values in a to four single-precision, floating-point values.
r0 := (float)a0
r1 := (float)a1
r2 := (float)a2
r3 := (float)a3
__m128 _mm_cvtpi8_ps(__m64 a );

(composite)

Converts the lower four 8-bit signed integer values in a to four single-precision, floating-point values.
r0 := (float)a0
r1 := (float)a1
r2 := (float)a2
r3 := (float)a3
__m128 _mm_cvtpu8_ps(__m64 a );

(composite)

Converts the lower four 8-bit unsigned integer values in a to four single-precision, floating-point values.
r0 := (float)a0
r1 := (float)a1
r2 := (float)a2
r3 := (float)a3
__m128 _mm_cvtpi32x2_ps(__m64 a, __m64 b );

(composite)

Converts the two 32-bit signed integer values in a and the two 32-bit signed integer values in b to four single-precision, floating-point values.
r0 := (float)a0
r1 := (float)a1
r2 := (float)b0
r3 := (float)b1
__m64 _mm_cvtps_pi16( __m128 a );

(composite)

Converts the four single-precision, floating-point values in a to four signed 16-bit integer values.
r0 := (short)a0
r1 := (short)a1
r2 := (short)a2
r3 := (short)a3
__m64 _mm_cvtps_pi8( __m128 a );

(composite)

Converts the four single-precision, floating-point values in a to the lower four signed 8-bit integer values of the result.
r0 := (char)a0
r1 := (char)a1
r2 := (char)a2
r3 := (char)a3 
 
 
END Microsoft Specific

No comments:

Post a Comment

Note: only a member of this blog may post a comment.


Get paid to share your links!