Bagikan melalui


3DNow! Intrinsics

Microsoft Specific

This topic contains the 3DNow! intrinsics. For each intrinsic, the header file mm3dnow.h is required.

The following table lists the 3DNow! intrinsics alphabetically.

Intrinsic

Use

_m_femms

Clears the architectural state when switching between MMX and floating-point instructions.

_m_from_float

Returns a 64-bit MMX value where the lower half is set to the floating-point, single-precision value from the source operand and the upper half is zero. There is no error return.

_m_pavgusb

Calculates the rounded averages of eight unsigned 8-bit integer values.

_m_pf2id

Converts packed floating-point, single-precision values to packed 32-bit integer values.

_m_pf2iw

Converts packed floating-point, single-precision values to packed 16-bit signed integer values using truncation.

_m_pfacc

Performs packed floating-point, single-precision accumulation.

_m_pfadd

Performs packed floating-point, single-precision addition.

_m_pfcmpeq

Compares packed floating-point, single-precision values to be equal and sets the corresponding return value to ones or zeros based on the result of the comparison.

_m_pfcmpge

Compares the first packed floating-point, single-precision value to be greater than or equal to the second one and sets the corresponding return value to ones or zeros based on the result of the comparison.

_m_pfcmpgt

Compares the first packed floating-point, single-precision value to be greater than the second one and sets the corresponding return value to ones or zeros based on the result of the comparison.

_m_pfmax

Returns the larger of the two packed floating-point, single-precision values.

_m_pfmin

Returns the smaller of the two packed floating-point, single-precision values.

_m_pfmul

Performs packed floating-point, single-precision multiplication.

_m_pfnacc

Performs packed floating-point, single-precision negative accumulation.

_m_pfpnacc

Performs packed floating-point, single-precision positive-negative accumulation.

_m_pfrcp

Performs scalar floating-point, low-precision reciprocal approximation.

_m_pfrcpit1

Performs the first intermediate step in the Newton-Raphson iteration to refine the reciprocal approximation produced by the _m_pfrcp intrinsic function.

_m_pfrcpit2

Performs the second and final step in the Newton-Raphson iteration to refine the reciprocal or reciprocal square root approximation produced by the _m_pfrcp or _m_pfsqrt intrinsic functions, respectively.

_m_pfrsqit1

Performs the first intermediate step in the Newton-Raphson iteration to refine the reciprocal square root approximation produced by _m_pfsqrt intrinsic function.

_m_pfrsqrt

Performs scalar floating-point, low-precision reciprocal square root approximation.

_m_pfsub

Performs packed floating-point, single-precision subtraction.

_m_pfsubr

Performs packed floating-point, single-precision reverse subtraction.

_m_pi2fd

Converts packed 32-bit integer values to packed floating-point, single-precision values.

_m_pi2fw

Converts packed 16-bit signed integer values to packed floating-point, single-precision values.

_m_pmulhrw

Multiplies four signed 16-bit integer values in the source operand by four signed 16-bit integer values in the destination operand.

_m_prefetch

Loads a 32-byte cache line into L1 data cache and sets the cache line state to exclusive.

_m_prefetchw

Loads a 32-byte cache line into L1 data cache and sets the cache line state to modified.

_m_pswapd

Swaps upper and lower halves of the source operand.

_m_to_float

Returns the floating-point, single-precision value from the lower half of the 64-bit MMX value in the source operand. There is no error return.

The compiler correctly ensures that an implict FEMMS is issued before any attempt to use the result of _m_to_float( ) operation.

See Also

Reference

AMD 3DNow! Technology Overview and Intrinsics