Index: lib/Headers/xmmintrin.h =================================================================== --- lib/Headers/xmmintrin.h +++ lib/Headers/xmmintrin.h @@ -1011,6 +1011,8 @@ /// \brief Compares two 32-bit float values in the low-order bits of both /// operands for equality and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS @@ -1022,7 +1024,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the +/// two lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comieq_ss(__m128 __a, __m128 __b) { @@ -1033,6 +1036,8 @@ /// operands to determine if the first operand is less than the second /// operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS @@ -1044,7 +1049,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comilt_ss(__m128 __a, __m128 __b) { @@ -1055,6 +1061,8 @@ /// operands to determine if the first operand is less than or equal to the /// second operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS instructions. @@ -1065,7 +1073,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comile_ss(__m128 __a, __m128 __b) { @@ -1076,6 +1085,8 @@ /// operands to determine if the first operand is greater than the second /// operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS instructions. @@ -1086,7 +1097,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the +/// two lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comigt_ss(__m128 __a, __m128 __b) { @@ -1097,6 +1109,8 @@ /// operands to determine if the first operand is greater than or equal to /// the second operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS instructions. @@ -1107,7 +1121,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comige_ss(__m128 __a, __m128 __b) { @@ -1118,6 +1133,8 @@ /// operands to determine if the first operand is not equal to the second /// operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 1 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VCOMISS / COMISS instructions. @@ -1128,7 +1145,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the +/// two lower 32-bit values is NaN, 1 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_comineq_ss(__m128 __a, __m128 __b) { @@ -1139,6 +1157,8 @@ /// the low-order bits of both operands to determine equality and returns /// the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1149,7 +1169,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomieq_ss(__m128 __a, __m128 __b) { @@ -1160,6 +1181,8 @@ /// the low-order bits of both operands to determine if the first operand is /// less than the second operand and returns the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1170,7 +1193,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomilt_ss(__m128 __a, __m128 __b) { @@ -1182,6 +1206,8 @@ /// less than or equal to the second operand and returns the result of the /// comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1192,7 +1218,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomile_ss(__m128 __a, __m128 __b) { @@ -1204,6 +1231,8 @@ /// greater than the second operand and returns the result of the /// comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1214,7 +1243,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomigt_ss(__m128 __a, __m128 __b) { @@ -1226,6 +1256,8 @@ /// greater than or equal to the second operand and returns the result of /// the comparison. /// +/// If either of the two lower 32-bit values is NaN, 0 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1236,7 +1268,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 0 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomige_ss(__m128 __a, __m128 __b) { @@ -1247,6 +1280,8 @@ /// the low-order bits of both operands to determine inequality and returns /// the result of the comparison. /// +/// If either of the two lower 32-bit values is NaN, 1 is returned. +/// /// \headerfile /// /// This intrinsic corresponds to the VUCOMISS / UCOMISS instructions. @@ -1257,7 +1292,8 @@ /// \param __b /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are /// used in the comparison. -/// \returns An integer containing the comparison results. +/// \returns An integer containing the comparison results. If either of the two +/// lower 32-bit values is NaN, 1 is returned. static __inline__ int __DEFAULT_FN_ATTRS _mm_ucomineq_ss(__m128 __a, __m128 __b) { @@ -1571,7 +1607,7 @@ /// /// \headerfile /// -/// This intrinsic corresponds to the VMOVSS / MOVSS instruction. +/// This intrinsic has no corresponding instruction. /// /// \param __a /// A 128-bit vector of [4 x float]. The lower 32 bits of this operand are @@ -1667,7 +1703,7 @@ /// /// \headerfile /// -/// This intrinsic corresponds to the VMOVSS / MOVSS + shuffling +/// This intrinsic corresponds to the VBROADCASTSS / BROADCASTSS /// instruction. /// /// \param __p @@ -1696,7 +1732,7 @@ /// \param __p /// A pointer to a 128-bit memory location. The address of the memory /// location has to be 128-bit aligned. -/// \returns A 128-bit vector of [4 x float] containing the loaded valus. +/// \returns A 128-bit vector of [4 x float] containing the loaded values. static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_load_ps(const float *__p) { @@ -1888,7 +1924,7 @@ /// /// \headerfile /// -/// This intrinsic corresponds to the VPEXTRQ / MOVQ instruction. +/// This intrinsic corresponds to the VPEXTRQ / PEXTRQ instruction. /// /// \param __p /// A pointer to a 64-bit memory location. @@ -2160,7 +2196,7 @@ /// __m64 _mm_insert_pi16(__m64 a, int d, int n); /// \endcode /// -/// This intrinsic corresponds to the VPINSRW / PINSRW instruction. +/// This intrinsic corresponds to the PINSRW instruction. /// /// \param a /// A 64-bit vector of [4 x i16]. @@ -2258,7 +2294,7 @@ } /// \brief Takes the most significant bit from each 8-bit element in a 64-bit -/// integer vector to create a 16-bit mask value. Zero-extends the value to +/// integer vector to create an 8-bit mask value. Zero-extends the value to /// 32-bit integer and writes it to the destination. /// /// \headerfile @@ -2267,8 +2303,8 @@ /// /// \param __a /// A 64-bit integer vector containing the values with bits to be extracted. -/// \returns The most significant bit from each 8-bit element in the operand, -/// written to bits [15:0]. +/// \returns The most significant bit from each 8-bit element in \a __a, +/// written to bits [7:0]. static __inline__ int __DEFAULT_FN_ATTRS _mm_movemask_pi8(__m64 __a) { @@ -2441,7 +2477,7 @@ ///
  • /// For checking rounding modes: _MM_ROUND_NEAREST, _MM_ROUND_DOWN, /// _MM_ROUND_UP, _MM_ROUND_TOWARD_ZERO. There is a convenience wrapper -/// _MM_GET_ROUNDING_MODE(x) where x is one of these macros. +/// _MM_GET_ROUNDING_MODE(). ///
  • ///
  • /// For checking flush-to-zero mode: _MM_FLUSH_ZERO_ON, _MM_FLUSH_ZERO_OFF. @@ -2454,11 +2490,11 @@ ///
  • /// /// -/// For example, the expression below checks if an overflow exception has +/// For example, the following expression checks if an overflow exception has /// occurred: /// ( _mm_getcsr() & _MM_EXCEPT_OVERFLOW ) /// -/// The following example gets the current rounding mode: +/// The following expression gets the current rounding mode: /// _MM_GET_ROUNDING_MODE() /// /// \headerfile @@ -2508,10 +2544,12 @@ /// _mm_setcsr(_mm_getcsr() | _MM_ROUND_UP) /// /// The following example sets the DAZ and FTZ flags: -/// void setFlags() { -/// _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON) -/// _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON) -/// } +/// \code +/// void setFlags() { +/// _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); +/// _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); +/// } +/// \endcode /// /// \headerfile /// @@ -2618,7 +2656,7 @@ /// /// \headerfile /// -/// This intrinsic corresponds to the VMOVSS / MOVSS instruction. +/// This intrinsic corresponds to the VBLENDPS / BLENDPS instruction. /// /// \param __a /// A 128-bit floating-point vector of [4 x float]. The upper 96 bits are