r333065 - [DOXYGEN] Formatting changes for better intrinsics documentation rendering

2018-05-23 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue May 22 23:33:22 2018
New Revision: 333065

URL: http://llvm.org/viewvc/llvm-project?rev=333065=rev
Log:
[DOXYGEN] Formatting changes for better intrinsics documentation rendering

(1) I added some \see cross-references to a few select intrinsics that are 
related (and have the same or similar semantics). 

(2) pmmintrin.h, smmintrin.h, xmmintrin.h have very few minor formatting 
changes. They make rendering of our intrinsics documentation better. 


Modified:
cfe/trunk/lib/Headers/bmiintrin.h
cfe/trunk/lib/Headers/lzcntintrin.h
cfe/trunk/lib/Headers/pmmintrin.h
cfe/trunk/lib/Headers/smmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=333065=333064=333065=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Tue May 22 23:33:22 2018
@@ -100,6 +100,7 @@ __andn_u32(unsigned int __X, unsigned in
 ///number of bits to be extracted.
 /// \returns An unsigned integer whose least significant bits contain the
 ///extracted bits.
+/// \see _bextr_u32
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 __bextr_u32(unsigned int __X, unsigned int __Y)
 {
@@ -124,6 +125,7 @@ __bextr_u32(unsigned int __X, unsigned i
 ///Bits [7:0] specify the number of bits.
 /// \returns An unsigned integer whose least significant bits contain the
 ///extracted bits.
+/// \see __bextr_u32
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 _bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z)
 {
@@ -261,6 +263,7 @@ __andn_u64 (unsigned long long __X, unsi
 ///the number of bits to be extracted.
 /// \returns An unsigned 64-bit integer whose least significant bits contain 
the
 ///extracted bits.
+/// \see _bextr_u64
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 __bextr_u64(unsigned long long __X, unsigned long long __Y)
 {
@@ -285,6 +288,7 @@ __bextr_u64(unsigned long long __X, unsi
 ///Bits [7:0] specify the number of bits.
 /// \returns An unsigned 64-bit integer whose least significant bits contain 
the
 ///extracted bits.
+/// \see __bextr_u64
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 _bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z)
 {

Modified: cfe/trunk/lib/Headers/lzcntintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/lzcntintrin.h?rev=333065=333064=333065=diff
==
--- cfe/trunk/lib/Headers/lzcntintrin.h (original)
+++ cfe/trunk/lib/Headers/lzcntintrin.h Tue May 22 23:33:22 2018
@@ -57,6 +57,7 @@ __lzcnt16(unsigned short __X)
 ///An unsigned 32-bit integer whose leading zeros are to be counted.
 /// \returns An unsigned 32-bit integer containing the number of leading zero
 ///bits in the operand.
+/// \see _lzcnt_u32
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 __lzcnt32(unsigned int __X)
 {
@@ -73,6 +74,7 @@ __lzcnt32(unsigned int __X)
 ///An unsigned 32-bit integer whose leading zeros are to be counted.
 /// \returns An unsigned 32-bit integer containing the number of leading zero
 ///bits in the operand.
+/// \see __lzcnt32
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 _lzcnt_u32(unsigned int __X)
 {
@@ -90,6 +92,7 @@ _lzcnt_u32(unsigned int __X)
 ///An unsigned 64-bit integer whose leading zeros are to be counted.
 /// \returns An unsigned 64-bit integer containing the number of leading zero
 ///bits in the operand.
+/// \see _lzcnt_u64
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 __lzcnt64(unsigned long long __X)
 {
@@ -106,6 +109,7 @@ __lzcnt64(unsigned long long __X)
 ///An unsigned 64-bit integer whose leading zeros are to be counted.
 /// \returns An unsigned 64-bit integer containing the number of leading zero
 ///bits in the operand.
+/// \see __lzcnt64
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 _lzcnt_u64(unsigned long long __X)
 {

Modified: cfe/trunk/lib/Headers/pmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/pmmintrin.h?rev=333065=333064=333065=diff
==
--- cfe/trunk/lib/Headers/pmmintrin.h (original)
+++ cfe/trunk/lib/Headers/pmmintrin.h Tue May 22 23:33:22 2018
@@ -229,7 +229,7 @@ _mm_hsub_pd(__m128d __a, __m128d __b)
 /// \headerfile 
 ///
 /// \code
-/// __m128d _mm_loaddup_pd(double const * dp);
+/// __m128d _mm_loaddup_pd(double const *dp);
 /// \endcode
 ///
 /// This intrinsic corresponds to the  VMOVDDUP  instruction.

Modified: cfe/trunk/lib/Headers/smmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/smmintrin.h?rev=333065=333064=333065=diff
==
--- 

r325312 - [DOXYGEN] There was a request in the review D41507 to change the notation for hex numbers in doxygen documentation from <...>h to 0x<...>. Both of these notations were used in x86 intrinsics

2018-02-15 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Feb 15 19:11:35 2018
New Revision: 325312

URL: http://llvm.org/viewvc/llvm-project?rev=325312=rev
Log:
[DOXYGEN] There was a request in the review D41507 to change the notation for 
hex numbers in doxygen documentation from <...>h to 0x<...>. Both of these 
notations were used in x86 intrinsics documentation. I promised to change them 
to 0x<...> for consistency.

Differential Revision: https://reviews.llvm.org/D41888


Modified:
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/tmmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=325312=325311=325312=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Feb 15 19:11:35 2018
@@ -422,8 +422,8 @@ _mm_xor_pd(__m128d __a, __m128d __b)
 }
 
 /// \brief Compares each of the corresponding double-precision values of the
-///128-bit vectors of [2 x double] for equality. Each comparison yields 0h
-///for false, h for true.
+///128-bit vectors of [2 x double] for equality. Each comparison yields 0x0
+///for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -443,7 +443,7 @@ _mm_cmpeq_pd(__m128d __a, __m128d __b)
 /// \brief Compares each of the corresponding double-precision values of the
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are less than those in the second operand. Each comparison
-///yields 0h for false, h for true.
+///yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -464,7 +464,7 @@ _mm_cmplt_pd(__m128d __a, __m128d __b)
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are less than or equal to those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -485,7 +485,7 @@ _mm_cmple_pd(__m128d __a, __m128d __b)
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are greater than those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -506,7 +506,7 @@ _mm_cmpgt_pd(__m128d __a, __m128d __b)
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are greater than or equal to those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -528,8 +528,8 @@ _mm_cmpge_pd(__m128d __a, __m128d __b)
 ///operand are ordered with respect to those in the second operand.
 ///
 ///A pair of double-precision values are "ordered" with respect to each
-///other if neither value is a NaN. Each comparison yields 0h for false,
-///h for true.
+///other if neither value is a NaN. Each comparison yields 0x0 for false,
+///0x for true.
 ///
 /// \headerfile 
 ///
@@ -551,8 +551,8 @@ _mm_cmpord_pd(__m128d __a, __m128d __b)
 ///operand are unordered with respect to those in the second operand.
 ///
 ///A pair of double-precision values are "unordered" with respect to each
-///other if one or both values are NaN. Each comparison yields 0h for 
false,
-///h for true.
+///other if one or both values are NaN. Each comparison yields 0x0 for
+///false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -574,7 +574,7 @@ _mm_cmpunord_pd(__m128d __a, __m128d __b
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are unequal to those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -595,7 +595,7 @@ _mm_cmpneq_pd(__m128d __a, __m128d __b)
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are not less than those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for true.
 ///
 /// \headerfile 
 ///
@@ -616,7 +616,7 @@ _mm_cmpnlt_pd(__m128d __a, __m128d __b)
 ///128-bit vectors of [2 x double] to determine if the values in the first
 ///operand are not less than or equal to those in the second operand.
 ///
-///Each comparison yields 0h for false, h for true.
+///Each comparison yields 0x0 for false, 0x for 

r307838 - [DOXYGEN] Corrected typos and incorrect parameters description.

2017-07-12 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Jul 12 13:18:55 2017
New Revision: 307838

URL: http://llvm.org/viewvc/llvm-project?rev=307838=rev
Log:
[DOXYGEN] Corrected typos and incorrect parameters description.

Corrected several typos and incorrect parameters description that Sony
's techinical writer found during review.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/bmiintrin.h
cfe/trunk/lib/Headers/mmintrin.h

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=307838=307837=307838=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Wed Jul 12 13:18:55 2017
@@ -318,7 +318,7 @@ __blsi_u64(unsigned long long __X)
 ///
 /// \param __X
 ///An unsigned 64-bit integer used to create the mask.
-/// \returns A unsigned 64-bit integer containing the newly created mask.
+/// \returns An unsigned 64-bit integer containing the newly created mask.
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 __blsmsk_u64(unsigned long long __X)
 {

Modified: cfe/trunk/lib/Headers/mmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/mmintrin.h?rev=307838=307837=307838=diff
==
--- cfe/trunk/lib/Headers/mmintrin.h (original)
+++ cfe/trunk/lib/Headers/mmintrin.h Wed Jul 12 13:18:55 2017
@@ -1289,7 +1289,7 @@ _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r304840 - [DOXYGEN] Corrected several typos and incorrect parameters description that Sony's techinical writer found during review.

2017-06-06 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Jun  6 17:58:01 2017
New Revision: 304840

URL: http://llvm.org/viewvc/llvm-project?rev=304840=rev
Log:
[DOXYGEN] Corrected several typos and incorrect parameters description that 
Sony's techinical writer found during review.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/bmiintrin.h
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=304840=304839=304840=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Tue Jun  6 17:58:01 2017
@@ -3603,7 +3603,7 @@ _mm256_stream_si256(__m256i *__a, __m256
 ///
 /// \param __a
 ///A pointer to a 32-byte aligned memory location that will receive the
-///integer values.
+///double-precision floating-point values.
 /// \param __b
 ///A 256-bit vector of [4 x double] containing the values to be moved.
 static __inline void __DEFAULT_FN_ATTRS

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=304840=304839=304840=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Tue Jun  6 17:58:01 2017
@@ -148,7 +148,7 @@ __blsi_u32(unsigned int __X)
 }
 
 /// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
-///including the least siginificant bit that is set to 1 in the source
+///including the least significant bit that is set to 1 in the source
 ///operand and returns the result.
 ///
 /// \headerfile 
@@ -164,7 +164,7 @@ __blsmsk_u32(unsigned int __X)
   return __X ^ (__X - 1);
 }
 
-/// \brief Clears the least siginificant bit that is set to 1 in the source
+/// \brief Clears the least significant bit that is set to 1 in the source
 ///operand and returns the result.
 ///
 /// \headerfile 
@@ -309,7 +309,7 @@ __blsi_u64(unsigned long long __X)
 }
 
 /// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
-///including the least siginificant bit that is set to 1 in the source
+///including the least significant bit that is set to 1 in the source
 ///operand and returns the result.
 ///
 /// \headerfile 
@@ -325,7 +325,7 @@ __blsmsk_u64(unsigned long long __X)
   return __X ^ (__X - 1);
 }
 
-/// \brief Clears the least siginificant bit that is set to 1 in the source
+/// \brief Clears the least significant bit that is set to 1 in the source
 ///operand and returns the result.
 ///
 /// \headerfile 

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=304840=304839=304840=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Tue Jun  6 17:58:01 2017
@@ -302,7 +302,7 @@ _mm_min_pd(__m128d __a, __m128d __b)
   return __builtin_ia32_minpd((__v2df)__a, (__v2df)__b);
 }
 
-/// \brief Compares lower 64-bits double-precision values of both operands, and
+/// \brief Compares lower 64-bit double-precision values of both operands, and
 ///returns the greater of the pair of values in the lower 64-bits of the
 ///result. The upper 64 bits of the result are copied from the upper 
double-
 ///precision value of the first operand.
@@ -1652,7 +1652,7 @@ _mm_loadu_pd(double const *__dp)
 ///
 /// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
 ///
-/// \param __dp
+/// \param __a
 ///A pointer to a 64-bit memory location. The address of the memory
 ///location does not have to be aligned.
 /// \returns A 128-bit vector of [2 x i64] containing the loaded value.
@@ -1674,7 +1674,7 @@ _mm_loadu_si64(void const *__a)
 /// This intrinsic corresponds to the  VMOVSD / MOVSD  instruction.
 ///
 /// \param __dp
-///An pointer to a memory location containing a double-precision value.
+///A pointer to a memory location containing a double-precision value.
 ///The address of the memory location does not have to be aligned.
 /// \returns A 128-bit vector of [2 x double] containing the loaded value.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
@@ -1911,12 +1911,38 @@ _mm_store_sd(double *__dp, __m128d __a)
   ((struct __mm_store_sd_struct*)__dp)->__u = __a[0];
 }
 
+/// \brief Moves packed double-precision values from a 128-bit vector of
+///[2 x double] to a memory location.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the VMOVAPD / MOVAPS instruction.
+///
+/// \param __dp
+///A pointer to an aligned memory location that can store two
+///double-precision 

r303228 - (1) Fixed mismatch in intrinsics names in declarations and in doxygen comments.

2017-05-16 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue May 16 20:46:11 2017
New Revision: 303228

URL: http://llvm.org/viewvc/llvm-project?rev=303228=rev
Log:
(1) Fixed mismatch in intrinsics names in declarations and in doxygen comments.
(2) Removed uncessary anymore \c commands, since the same effect will be 
achived by  ...  sequence. 

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.



Modified:
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=303228=303227=303228=diff
==
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Tue May 16 20:46:11 2017
@@ -2133,7 +2133,7 @@ void _mm_sfence(void);
 /// \headerfile 
 ///
 /// \code
-/// void _mm_extract_pi(__m64 a, int n);
+/// int _mm_extract_pi16(__m64 a, int n);
 /// \endcode
 ///
 /// This intrinsic corresponds to the  VPEXTRW / PEXTRW  instruction.
@@ -2157,7 +2157,7 @@ void _mm_sfence(void);
 /// \headerfile 
 ///
 /// \code
-/// void _mm_insert_pi(__m64 a, int d, int n);
+/// __m64 _mm_insert_pi16(__m64 a, int d, int n);
 /// \endcode
 ///
 /// This intrinsic corresponds to the  VPINSRW / PINSRW  instruction.
@@ -2680,8 +2680,7 @@ _mm_movelh_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 64-bit vector of [4 x i16]. The elements of the destination are copied
@@ -2711,8 +2710,7 @@ _mm_cvtpi16_ps(__m64 __a)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 64-bit vector of 16-bit unsigned integer values. The elements of the
@@ -2741,8 +2739,7 @@ _mm_cvtpu16_ps(__m64 __a)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 64-bit vector of [8 x i8]. The elements of the destination are copied
@@ -2766,8 +2763,7 @@ _mm_cvtpi8_ps(__m64 __a)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 64-bit vector of unsigned 8-bit integer values. The elements of the
@@ -2791,8 +2787,7 @@ _mm_cvtpu8_ps(__m64 __a)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPI2PS + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPI2PS + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 64-bit vector of [2 x i32]. The lower elements of the destination are
@@ -2826,8 +2821,7 @@ _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPS2PI + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPS2PI + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///A 128-bit floating-point vector of [4 x float].
@@ -2857,8 +2851,7 @@ _mm_cvtps_pi16(__m128 __a)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  CVTPS2PI + \c COMPOSITE 
-///   instruction.
+/// This intrinsic corresponds to the  CVTPS2PI + COMPOSITE  
instruction.
 ///
 /// \param __a
 ///128-bit floating-point vector of [4 x float].


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r303031 - [DOXYGEN] Minor improvements in doxygen comments.

2017-05-14 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Sun May 14 22:25:04 2017
New Revision: 303031

URL: http://llvm.org/viewvc/llvm-project?rev=303031=rev
Log:
[DOXYGEN] Minor improvements in doxygen comments.

Separated very long brief sections into two sections. 

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/mmintrin.h
cfe/trunk/lib/Headers/pmmintrin.h
cfe/trunk/lib/Headers/prfchwintrin.h
cfe/trunk/lib/Headers/smmintrin.h
cfe/trunk/lib/Headers/tmmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=303031=303030=303031=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Sun May 14 22:25:04 2017
@@ -1458,12 +1458,13 @@ _mm256_blendv_ps(__m256 __a, __m256 __b,
 /// \brief Computes two dot products in parallel, using the lower and upper
 ///halves of two [8 x float] vectors as input to the two computations, and
 ///returning the two dot products in the lower and upper halves of the
-///[8 x float] result. The immediate integer operand controls which input
-///elements will contribute to the dot product, and where the final results
-///are returned. In general, for each dot product, the four corresponding
-///elements of the input vectors are multiplied; the first two and second
-///two products are summed, then the two sums are added to form the final
-///result.
+///[8 x float] result.
+///
+///The immediate integer operand controls which input elements will
+///contribute to the dot product, and where the final results are returned.
+///In general, for each dot product, the four corresponding elements of the
+///input vectors are multiplied; the first two and second two products are
+///summed, then the two sums are added to form the final result.
 ///
 /// \headerfile 
 ///
@@ -1497,15 +1498,16 @@ _mm256_blendv_ps(__m256 __a, __m256 __b,
 
 /* Vector shuffle */
 /// \brief Selects 8 float values from the 256-bit operands of [8 x float], as
-///specified by the immediate value operand. The four selected elements in
-///each operand are copied to the destination according to the bits
-///specified in the immediate operand. The selected elements from the first
-///256-bit operand are copied to bits [63:0] and bits [191:128] of the
-///destination, and the selected elements from the second 256-bit operand
-///are copied to bits [127:64] and bits [255:192] of the destination. For
-///example, if bits [7:0] of the immediate operand contain a value of 0xFF,
-///the 256-bit destination vector would contain the following values: b[7],
-///b[7], a[7], a[7], b[3], b[3], a[3], a[3].
+///specified by the immediate value operand.
+///
+///The four selected elements in each operand are copied to the destination
+///according to the bits specified in the immediate operand. The selected
+///elements from the first 256-bit operand are copied to bits [63:0] and
+///bits [191:128] of the destination, and the selected elements from the
+///second 256-bit operand are copied to bits [127:64] and bits [255:192] of
+///the destination. For example, if bits [7:0] of the immediate operand
+///contain a value of 0xFF, the 256-bit destination vector would contain 
the
+///following values: b[7], b[7], a[7], a[7], b[3], b[3], a[3], a[3].
 ///
 /// \headerfile 
 ///
@@ -1557,13 +1559,14 @@ _mm256_blendv_ps(__m256 __a, __m256 __b,
   12 + (((mask) >> 6) & 0x3)); })
 
 /// \brief Selects four double-precision values from the 256-bit operands of
-///[4 x double], as specified by the immediate value operand. The selected
-///elements from the first 256-bit operand are copied to bits [63:0] and
-///bits [191:128] in the destination, and the selected elements from the
-///second 256-bit operand are copied to bits [127:64] and bits [255:192] in
-///the destination. For example, if bits [3:0] of the immediate operand
-///contain a value of 0xF, the 256-bit destination vector would contain the
-///following values: b[3], a[3], b[1], a[1].
+///[4 x double], as specified by the immediate value operand.
+///
+///The selected elements from the first 256-bit operand are copied to bits
+///[63:0] and bits [191:128] in the destination, and the selected elements
+///from the second 256-bit operand are copied to bits [127:64] and bits
+///[255:192] in the destination. For example, if bits [3:0] of the 
immediate
+///operand contain a value of 0xF, the 256-bit destination vector would
+///contain the following values: b[3], a[3], b[1], a[1].
 ///
 /// 

r301652 - [DOXYGEN] Minor improvements in doxygen comments.

2017-04-28 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Apr 28 11:45:39 2017
New Revision: 301652

URL: http://llvm.org/viewvc/llvm-project?rev=301652=rev
Log:
[DOXYGEN] Minor improvements in doxygen comments.

- I removed doxygen comments for the intrinsics that "alias" the other existing 
documented intrinsics and that only sligtly differ in spelling (single 
underscores vs. double underscores). 
 #define _tzcnt_u16(a) (__tzcnt_u16((a)))

It will be very hard to keep the documentation for these "aliases" in sync with 
the documentation for the intrinsics they alias to. Out of sync documentation 
will be more confusing than no documentation.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/bmiintrin.h

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=301652=301651=301652=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Fri Apr 28 11:45:39 2017
@@ -28,107 +28,17 @@
 #ifndef __BMIINTRIN_H
 #define __BMIINTRIN_H
 
-/// \brief Counts the number of trailing zero bits in the operand.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned short _tzcnt_u16(unsigned short a);
-/// \endcode
-///
-/// This intrinsic corresponds to the  TZCNT  instruction.
-///
-/// \param a
-///An unsigned 16-bit integer whose trailing zeros are to be counted.
-/// \returns An unsigned 16-bit integer containing the number of trailing zero
-///bits in the operand.
 #define _tzcnt_u16(a) (__tzcnt_u16((a)))
 
-/// \brief Performs a bitwise AND of the second operand with the one's
-///complement of the first operand.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned int _andn_u32(unsigned int a, unsigned int b);
-/// \endcode
-///
-/// This intrinsic corresponds to the  ANDN  instruction.
-///
-/// \param a
-///An unsigned integer containing one of the operands.
-/// \param b
-///An unsigned integer containing one of the operands.
-/// \returns An unsigned integer containing the bitwise AND of the second
-///operand with the one's complement of the first operand.
 #define _andn_u32(a, b)   (__andn_u32((a), (b)))
 
 /* _bextr_u32 != __bextr_u32 */
-/// \brief Clears all bits in the source except for the least significant bit
-///containing a value of 1 and returns the result.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned int _blsi_u32(unsigned int a);
-/// \endcode
-///
-/// This intrinsic corresponds to the  BLSI  instruction.
-///
-/// \param a
-///An unsigned integer whose bits are to be cleared.
-/// \returns An unsigned integer containing the result of clearing the bits 
from
-///the source operand.
 #define _blsi_u32(a)  (__blsi_u32((a)))
 
-/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
-///including the least siginificant bit that is set to 1 in the source
-///operand and returns the result.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned int _blsmsk_u32(unsigned int a);
-/// \endcode
-///
-/// This intrinsic corresponds to the  BLSMSK  instruction.
-///
-/// \param a
-///An unsigned integer used to create the mask.
-/// \returns An unsigned integer containing the newly created mask.
 #define _blsmsk_u32(a)(__blsmsk_u32((a)))
 
-/// \brief Clears the least siginificant bit that is set to 1 in the source
-///operand and returns the result.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned int _blsr_u32(unsigned int a);
-/// \endcode
-///
-/// This intrinsic corresponds to the  BLSR  instruction.
-///
-/// \param a
-///An unsigned integer containing the operand to be cleared.
-/// \returns An unsigned integer containing the result of clearing the source
-///operand.
 #define _blsr_u32(a)  (__blsr_u32((a)))
 
-/// \brief Counts the number of trailing zero bits in the operand.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned int _tzcnt_u32(unsigned int a);
-/// \endcode
-///
-/// This intrinsic corresponds to the  TZCNT  instruction.
-///
-/// \param a
-///An unsigned 32-bit integer whose trailing zeros are to be counted.
-/// \returns An unsigned 32-bit integer containing the number of trailing zero
-///bits in the operand.
 #define _tzcnt_u32(a) (__tzcnt_u32((a)))
 
 /* Define the default attributes for the functions in this file. */
@@ -305,91 +215,15 @@ _mm_tzcnt_32(unsigned int __X)
 
 #ifdef __x86_64__
 
-/// \brief Performs a bitwise AND of the second operand with the one's
-///complement of the first operand.
-///
-/// \headerfile 
-///
-/// \code
-/// unsigned long long _andn_u64 (unsigned long long a, unsigned long long b);
-/// \endcode
-///
-/// This intrinsic corresponds to the  ANDN  instruction.
-///
-/// \param a
-///An unsigned 64-bit integer containing one of the operands.
-/// \param b
-///An unsigned 64-bit integer 

r300578 - [DOXYGEN] Minor improvements in doxygen comments.

2017-04-18 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Apr 18 14:44:07 2017
New Revision: 300578

URL: http://llvm.org/viewvc/llvm-project?rev=300578=rev
Log:
[DOXYGEN] Minor improvements in doxygen comments.

- To be consistent with the rest of the intrinsics headers, I removed the tags 
 ..  for marking instruction names in italics in in smmintrin.h. 

- Formatting changes to fit into 80 characters. 

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/smmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/smmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/smmintrin.h?rev=300578=300577=300578=diff
==
--- cfe/trunk/lib/Headers/smmintrin.h (original)
+++ cfe/trunk/lib/Headers/smmintrin.h Tue Apr 18 14:44:07 2017
@@ -56,8 +56,7 @@
 /// __m128 _mm_ceil_ps(__m128 X);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPS / ROUNDPS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPS / ROUNDPS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float] values to be rounded up.
@@ -74,8 +73,7 @@
 /// __m128d _mm_ceil_pd(__m128d X);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPD / ROUNDPD  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPD / ROUNDPD  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [2 x double] values to be rounded up.
@@ -94,8 +92,7 @@
 /// __m128 _mm_ceil_ss(__m128 X, __m128 Y);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSS / ROUNDSS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDSS / ROUNDSS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
@@ -120,8 +117,7 @@
 /// __m128d _mm_ceil_sd(__m128d X, __m128d Y);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSD / ROUNDSD  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDSD / ROUNDSD  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
@@ -144,8 +140,7 @@
 /// __m128 _mm_floor_ps(__m128 X);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPS / ROUNDPS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPS / ROUNDPS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float] values to be rounded down.
@@ -162,8 +157,7 @@
 /// __m128d _mm_floor_pd(__m128d X);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPD / ROUNDPD  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPD / ROUNDPD  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [2 x double].
@@ -182,8 +176,7 @@
 /// __m128 _mm_floor_ss(__m128 X, __m128 Y);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSS / ROUNDSS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDSS / ROUNDSS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
@@ -208,8 +201,7 @@
 /// __m128d _mm_floor_sd(__m128d X, __m128d Y);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSD / ROUNDSD  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDSD / ROUNDSD  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
@@ -233,8 +225,7 @@
 /// __m128 _mm_round_ps(__m128 X, const int M);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPS / ROUNDPS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPS / ROUNDPS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float].
@@ -269,8 +260,7 @@
 /// __m128 _mm_round_ss(__m128 X, __m128 Y, const int M);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSS / ROUNDSS  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDSS / ROUNDSS  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
@@ -310,8 +300,7 @@
 /// __m128d _mm_round_pd(__m128d X, const int M);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDPD / ROUNDPD  
-/// instruction.
+/// This intrinsic corresponds to the  VROUNDPD / ROUNDPD  instruction.
 ///
 /// \param X
 ///A 128-bit vector of [2 x double].
@@ -333,7 +322,6 @@
 #define _mm_round_pd(X, M) __extension__ ({ \
   (__m128d)__builtin_ia32_roundpd((__v2df)(__m128d)(X), (M)); })
 
-
 /// \brief Copies the upper element of the first 128-bit vector operand to the
 ///corresponding upper element of the 128-bit result vector of [2 x 
double].
 ///Rounds the lower element of the second 128-bit vector operand to an
@@ -347,8 +335,7 @@
 /// __m128d _mm_round_sd(__m128d X, __m128d Y, const int M);
 /// \endcode
 ///
-/// This intrinsic corresponds to the   VROUNDSD / ROUNDSD  
-/// instruction.
+/// 

r298371 - [DOXYGEN] Improvements to smmintrin.h and emmintrin.h intrinsics.

2017-03-21 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Mar 21 08:34:06 2017
New Revision: 298371

URL: http://llvm.org/viewvc/llvm-project?rev=298371=rev
Log:
[DOXYGEN] Improvements to smmintrin.h and emmintrin.h intrinsics.

I made some small changes in smmintrin.h and emmintrin.h intrinsics.
 - changed some regular comments '//' into doxygen-style comments '///' where 
necessary
 - removed some trailing spaces in doxygen comments.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/smmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=298371=298370=298371=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Tue Mar 21 08:34:06 2017
@@ -1809,7 +1809,7 @@ _mm_setzero_pd(void)
 /// \brief Constructs a 128-bit floating-point vector of [2 x double]. The 
lower
 ///64 bits are set to the lower 64 bits of the second parameter. The upper
 ///64 bits are set to the upper 64 bits of the first parameter.
-//
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VBLENDPD / BLENDPD  instruction.

Modified: cfe/trunk/lib/Headers/smmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/smmintrin.h?rev=298371=298370=298371=diff
==
--- cfe/trunk/lib/Headers/smmintrin.h (original)
+++ cfe/trunk/lib/Headers/smmintrin.h Tue Mar 21 08:34:06 2017
@@ -174,7 +174,7 @@
 ///the corresponding three upper elements of the 128-bit result vector of
 ///[4 x float]. Rounds down the lowest element of the second 128-bit vector
 ///operand to an integer and copies it to the lowest element of the 128-bit
-///result vector of [4 x float]. 
+///result vector of [4 x float].
 ///
 /// \headerfile 
 ///
@@ -256,7 +256,7 @@
 #define _mm_round_ps(X, M) __extension__ ({ \
   (__m128)__builtin_ia32_roundps((__v4sf)(__m128)(X), (M)); })
 
-/// \brief Copies three upper elements of the first 128-bit vector operand to 
+/// \brief Copies three upper elements of the first 128-bit vector operand to
 ///the corresponding three upper elements of the 128-bit result vector of
 ///[4 x float]. Rounds the lowest element of the second 128-bit vector
 ///operand to an integer value according to the rounding control specified
@@ -265,7 +265,7 @@
 ///
 /// \headerfile 
 ///
-/// \code   
+/// \code
 /// __m128 _mm_round_ss(__m128 X, __m128 Y, const int M);
 /// \endcode
 ///
@@ -336,7 +336,7 @@
 
 /// \brief Copies the upper element of the first 128-bit vector operand to the
 ///corresponding upper element of the 128-bit result vector of [2 x 
double].
-///Rounds the lower element of the second 128-bit vector operand to an 
+///Rounds the lower element of the second 128-bit vector operand to an
 ///integer value according to the rounding control specified by the third
 ///argument and copies it to the lower element of the 128-bit result vector
 ///of [2 x double].
@@ -575,7 +575,7 @@ _mm_blendv_epi8 (__m128i __V1, __m128i _
 /// \param __V1
 ///A 128-bit integer vector.
 /// \param __V2
-///A 128-bit integer vector. 
+///A 128-bit integer vector.
 /// \returns A 128-bit integer vector containing the products of both operands.
 static __inline__  __m128i __DEFAULT_FN_ATTRS
 _mm_mullo_epi32 (__m128i __V1, __m128i __V2)
@@ -795,7 +795,7 @@ _mm_min_epi32 (__m128i __V1, __m128i __V
   return (__m128i) __builtin_ia32_pminsd128 ((__v4si) __V1, (__v4si) __V2);
 }
 
-/// \brief Compares the corresponding elements of two 128-bit vectors of 
+/// \brief Compares the corresponding elements of two 128-bit vectors of
 ///[4 x i32] and returns a 128-bit vector of [4 x i32] containing the
 ///greater value of the two.
 ///
@@ -914,7 +914,7 @@ _mm_max_epu32 (__m128i __V1, __m128i __V
 ///A 128-bit vector of [4 x float].
 /// \param N
 ///An immediate value. Bits [1:0] determines which bits from the argument
-///\a X are extracted and returned: \n 
+///\a X are extracted and returned: \n
 ///00: Bits [31:0] of parameter \a X are returned. \n
 ///01: Bits [63:32] of parameter \a X are returned. \n
 ///10: Bits [95:64] of parameter \a X are returned. \n
@@ -1023,7 +1023,7 @@ _mm_max_epu32 (__m128i __V1, __m128i __V
 /// \brief Constructs a 128-bit vector of [2 x i64] by first making a copy of
 ///the 128-bit integer vector parameter, and then inserting the 64-bit
 ///integer parameter \a I, using the immediate value parameter \a N as an
-///insertion location selector. 
+///insertion location selector.
 ///
 /// \headerfile 
 ///
@@ -1033,7 +1033,7 @@ _mm_max_epu32 (__m128i __V1, __m128i __V
 ///
 /// This intrinsic corresponds to the   

r295404 - Added doxygen comments to smmintrin.h's intrinsics.

2017-02-16 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Feb 16 20:49:50 2017
New Revision: 295404

URL: http://llvm.org/viewvc/llvm-project?rev=295404=rev
Log:
Added doxygen comments to smmintrin.h's intrinsics.

Note: The doxygen comments are automatically generated based on Sony's intrinsic
s document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.



Modified:
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/smmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=295404=295403=295404=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Feb 16 20:49:50 2017
@@ -2391,7 +2391,7 @@ _mm_mul_epu32(__m128i __a, __m128i __b)
 
 /// \brief Computes the absolute differences of corresponding 8-bit integer
 ///values in two 128-bit vectors. Sums the first 8 absolute differences, 
and
-///separately sums the second 8 absolute differences. Packss these two
+///separately sums the second 8 absolute differences. Packs these two
 ///unsigned 16-bit integer sums into the upper and lower elements of a
 ///[2 x i64] vector.
 ///

Modified: cfe/trunk/lib/Headers/smmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/smmintrin.h?rev=295404=295403=295404=diff
==
--- cfe/trunk/lib/Headers/smmintrin.h (original)
+++ cfe/trunk/lib/Headers/smmintrin.h Thu Feb 16 20:49:50 2017
@@ -46,37 +46,394 @@
 #define _MM_FROUND_RINT  (_MM_FROUND_RAISE_EXC | _MM_FROUND_CUR_DIRECTION)
 #define _MM_FROUND_NEARBYINT (_MM_FROUND_NO_EXC | _MM_FROUND_CUR_DIRECTION)
 
+/// \brief Rounds up each element of the 128-bit vector of [4 x float] to an
+///integer and returns the rounded values in a 128-bit vector of
+///[4 x float].
+///
+/// \headerfile 
+///
+/// \code
+/// __m128 _mm_ceil_ps(__m128 X);
+/// \endcode
+///
+/// This intrinsic corresponds to the   VROUNDPS / ROUNDPS  
+/// instruction.
+///
+/// \param X
+///A 128-bit vector of [4 x float] values to be rounded up.
+/// \returns A 128-bit vector of [4 x float] containing the rounded values.
 #define _mm_ceil_ps(X)   _mm_round_ps((X), _MM_FROUND_CEIL)
+
+/// \brief Rounds up each element of the 128-bit vector of [2 x double] to an
+///integer and returns the rounded values in a 128-bit vector of
+///[2 x double].
+///
+/// \headerfile 
+///
+/// \code
+/// __m128d _mm_ceil_pd(__m128d X);
+/// \endcode
+///
+/// This intrinsic corresponds to the   VROUNDPD / ROUNDPD  
+/// instruction.
+///
+/// \param X
+///A 128-bit vector of [2 x double] values to be rounded up.
+/// \returns A 128-bit vector of [2 x double] containing the rounded values.
 #define _mm_ceil_pd(X)   _mm_round_pd((X), _MM_FROUND_CEIL)
+
+/// \brief Copies three upper elements of the first 128-bit vector operand to
+///the corresponding three upper elements of the 128-bit result vector of
+///[4 x float]. Rounds up the lowest element of the second 128-bit vector
+///operand to an integer and copies it to the lowest element of the 128-bit
+///result vector of [4 x float].
+///
+/// \headerfile 
+///
+/// \code
+/// __m128 _mm_ceil_ss(__m128 X, __m128 Y);
+/// \endcode
+///
+/// This intrinsic corresponds to the   VROUNDSS / ROUNDSS  
+/// instruction.
+///
+/// \param X
+///A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
+///copied to the corresponding bits of the result.
+/// \param Y
+///A 128-bit vector of [4 x float]. The value stored in bits [31:0] is
+///rounded up to the nearest integer and copied to the corresponding bits
+///of the result.
+/// \returns A 128-bit vector of [4 x float] containing the copied and rounded
+///values.
 #define _mm_ceil_ss(X, Y)_mm_round_ss((X), (Y), _MM_FROUND_CEIL)
+
+/// \brief Copies the upper element of the first 128-bit vector operand to the
+///corresponding upper element of the 128-bit result vector of [2 x 
double].
+///Rounds up the lower element of the second 128-bit vector operand to an
+///integer and copies it to the lower element of the 128-bit result vector
+///of [2 x double].
+///
+/// \headerfile 
+///
+/// \code
+/// __m128d _mm_ceil_sd(__m128d X, __m128d Y);
+/// \endcode
+///
+/// This intrinsic corresponds to the   VROUNDSD / ROUNDSD  
+/// instruction.
+///
+/// \param X
+///A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
+///copied to the corresponding bits of the result.
+/// \param Y
+///A 128-bit vector of [2 x double]. The value stored in bits [63:0] is
+///rounded up to the nearest integer and copied to the corresponding bits
+///of the result.
+/// \returns A 128-bit vector of [2 x double] containing the copied and rounded
+///values.
 #define 

r293745 - Doxygen comments for prfchwintrin.h

2017-01-31 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Feb  1 01:37:40 2017
New Revision: 293745

URL: http://llvm.org/viewvc/llvm-project?rev=293745=rev
Log:
Doxygen comments for prfchwintrin.h

Added doxygen comments to prfchwintrin.h's intrinsics. 

Note: The doxygen comments are automatically generated based on Sony's intrinsic
s document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.




Modified:
cfe/trunk/lib/Headers/prfchwintrin.h

Modified: cfe/trunk/lib/Headers/prfchwintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/prfchwintrin.h?rev=293745=293744=293745=diff
==
--- cfe/trunk/lib/Headers/prfchwintrin.h (original)
+++ cfe/trunk/lib/Headers/prfchwintrin.h Wed Feb  1 01:37:40 2017
@@ -29,12 +29,36 @@
 #define __PRFCHWINTRIN_H
 
 #if defined(__PRFCHW__) || defined(__3dNOW__)
+/// \brief Loads a memory sequence containing the specified memory address into
+///all data cache levels. The cache-coherency state is set to exclusive.
+///Data can be read from and written to the cache line without additional
+///delay.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PREFETCHT0 instruction.
+///
+/// \param __P
+///A pointer specifying the memory address to be prefetched.
 static __inline__ void __attribute__((__always_inline__, __nodebug__))
 _m_prefetch(void *__P)
 {
   __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
 }
 
+/// \brief Loads a memory sequence containing the specified memory address into
+///the L1 data cache and sets the cache-coherency to modified. This
+///provides a hint to the processor that the cache line will be modified.
+///It is intended for use when the cache line will be written to shortly
+///after the prefetch is performed. Note that the effect of this intrinsic
+///is dependent on the processor implementation.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PREFETCHW instruction.
+///
+/// \param __P
+///A pointer specifying the memory address to be prefetched.
 static __inline__ void __attribute__((__always_inline__, __nodebug__))
 _m_prefetchw(void *__P)
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r291876 - [DOXYGEN] Documentation for the newly added x86 intrinsics.

2017-01-12 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Jan 12 19:14:08 2017
New Revision: 291876

URL: http://llvm.org/viewvc/llvm-project?rev=291876=rev
Log:
[DOXYGEN] Documentation for the newly added x86 intrinsics.

Added doxygen comments for the newly added intrinsics in avxintrin.h, namely 
_mm256_cvtsd_f64, _mm256_cvtsi256_si32 and _mm256_cvtss_f32 

Added doxygen comments for the new intrinsics in emmintrin.h, namely 
_mm_loadu_si64 and _mm_load_sd.

Explicit parameter names were added for _mm_clflush and _mm_setcsr 

The rest of the changes are editorial, removing trailing spaces at the end of 
the lines.

Differential Revision: https://reviews.llvm.org/D28503



Modified:
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/mmintrin.h
cfe/trunk/lib/Headers/pmmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=291876=291875=291876=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Thu Jan 12 19:14:08 2017
@@ -2184,12 +2184,32 @@ _mm256_cvttps_epi32(__m256 __a)
   return (__m256i)__builtin_ia32_cvttps2dq256((__v8sf) __a);
 }
 
+/// \brief Returns the first element of the input vector of [4 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double].
+/// \returns A 64 bit double containing the first element of the input vector.
 static __inline double __DEFAULT_FN_ATTRS
 _mm256_cvtsd_f64(__m256d __a)
 {
  return __a[0];
 }
 
+/// \brief Returns the first element of the input vector of [8 x i32].
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x i32].
+/// \returns A 32 bit integer containing the first element of the input vector.
 static __inline int __DEFAULT_FN_ATTRS
 _mm256_cvtsi256_si32(__m256i __a)
 {
@@ -2197,6 +2217,16 @@ _mm256_cvtsi256_si32(__m256i __a)
  return __b[0];
 }
 
+/// \brief Returns the first element of the input vector of [8 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float].
+/// \returns A 32 bit float containing the first element of the input vector.
 static __inline float __DEFAULT_FN_ATTRS
 _mm256_cvtss_f32(__m256 __a)
 {

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=291876=291875=291876=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Jan 12 19:14:08 2017
@@ -1599,6 +1599,17 @@ _mm_loadu_pd(double const *__dp)
   return ((struct __loadu_pd*)__dp)->__v;
 }
 
+/// \brief Loads a 64-bit integer value to the low element of a 128-bit integer
+///vector and clears the upper element.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
+///
+/// \param __dp
+///A pointer to a 64-bit memory location. The address of the memory
+///location does not have to be aligned.
+/// \returns A 128-bit vector of [2 x i64] containing the loaded value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_loadu_si64(void const *__a)
 {
@@ -1609,6 +1620,17 @@ _mm_loadu_si64(void const *__a)
   return (__m128i){__u, 0L};
 }
 
+/// \brief Loads a 64-bit double-precision value to the low element of a
+///128-bit integer vector and clears the upper element.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the  VMOVSD / MOVSD  instruction.
+///
+/// \param __dp
+///An pointer to a memory location containing a double-precision value.
+///The address of the memory location does not have to be aligned.
+/// \returns A 128-bit vector of [2 x double] containing the loaded value.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_load_sd(double const *__dp)
 {
@@ -4019,7 +4041,7 @@ extern "C" {
 /// \param __p
 ///A pointer to the memory location used to identify the cache line to be
 ///flushed.
-void _mm_clflush(void const *);
+void _mm_clflush(void const * __p);
 
 /// \brief Forces strong memory ordering (serialization) between load
 ///instructions preceding this instruction and load instructions following
@@ -4141,7 +4163,7 @@ _mm_packus_epi16(__m128i __a, __m128i __
 /// \param __a
 ///A 128-bit integer vector.
 /// \param __imm
-///An immediate value. Bits [3:0] selects values from \a __a to be assigned
+///An immediate value. Bits [2:0] selects values from \a __a to be assigned
 ///to bits[15:0] of the result. \n

r290619 - [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.

2016-12-27 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Dec 27 12:53:29 2016
New Revision: 290619

URL: http://llvm.org/viewvc/llvm-project?rev=290619=rev
Log:
[DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.

Added \n commands to insert a line breaks where necessary, since one long line 
of documentation is nearly unreadable.
Formatted comments to fit into 80 chars.
In some cases added \a command in front of the parameter names to display them 
in italics.


Modified:
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=290619=290618=290619=diff
==
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Tue Dec 27 12:53:29 2016
@@ -341,8 +341,8 @@ _mm_min_ss(__m128 __a, __m128 __b)
   return __builtin_ia32_minss((__v4sf)__a, (__v4sf)__b);
 }
 
-/// \brief Compares two 128-bit vectors of [4 x float] and returns the
-///lesser of each pair of values.
+/// \brief Compares two 128-bit vectors of [4 x float] and returns the lesser
+///of each pair of values.
 ///
 /// \headerfile 
 ///
@@ -361,8 +361,8 @@ _mm_min_ps(__m128 __a, __m128 __b)
 }
 
 /// \brief Compares two 32-bit float values in the low-order bits of both
-///operands and returns the greater value in the low-order bits of
-///a vector [4 x float].
+///operands and returns the greater value in the low-order bits of a 
128-bit
+///vector of [4 x float].
 ///
 /// \headerfile 
 ///
@@ -699,7 +699,8 @@ _mm_cmpge_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNEQSS / CMPNEQSS  
instructions.
+/// This intrinsic corresponds to the  VCMPNEQSS / CMPNEQSS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float] containing one of the operands. The 
lower
@@ -720,7 +721,8 @@ _mm_cmpneq_ss(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNEQPS / CMPNEQPS  
instructions.
+/// This intrinsic corresponds to the  VCMPNEQPS / CMPNEQPS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float].
@@ -740,7 +742,8 @@ _mm_cmpneq_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLTSS / CMPNLTSS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLTSS / CMPNLTSS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float] containing one of the operands. The 
lower
@@ -762,7 +765,8 @@ _mm_cmpnlt_ss(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLTPS / CMPNLTPS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLTPS / CMPNLTPS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float].
@@ -783,7 +787,8 @@ _mm_cmpnlt_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLESS / CMPNLESS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLESS / CMPNLESS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float] containing one of the operands. The 
lower
@@ -805,7 +810,8 @@ _mm_cmpnle_ss(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLEPS / CMPNLEPS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLEPS / CMPNLEPS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float].
@@ -826,7 +832,8 @@ _mm_cmpnle_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLTSS / CMPNLTSS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLTSS / CMPNLTSS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float] containing one of the operands. The 
lower
@@ -850,7 +857,8 @@ _mm_cmpngt_ss(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLTPS / CMPNLTPS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLTPS / CMPNLTPS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float].
@@ -871,7 +879,8 @@ _mm_cmpngt_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLESS / CMPNLESS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLESS / CMPNLESS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float] containing one of the operands. The 
lower
@@ -895,7 +904,8 @@ _mm_cmpnge_ss(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPNLEPS / CMPNLEPS  
instructions.
+/// This intrinsic corresponds to the  VCMPNLEPS / CMPNLEPS 
+///   instructions.
 ///
 /// \param __a
 ///A 128-bit vector of [4 x float].
@@ -916,7 +926,8 @@ _mm_cmpnge_ps(__m128 __a, __m128 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to 

r290561 - [DOXYGEN] Improved doxygen comments for x86 intrinsics.

2016-12-26 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Mon Dec 26 18:49:38 2016
New Revision: 290561

URL: http://llvm.org/viewvc/llvm-project?rev=290561=rev
Log:
[DOXYGEN] Improved doxygen comments for x86 intrinsics.

Improved doxygen comments for the following intrinsics headers:  
__wmmintrin_pclmul.h, bmiintrin.h, emmintrin.h, f16cintrin.h, immintrin.h, 
mmintrin.h, pmmintrin.h, tmmintrin.h

Added \n commands to insert a line breaks where necessary, since one long line 
of documentation is nearly unreadable.
Formatted comments to fit into 80 chars.
In some cases added \a command in front of the parameter names to display them 
in italics.




Modified:
cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
cfe/trunk/lib/Headers/bmiintrin.h
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/f16cintrin.h
cfe/trunk/lib/Headers/immintrin.h
cfe/trunk/lib/Headers/mmintrin.h
cfe/trunk/lib/Headers/pmmintrin.h
cfe/trunk/lib/Headers/tmmintrin.h

Modified: cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_pclmul.h?rev=290561=290560=290561=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_pclmul.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_pclmul.h Mon Dec 26 18:49:38 2016
@@ -42,12 +42,11 @@
 ///A 128-bit vector of [2 x i64] containing one of the source operands.
 /// \param __I
 ///An immediate value specifying which 64-bit values to select from the
-///operands.
-///Bit 0 is used to select a value from operand \a __X, and bit 4 is used
-///to select a value from operand \a __Y:
-///Bit[0]=0 indicates that bits[63:0] of operand \a __X are used.
-///Bit[0]=1 indicates that bits[127:64] of operand \a __X are used.
-///Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used.
+///operands. Bit 0 is used to select a value from operand \a __X, and bit
+///4 is used to select a value from operand \a __Y: \n
+///Bit[0]=0 indicates that bits[63:0] of operand \a __X are used. \n
+///Bit[0]=1 indicates that bits[127:64] of operand \a __X are used. \n
+///Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used. \n
 ///Bit[4]=1 indicates that bits[127:64] of operand \a __Y are used.
 /// \returns The 128-bit integer vector containing the result of the carry-less
 ///multiplication of the selected 64-bit values.

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=290561=290560=290561=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Mon Dec 26 18:49:38 2016
@@ -295,8 +295,8 @@ __tzcnt_u32(unsigned int __X)
 ///
 /// \param __X
 ///An unsigned 32-bit integer whose trailing zeros are to be counted.
-/// \returns An 32-bit integer containing the number of trailing zero
-///bits in the operand.
+/// \returns An 32-bit integer containing the number of trailing zero bits in
+///the operand.
 static __inline__ int __RELAXED_FN_ATTRS
 _mm_tzcnt_32(unsigned int __X)
 {
@@ -532,8 +532,8 @@ __tzcnt_u64(unsigned long long __X)
 ///
 /// \param __X
 ///An unsigned 64-bit integer whose trailing zeros are to be counted.
-/// \returns An 64-bit integer containing the number of trailing zero
-///bits in the operand.
+/// \returns An 64-bit integer containing the number of trailing zero bits in
+///the operand.
 static __inline__ long long __RELAXED_FN_ATTRS
 _mm_tzcnt_64(unsigned long long __X)
 {

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=290561=290560=290561=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Mon Dec 26 18:49:38 2016
@@ -551,7 +551,8 @@ _mm_cmpord_pd(__m128d __a, __m128d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VCMPUNORDPD / CMPUNORDPD  
instruction.
+/// This intrinsic corresponds to the  VCMPUNORDPD / CMPUNORDPD 
+///   instruction.
 ///
 /// \param __a
 ///A 128-bit vector of [2 x double].
@@ -734,10 +735,10 @@ _mm_cmple_sd(__m128d __a, __m128d __b)
   return (__m128d)__builtin_ia32_cmplesd((__v2df)__a, (__v2df)__b);
 }
 
-/// \brief Compares the lower double-precision floating-point values in each
-///of the two 128-bit floating-point vectors of [2 x double] to determine
-///if the value in the first parameter is greater than the corresponding
-///value in the second parameter. The comparison yields 0h for false,
+/// \brief Compares the lower double-precision floating-point values in each of
+///the two 128-bit floating-point vectors of [2 x double] to determine if
+///the value in the first parameter is greater than the corresponding value

r290458 - [DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.

2016-12-23 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Dec 23 17:36:26 2016
New Revision: 290458

URL: http://llvm.org/viewvc/llvm-project?rev=290458=rev
Log:
[DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.

Added \n commands to insert a line breaks where necessary to make the 
documentation more readable. 
Formatted comments to fit into 80 chars.


Modified:
cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=290458=290457=290458=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Fri Dec 23 17:36:26 2016
@@ -397,16 +397,16 @@ _mm256_rcp_ps(__m256 __a)
 ///An integer value that specifies the rounding operation. \n
 ///Bits [7:4] are reserved. \n
 ///Bit [3] is a precision exception value: \n
-///0: A normal PE exception is used. \n
-///1: The PE field is not updated. \n
+///  0: A normal PE exception is used. \n
+///  1: The PE field is not updated. \n
 ///Bit [2] is the rounding control source: \n
-///0: Use bits [1:0] of \a M. \n
-///1: Use the current MXCSR setting. \n
+///  0: Use bits [1:0] of \a M. \n
+///  1: Use the current MXCSR setting. \n
 ///Bits [1:0] contain the rounding control definition: \n
-///00: Nearest. \n
-///01: Downward (toward negative infinity). \n
-///10: Upward (toward positive infinity). \n
-///11: Truncated. 
+///  00: Nearest. \n
+///  01: Downward (toward negative infinity). \n
+///  10: Upward (toward positive infinity). \n
+///  11: Truncated.
 /// \returns A 256-bit vector of [4 x double] containing the rounded values.
 #define _mm256_round_pd(V, M) __extension__ ({ \
 (__m256d)__builtin_ia32_roundpd256((__v4df)(__m256d)(V), (M)); })
@@ -438,7 +438,7 @@ _mm256_rcp_ps(__m256 __a)
 ///  00: Nearest. \n
 ///  01: Downward (toward negative infinity). \n
 ///  10: Upward (toward positive infinity). \n
-///  11: Truncated. \n
+///  11: Truncated.
 /// \returns A 256-bit vector of [8 x float] containing the rounded values.
 #define _mm256_round_ps(V, M) __extension__ ({ \
   (__m256)__builtin_ia32_roundps256((__v8sf)(__m256)(V), (M)); })
@@ -767,18 +767,18 @@ _mm256_hsub_ps(__m256 __a, __m256 __b)
 /// \param __a
 ///A 128-bit vector of [2 x double].
 /// \param __c
-///\li A 128-bit integer vector operand specifying how the values are to be
-///copied.
-///\li Bit [1]:
-///\li 0: Bits [63:0] of the source are copied to bits [63:0] of the
-///returned vector.
-///\li 1: Bits [127:64] of the source are copied to bits [63:0] of the
-///returned vector.
-///\li Bit [65]:
-///\li 0: Bits [63:0] of the source are copied to bits [127:64] of the
-///returned vector.
-///\li 1: Bits [127:64] of the source are copied to bits [127:64] of the
-///returned vector.
+///A 128-bit integer vector operand specifying how the values are to be
+///copied. \n
+///Bit [1]: \n
+///  0: Bits [63:0] of the source are copied to bits [63:0] of the returned
+/// vector. \n
+///  1: Bits [127:64] of the source are copied to bits [63:0] of the
+/// returned vector. \n
+///Bit [65]: \n
+///  0: Bits [63:0] of the source are copied to bits [127:64] of the
+/// returned vector. \n
+///  1: Bits [127:64] of the source are copied to bits [127:64] of the
+/// returned vector.
 /// \returns A 128-bit vector of [2 x double] containing the copied values.
 static __inline __m128d __DEFAULT_FN_ATTRS
 _mm_permutevar_pd(__m128d __a, __m128i __c)
@@ -786,8 +786,8 @@ _mm_permutevar_pd(__m128d __a, __m128i _
   return (__m128d)__builtin_ia32_vpermilvarpd((__v2df)__a, (__v2di)__c);
 }
 
-/// \brief Copies the values in a 256-bit vector of [4 x double] as
-///specified by the 256-bit integer vector operand.
+/// \brief Copies the values in a 256-bit vector of [4 x double] as specified
+///by the 256-bit integer vector operand.
 ///
 /// \headerfile 
 ///
@@ -799,24 +799,24 @@ _mm_permutevar_pd(__m128d __a, __m128i _
 ///A 256-bit integer vector operand specifying how the values are to be
 ///copied. \n
 ///Bit [1]: \n
-///\li 0: Bits [63:0] of the source are copied to bits [63:0] of the
-///returned vector.
-///\li 1: Bits [127:64] of the source are copied to bits [63:0] of the
-///returned vector.
+///  0: Bits [63:0] of the source are copied to bits [63:0] of the returned
+/// vector. \n
+///  1: Bits [127:64] of the source are copied to bits [63:0] of the
+/// returned vector. \n
 ///Bit [65]: \n
-///\li 0: Bits [63:0] of the source are copied to bits [127:64] of the
-///returned vector.
-///\li 1: Bits [127:64] of the source are copied to bits [127:64] of the
-///returned vector.
-///Bit [129]: \n 
-/// 

r290455 - [DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.

2016-12-23 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Dec 23 16:47:16 2016
New Revision: 290455

URL: http://llvm.org/viewvc/llvm-project?rev=290455=rev
Log:
[DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.

Tagged parameter names with \a doxygen command to display parameters in italics.
Added \n commands to insert a line break to make the documentation more 
readable. 
Formatted comments to fit into 80 chars.


Modified:
cfe/trunk/lib/Headers/tmmintrin.h

Modified: cfe/trunk/lib/Headers/tmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/tmmintrin.h?rev=290455=290454=290455=diff
==
--- cfe/trunk/lib/Headers/tmmintrin.h (original)
+++ cfe/trunk/lib/Headers/tmmintrin.h Fri Dec 23 16:47:16 2016
@@ -483,15 +483,15 @@ _mm_hsubs_pi16(__m64 __a, __m64 __b)
 /// \param __b
 ///A 128-bit integer vector containing the second source operand.
 /// \returns A 128-bit integer vector containing the sums of products of both
-///operands:
-///R0 := (__a0 * __b0) + (__a1 * __b1)
-///R1 := (__a2 * __b2) + (__a3 * __b3)
-///R2 := (__a4 * __b4) + (__a5 * __b5)
-///R3 := (__a6 * __b6) + (__a7 * __b7)
-///R4 := (__a8 * __b8) + (__a9 * __b9)
-///R5 := (__a10 * __b10) + (__a11 * __b11)
-///R6 := (__a12 * __b12) + (__a13 * __b13)
-///R7 := (__a14 * __b14) + (__a15 * __b15)
+///operands: \n
+///\a R0 := (\a __a0 * \a __b0) + (\a __a1 * \a __b1) \n
+///\a R1 := (\a __a2 * \a __b2) + (\a __a3 * \a __b3) \n
+///\a R2 := (\a __a4 * \a __b4) + (\a __a5 * \a __b5) \n
+///\a R3 := (\a __a6 * \a __b6) + (\a __a7 * \a __b7) \n
+///\a R4 := (\a __a8 * \a __b8) + (\a __a9 * \a __b9) \n
+///\a R5 := (\a __a10 * \a __b10) + (\a __a11 * \a __b11) \n
+///\a R6 := (\a __a12 * \a __b12) + (\a __a13 * \a __b13) \n
+///\a R7 := (\a __a14 * \a __b14) + (\a __a15 * \a __b15)
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_maddubs_epi16(__m128i __a, __m128i __b)
 {
@@ -516,11 +516,11 @@ _mm_maddubs_epi16(__m128i __a, __m128i _
 /// \param __b
 ///A 64-bit integer vector containing the second source operand.
 /// \returns A 64-bit integer vector containing the sums of products of both
-///operands:
-///R0 := (__a0 * __b0) + (__a1 * __b1)
-///R1 := (__a2 * __b2) + (__a3 * __b3)
-///R2 := (__a4 * __b4) + (__a5 * __b5)
-///R3 := (__a6 * __b6) + (__a7 * __b7)
+///operands: \n
+///\a R0 := (\a __a0 * \a __b0) + (\a __a1 * \a __b1) \n
+///\a R1 := (\a __a2 * \a __b2) + (\a __a3 * \a __b3) \n
+///\a R2 := (\a __a4 * \a __b4) + (\a __a5 * \a __b5) \n
+///\a R3 := (\a __a6 * \a __b6) + (\a __a7 * \a __b7)
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_maddubs_pi16(__m64 __a, __m64 __b)
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r289159 - [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.

2016-12-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec  8 17:58:39 2016
New Revision: 289159

URL: http://llvm.org/viewvc/llvm-project?rev=289159=rev
Log:
[DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.

Tagged parameter names with \a doxygen command to display parameters in italics.
Formatted comments to fit into 80 chars.




Modified:
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=289159=289158=289159=diff
==
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Thu Dec  8 17:58:39 2016
@@ -1560,7 +1560,7 @@ _mm_cvtss_f32(__m128 __a)
   return __a[0];
 }
 
-/// \brief Loads two packed float values from the address __p into the
+/// \brief Loads two packed float values from the address \a __p into the
 /// high-order bits of a 128-bit vector of [4 x float]. The low-order bits
 /// are copied from the low-order bits of the first operand.
 ///
@@ -1587,9 +1587,9 @@ _mm_loadh_pi(__m128 __a, const __m64 *__
   return __builtin_shufflevector(__a, __bb, 0, 1, 4, 5);
 }
 
-/// \brief Loads two packed float values from the address __p into the 
low-order
-///bits of a 128-bit vector of [4 x float]. The high-order bits are copied
-///from the high-order bits of the first operand.
+/// \brief Loads two packed float values from the address \a __p into the
+///low-order bits of a 128-bit vector of [4 x float]. The high-order bits
+///are copied from the high-order bits of the first operand.
 ///
 /// \headerfile 
 ///
@@ -1965,7 +1965,7 @@ _mm_store_ps(float *__p, __m128 __a)
 ///A pointer to a 128-bit memory location.
 /// \param __a
 ///A 128-bit vector of [4 x float] whose lower 32 bits are stored to each
-///of the four contiguous elements pointed by __p.
+///of the four contiguous elements pointed by \a __p.
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm_store1_ps(float *__p, __m128 __a)
 {
@@ -1985,7 +1985,7 @@ _mm_store1_ps(float *__p, __m128 __a)
 ///A pointer to a 128-bit memory location.
 /// \param __a
 ///A 128-bit vector of [4 x float] whose lower 32 bits are stored to each
-///of the four contiguous elements pointed by __p.
+///of the four contiguous elements pointed by \a __p.
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm_store_ps1(float *__p, __m128 __a)
 {
@@ -2114,9 +2114,9 @@ void _mm_sfence(void);
 ///
 /// This intrinsic corresponds to the \c VPEXTRW / PEXTRW instruction.
 ///
-/// \param __a
+/// \param a
 ///A 64-bit vector of [4 x i16].
-/// \param __n
+/// \param n
 ///An immediate integer operand that determines which bits are extracted:
 ///0: Bits [15:0] are copied to the destination.
 ///1: Bits [31:16] are copied to the destination.
@@ -2128,7 +2128,7 @@ void _mm_sfence(void);
 
 /// \brief Copies data from the 64-bit vector of [4 x i16] to the destination,
 ///and inserts the lower 16-bits of an integer operand at the 16-bit offset
-///specified by the immediate operand __n.
+///specified by the immediate operand \a n.
 ///
 /// \headerfile 
 ///
@@ -2138,12 +2138,12 @@ void _mm_sfence(void);
 ///
 /// This intrinsic corresponds to the \c VPINSRW / PINSRW instruction.
 ///
-/// \param __a
+/// \param a
 ///A 64-bit vector of [4 x i16].
-/// \param __d
+/// \param d
 ///An integer. The lower 16-bit value from this operand is written to the
-///destination at the offset specified by operand __n.
-/// \param __n
+///destination at the offset specified by operand \a n.
+/// \param n
 ///An immediate integer operant that determines which the bits to be used
 ///in the destination.
 ///0: Bits [15:0] are copied to the destination.
@@ -2151,7 +2151,7 @@ void _mm_sfence(void);
 ///2: Bits [47:32] are copied to the destination.
 ///3: Bits [63:48] are copied to the destination.
 ///The remaining bits in the destination are copied from the corresponding
-///bits in operand __a.
+///bits in operand \a a.
 /// \returns A 64-bit integer vector containing the copied packed data from the
 ///operands.
 #define _mm_insert_pi16(a, d, n) __extension__ ({ \
@@ -2285,17 +2285,17 @@ _mm_mulhi_pu16(__m64 __a, __m64 __b)
 ///A 64-bit integer vector containing the values to be shuffled.
 /// \param n
 ///An immediate value containing an 8-bit value specifying which elements 
to
-///copy from a. The destinations within the 64-bit destination are assigned
-///values as follows:
+///copy from \a a. The destinations within the 64-bit destination are
+///assigned values as follows:
 ///Bits [1:0] are used to assign values to bits [15:0] in the destination.
 ///Bits [3:2] are used to assign values to bits [31:16] in the destination.
 ///Bits [5:4] are used to assign values to bits [47:32] in the destination.
 ///Bits [7:6] 

r289154 - [DOXYGEN] Improved doxygen comments.

2016-12-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec  8 17:32:07 2016
New Revision: 289154

URL: http://llvm.org/viewvc/llvm-project?rev=289154=rev
Log:
[DOXYGEN] Improved doxygen comments.

Improved doxygen comments for fxsrintrin.h and mmintrin.h intrinsics by 
taagging parameter names with \a doxygen command to display parameters in 
italics.

Formatted comments to fit into 80 chars.



Modified:
cfe/trunk/lib/Headers/fxsrintrin.h
cfe/trunk/lib/Headers/mmintrin.h

Modified: cfe/trunk/lib/Headers/fxsrintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/fxsrintrin.h?rev=289154=289153=289154=diff
==
--- cfe/trunk/lib/Headers/fxsrintrin.h (original)
+++ cfe/trunk/lib/Headers/fxsrintrin.h Thu Dec  8 17:32:07 2016
@@ -31,7 +31,7 @@
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  
__target__("fxsr")))
 
 /// \brief Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
-///memory region pointed to by the input parameter __p.
+///memory region pointed to by the input parameter \a __p.
 ///
 /// \headerfile 
 ///
@@ -47,9 +47,9 @@ _fxsave(void *__p)
 }
 
 /// \brief Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
-///memory region pointed to by the input parameter __p. The contents of 
this
-///memory region should have been written to by a previous _fxsave or
-///_fxsave64 intrinsic.
+///memory region pointed to by the input parameter \a __p. The contents of
+///this memory region should have been written to by a previous \c _fxsave
+///or \c _fxsave64 intrinsic.
 ///
 /// \headerfile 
 ///
@@ -66,7 +66,7 @@ _fxrstor(void *__p)
 
 #ifdef __x86_64__
 /// \brief Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
-///memory region pointed to by the input parameter__p.
+///memory region pointed to by the input parameter \a __p.
 ///
 /// \headerfile 
 ///
@@ -82,9 +82,9 @@ _fxsave64(void *__p)
 }
 
 /// \brief Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
-///memory region pointed to by the input parameter __p. The contents of 
this
-///memory region should have been written to by a previous _fxsave or
-///_fxsave64 intrinsic.
+///memory region pointed to by the input parameter \a __p. The contents of
+///this memory region should have been written to by a previous \c _fxsave
+///or \c _fxsave64 intrinsic.
 ///
 /// \headerfile 
 ///

Modified: cfe/trunk/lib/Headers/mmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/mmintrin.h?rev=289154=289153=289154=diff
==
--- cfe/trunk/lib/Headers/mmintrin.h (original)
+++ cfe/trunk/lib/Headers/mmintrin.h Thu Dec  8 17:32:07 2016
@@ -734,7 +734,8 @@ _mm_mullo_pi16(__m64 __m1, __m64 __m2)
 /// \param __count
 ///A 64-bit integer vector interpreted as a single 64-bit integer.
 /// \returns A 64-bit integer vector of [4 x i16] containing the left-shifted
-///values. If __count is greater or equal to 16, the result is set to all 
0.
+///values. If \a __count is greater or equal to 16, the result is set to 
all
+///0.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_sll_pi16(__m64 __m, __m64 __count)
 {
@@ -755,7 +756,8 @@ _mm_sll_pi16(__m64 __m, __m64 __count)
 /// \param __count
 ///A 32-bit integer value.
 /// \returns A 64-bit integer vector of [4 x i16] containing the left-shifted
-///values. If __count is greater or equal to 16, the result is set to all 
0.
+///values. If \a __count is greater or equal to 16, the result is set to 
all
+///0.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_slli_pi16(__m64 __m, int __count)
 {
@@ -777,7 +779,8 @@ _mm_slli_pi16(__m64 __m, int __count)
 /// \param __count
 ///A 64-bit integer vector interpreted as a single 64-bit integer.
 /// \returns A 64-bit integer vector of [2 x i32] containing the left-shifted
-///values. If __count is greater or equal to 32, the result is set to all 
0.
+///values. If \a __count is greater or equal to 32, the result is set to 
all
+///0.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_sll_pi32(__m64 __m, __m64 __count)
 {
@@ -798,7 +801,8 @@ _mm_sll_pi32(__m64 __m, __m64 __count)
 /// \param __count
 ///A 32-bit integer value.
 /// \returns A 64-bit integer vector of [2 x i32] containing the left-shifted
-///values. If __count is greater or equal to 32, the result is set to all 
0.
+///values. If \a __count is greater or equal to 32, the result is set to 
all
+///0.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_slli_pi32(__m64 __m, int __count)
 {
@@ -818,7 +822,7 @@ _mm_slli_pi32(__m64 __m, int __count)
 /// \param __count
 ///A 64-bit integer vector interpreted as a single 64-bit integer.
 /// \returns A 64-bit integer vector containing the left-shifted value. If
-/// __count is greater or 

r289116 - [DOXYGEN] Improved doxygen comments for emmintrin.h intrinsics.

2016-12-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec  8 16:10:51 2016
New Revision: 289116

URL: http://llvm.org/viewvc/llvm-project?rev=289116=rev
Log:
[DOXYGEN] Improved doxygen comments for emmintrin.h intrinsics.

Tagged parameter names with \a doxygen command to display parameters in italics.
Formatted comments to fit into 80 chars.



Modified:
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=289116=289115=289116=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Dec  8 16:10:51 2016
@@ -232,8 +232,8 @@ _mm_div_pd(__m128d __a, __m128d __b)
 ///A 128-bit vector of [2 x double] containing one of the operands. The
 ///square root is calculated using the lower 64 bits of this operand.
 /// \returns A 128-bit vector of [2 x double] whose lower 64 bits contain the
-///square root of the lower 64 bits of operand __b, and whose upper 64 bits
-///are copied from the upper 64 bits of operand __a.
+///square root of the lower 64 bits of operand \a __b, and whose upper 64
+///bits are copied from the upper 64 bits of operand \a __a.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_sqrt_sd(__m128d __a, __m128d __b)
 {
@@ -674,12 +674,12 @@ _mm_cmpnge_pd(__m128d __a, __m128d __b)
 ///
 /// \param __a
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __b.
+///compared to the lower double-precision value of \a __b.
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __a.
+///compared to the lower double-precision value of \a __a.
 /// \returns A 128-bit vector. The lower 64 bits contains the comparison
-///results. The upper 64 bits are copied from the upper 64 bits of __a.
+///results. The upper 64 bits are copied from the upper 64 bits of \a __a.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cmpeq_sd(__m128d __a, __m128d __b)
 {
@@ -698,12 +698,12 @@ _mm_cmpeq_sd(__m128d __a, __m128d __b)
 ///
 /// \param __a
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __b.
+///compared to the lower double-precision value of \a __b.
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __a.
+///compared to the lower double-precision value of \a __a.
 /// \returns A 128-bit vector. The lower 64 bits contains the comparison
-///results. The upper 64 bits are copied from the upper 64 bits of __a.
+///results. The upper 64 bits are copied from the upper 64 bits of \a __a.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cmplt_sd(__m128d __a, __m128d __b)
 {
@@ -722,12 +722,12 @@ _mm_cmplt_sd(__m128d __a, __m128d __b)
 ///
 /// \param __a
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __b.
+///compared to the lower double-precision value of \a __b.
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __a.
+///compared to the lower double-precision value of \a __a.
 /// \returns A 128-bit vector. The lower 64 bits contains the comparison
-///results. The upper 64 bits are copied from the upper 64 bits of __a.
+///results. The upper 64 bits are copied from the upper 64 bits of \a __a.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cmple_sd(__m128d __a, __m128d __b)
 {
@@ -746,12 +746,12 @@ _mm_cmple_sd(__m128d __a, __m128d __b)
 ///
 /// \param __a
 /// A 128-bit vector of [2 x double]. The lower double-precision value is
-/// compared to the lower double-precision value of __b.
+/// compared to the lower double-precision value of \a __b.
 /// \param __b
 /// A 128-bit vector of [2 x double]. The lower double-precision value is
-/// compared to the lower double-precision value of __a.
+/// compared to the lower double-precision value of \a __a.
 /// \returns A 128-bit vector. The lower 64 bits contains the comparison
-/// results. The upper 64 bits are copied from the upper 64 bits of __a.
+/// results. The upper 64 bits are copied from the upper 64 bits of \a __a.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cmpgt_sd(__m128d __a, __m128d __b)
 {
@@ -771,12 +771,12 @@ _mm_cmpgt_sd(__m128d __a, __m128d __b)
 ///
 /// \param __a
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
-///compared to the lower double-precision value of __b.
+///compared to the lower double-precision value of \a __b.
 /// \param __b
 ///A 128-bit 

r289083 - [DOXYGEN] Improved doxygen comments.

2016-12-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec  8 11:57:23 2016
New Revision: 289083

URL: http://llvm.org/viewvc/llvm-project?rev=289083=rev
Log:
[DOXYGEN] Improved doxygen comments.

Improved doxygen comments for __wmmintrin_pclmul.h and ammintrin.h intrinsics 
by taagging parameter names with \a doxygen command to display parameters in 
italics.

Formatted comments to fit into 80 chars.




Modified:
cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
cfe/trunk/lib/Headers/ammintrin.h

Modified: cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_pclmul.h?rev=289083=289082=289083=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_pclmul.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_pclmul.h Thu Dec  8 11:57:23 2016
@@ -43,12 +43,12 @@
 /// \param __I
 ///An immediate value specifying which 64-bit values to select from the
 ///operands.
-///Bit 0 is used to select a value from operand __X,
-///and bit 4 is used to select a value from operand __Y:
-///Bit[0]=0 indicates that bits[63:0] of operand __X are used.
-///Bit[0]=1 indicates that bits[127:64] of operand __X are used.
-///Bit[4]=0 indicates that bits[63:0] of operand __Y are used.
-///Bit[4]=1 indicates that bits[127:64] of operand __Y are used.
+///Bit 0 is used to select a value from operand \a __X, and bit 4 is used
+///to select a value from operand \a __Y:
+///Bit[0]=0 indicates that bits[63:0] of operand \a __X are used.
+///Bit[0]=1 indicates that bits[127:64] of operand \a __X are used.
+///Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used.
+///Bit[4]=1 indicates that bits[127:64] of operand \a __Y are used.
 /// \returns The 128-bit integer vector containing the result of the carry-less
 ///multiplication of the selected 64-bit values.
 #define _mm_clmulepi64_si128(__X, __Y, __I) \

Modified: cfe/trunk/lib/Headers/ammintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ammintrin.h?rev=289083=289082=289083=diff
==
--- cfe/trunk/lib/Headers/ammintrin.h (original)
+++ cfe/trunk/lib/Headers/ammintrin.h Thu Dec  8 11:57:23 2016
@@ -30,7 +30,7 @@
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("sse4a")))
 
 /// \brief Extracts the specified bits from the lower 64 bits of the 128-bit
-///integer vector operand at the index idx and of the length len.
+///integer vector operand at the index \a idx and of the length \a len.
 ///
 /// \headerfile 
 ///
@@ -49,8 +49,8 @@
 ///Bits [5:0] specify the index of the least significant bit; the other
 ///bits are ignored. If the sum of the index and length is greater than 64,
 ///the result is undefined. If the length and index are both zero, bits
-///[63:0] of parameter x are extracted. If the length is zero but the index
-///is non-zero, the result is undefined.
+///[63:0] of parameter \a x are extracted. If the length is zero but the
+///index is non-zero, the result is undefined.
 /// \returns A 128-bit integer vector whose lower 64 bits contain the bits
 ///extracted from the source operand.
 #define _mm_extracti_si64(x, len, idx) \
@@ -58,7 +58,8 @@
   (char)(len), (char)(idx)))
 
 /// \brief Extracts the specified bits from the lower 64 bits of the 128-bit
-///integer vector operand at the index and of the length specified by __y.
+///integer vector operand at the index and of the length specified by
+///\a __y.
 ///
 /// \headerfile 
 ///
@@ -71,8 +72,8 @@
 ///length at [5:0]; all other bits are ignored. If bits [5:0] are zero, the
 ///length is interpreted as 64. If the sum of the index and length is
 ///greater than 64, the result is undefined. If the length and index are
-///both zero, bits [63:0] of parameter __x are extracted. If the length is
-///zero but the index is non-zero, the result is undefined.
+///both zero, bits [63:0] of parameter \a __x are extracted. If the length
+///is zero but the index is non-zero, the result is undefined.
 /// \returns A 128-bit vector whose lower 64 bits contain the bits extracted
 ///from the source operand.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
@@ -81,9 +82,9 @@ _mm_extract_si64(__m128i __x, __m128i __
   return (__m128i)__builtin_ia32_extrq((__v2di)__x, (__v16qi)__y);
 }
 
-/// \brief Inserts bits of a specified length from the source integer vector y
-///into the lower 64 bits of the destination integer vector x at the index
-///idx and of the length len.
+/// \brief Inserts bits of a specified length from the source integer vector
+///\a y into the lower 64 bits of the destination integer vector \a x at
+///the index \a idx and of the length \a len.
 ///
 /// \headerfile 
 ///
@@ -96,11 

r289022 - [DOXYGEN] Improved doxygen comments for avxintrin.h intrinsics.

2016-12-07 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Dec  7 22:09:17 2016
New Revision: 289022

URL: http://llvm.org/viewvc/llvm-project?rev=289022=rev
Log:
[DOXYGEN] Improved doxygen comments for avxintrin.h intrinsics.

Tagged parameter names with \a doxygen command to display them in italics.
Formatted comments to fit into 80 chars.



Modified:
cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=289022=289021=289022=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Wed Dec  7 22:09:17 2016
@@ -400,7 +400,7 @@ _mm256_rcp_ps(__m256 __a)
 ///0: A normal PE exception is used. \n
 ///1: The PE field is not updated. \n
 ///Bit [2] is the rounding control source: \n
-///0: Use bits [1:0] of M. \n
+///0: Use bits [1:0] of \a M. \n
 ///1: Use the current MXCSR setting. \n
 ///Bits [1:0] contain the rounding control definition: \n
 ///00: Nearest. \n
@@ -432,7 +432,7 @@ _mm256_rcp_ps(__m256 __a)
 ///  0: A normal PE exception is used. \n
 ///  1: The PE field is not updated. \n
 ///Bit [2] is the rounding control source: \n
-///  0: Use bits [1:0] of M. \n
+///  0: Use bits [1:0] of \a M. \n
 ///  1: Use the current MXCSR setting. \n
 ///Bits [1:0] contain the rounding control definition: \n
 ///  00: Nearest. \n
@@ -1242,22 +1242,22 @@ _mm256_permutevar_ps(__m256 __a, __m256i
 ///An immediate integer operand specifying how the values are to be
 ///permuted.
 ///Bits [1:0]:
-///00: Bits [127:0] of operand V1 are copied to bits [127:0] of the
+///00: Bits [127:0] of operand \a V1 are copied to bits [127:0] of the
 ///destination.
-///01: Bits [255:128] of operand V1 are copied to bits [127:0] of the
+///01: Bits [255:128] of operand \a V1 are copied to bits [127:0] of the
 ///destination.
-///10: Bits [127:0] of operand V2 are copied to bits [127:0] of the
+///10: Bits [127:0] of operand \a V2 are copied to bits [127:0] of the
 ///destination.
-///11: Bits [255:128] of operand V2 are copied to bits [127:0] of the
+///11: Bits [255:128] of operand \a V2 are copied to bits [127:0] of the
 ///destination.
 ///Bits [5:4]:
-///00: Bits [127:0] of operand V1 are copied to bits [255:128] of the
+///00: Bits [127:0] of operand \a V1 are copied to bits [255:128] of the
+///destination. 
+///01: Bits [255:128] of operand \a V1 are copied to bits [255:128] of the
 ///destination.
-///01: Bits [255:128] of operand V1 are copied to bits [255:128] of the
+///10: Bits [127:0] of operand \a V2 are copied to bits [255:128] of the
 ///destination.
-///10: Bits [127:0] of operand V2 are copied to bits [255:128] of the
-///destination.
-///11: Bits [255:128] of operand V2 are copied to bits [255:128] of the
+///11: Bits [255:128] of operand \a V2 are copied to bits [255:128] of the
 ///destination.
 /// \returns A 256-bit vector of [4 x double] containing the copied values.
 #define _mm256_permute2f128_pd(V1, V2, M) __extension__ ({ \
@@ -1283,22 +1283,22 @@ _mm256_permutevar_ps(__m256 __a, __m256i
 ///An immediate integer operand specifying how the values are to be
 ///permuted.
 ///Bits [1:0]:
-///00: Bits [127:0] of operand V1 are copied to bits [127:0] of the
+///00: Bits [127:0] of operand \a V1 are copied to bits [127:0] of the
 ///destination.
-///01: Bits [255:128] of operand V1 are copied to bits [127:0] of the
+///01: Bits [255:128] of operand \a V1 are copied to bits [127:0] of the
 ///destination.
-///10: Bits [127:0] of operand V2 are copied to bits [127:0] of the
+///10: Bits [127:0] of operand \a V2 are copied to bits [127:0] of the
 ///destination.
-///11: Bits [255:128] of operand V2 are copied to bits [127:0] of the
+///11: Bits [255:128] of operand \a V2 are copied to bits [127:0] of the
 ///destination.
 ///Bits [5:4]:
-///00: Bits [127:0] of operand V1 are copied to bits [255:128] of the
+///00: Bits [127:0] of operand \a V1 are copied to bits [255:128] of the
 ///destination.
-///01: Bits [255:128] of operand V1 are copied to bits [255:128] of the
+///01: Bits [255:128] of operand \a V1 are copied to bits [255:128] of the
 ///destination.
-///10: Bits [127:0] of operand V2 are copied to bits [255:128] of the
+///10: Bits [127:0] of operand \a V2 are copied to bits [255:128] of the
 ///destination.
-///11: Bits [255:128] of operand V2 are copied to bits [255:128] of the
+///11: Bits [255:128] of operand \a V2 are copied to bits [255:128] of the
 ///destination.
 /// \returns A 256-bit vector of [8 x float] containing the copied values.
 #define _mm256_permute2f128_ps(V1, V2, M) 

r287990 - [DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.

2016-11-26 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Sat Nov 26 13:38:19 2016
New Revision: 287990

URL: http://llvm.org/viewvc/llvm-project?rev=287990=rev
Log:
[DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.

Documentation for some of the avxintrin.h's intrinsics errorneously said that
non VEX-prefixed instructions could be generated. This was fixed.

I tried several different solutions to achieve pretty printing of unordered 
lists (nested and non-nested) in param sections in doxygen. 


Modified:
cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=287990=287989=287990=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Sat Nov 26 13:38:19 2016
@@ -57,7 +57,7 @@ typedef long long __m256i __attribute__(
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VADDPD / ADDPD instruction.
+/// This intrinsic corresponds to the \c VADDPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing one of the source operands.
@@ -75,7 +75,7 @@ _mm256_add_pd(__m256d __a, __m256d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VADDPS / ADDPS instruction.
+/// This intrinsic corresponds to the \c VADDPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing one of the source operands.
@@ -93,7 +93,7 @@ _mm256_add_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VSUBPD / SUBPD instruction.
+/// This intrinsic corresponds to the \c VSUBPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing the minuend.
@@ -111,7 +111,7 @@ _mm256_sub_pd(__m256d __a, __m256d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VSUBPS / SUBPS instruction.
+/// This intrinsic corresponds to the \c VSUBPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing the minuend.
@@ -130,7 +130,7 @@ _mm256_sub_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VADDSUBPD / ADDSUBPD instruction.
+/// This intrinsic corresponds to the \c VADDSUBPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing the left source operand.
@@ -149,7 +149,7 @@ _mm256_addsub_pd(__m256d __a, __m256d __
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VADDSUBPS / ADDSUBPS instruction.
+/// This intrinsic corresponds to the \c VADDSUBPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing the left source operand.
@@ -167,7 +167,7 @@ _mm256_addsub_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VDIVPD / DIVPD instruction.
+/// This intrinsic corresponds to the \c VDIVPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing the dividend.
@@ -185,7 +185,7 @@ _mm256_div_pd(__m256d __a, __m256d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VDIVPS / DIVPS instruction.
+/// This intrinsic corresponds to the \c VDIVPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing the dividend.
@@ -204,7 +204,7 @@ _mm256_div_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VMAXPD / MAXPD instruction.
+/// This intrinsic corresponds to the \c VMAXPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing one of the operands.
@@ -223,7 +223,7 @@ _mm256_max_pd(__m256d __a, __m256d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VMAXPS / MAXPS instruction.
+/// This intrinsic corresponds to the \c VMAXPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing one of the operands.
@@ -242,7 +242,7 @@ _mm256_max_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VMINPD / MINPD instruction.
+/// This intrinsic corresponds to the \c VMINPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing one of the operands.
@@ -261,7 +261,7 @@ _mm256_min_pd(__m256d __a, __m256d __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VMINPS / MINPS instruction.
+/// This intrinsic corresponds to the \c VMINPS instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [8 x float] containing one of the operands.
@@ -279,7 +279,7 @@ _mm256_min_ps(__m256 __a, __m256 __b)
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the \c VMULPD / MULPD instruction.
+/// This intrinsic corresponds to the \c VMULPD instruction.
 ///
 /// \param __a
 ///A 256-bit vector of [4 x double] containing one of the operands.
@@ -297,7 +297,7 @@ 

r287483 - Add doxygen comments to immintrin.h's intrinsics.

2016-11-20 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Sun Nov 20 02:35:05 2016
New Revision: 287483

URL: http://llvm.org/viewvc/llvm-project?rev=287483=rev
Log:
Add doxygen comments to immintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Charles Li.


Modified:
cfe/trunk/lib/Headers/immintrin.h

Modified: cfe/trunk/lib/Headers/immintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/immintrin.h?rev=287483=287482=287483=diff
==
--- cfe/trunk/lib/Headers/immintrin.h (original)
+++ cfe/trunk/lib/Headers/immintrin.h Sun Nov 20 02:35:05 2016
@@ -69,9 +69,44 @@
Intel documents these as being in immintrin.h, and
they depend on typedefs from avxintrin.h. */
 
+/// \brief Converts a 256-bit vector of [8 x float] into a 128-bit vector
+///containing 16-bit half-precision float values.
+///
+/// \headerfile 
+///
+/// \code
+/// __m128i _mm256_cvtps_ph(__m256 a, const int imm);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c VCVTPS2PH instruction.
+///
+/// \param a
+///A 256-bit vector containing 32-bit single-precision float values to be
+///converted to 16-bit half-precision float values.
+/// \param imm
+///An immediate value controlling rounding using bits [2:0]:
+///000: Nearest
+///001: Down
+///010: Up
+///011: Truncate
+///1XX: Use MXCSR.RC for rounding
+/// \returns A 128-bit vector containing the converted 16-bit half-precision
+///float values.
 #define _mm256_cvtps_ph(a, imm) __extension__ ({ \
  (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)(__m256)(a), (imm)); })
 
+/// \brief Converts a 128-bit vector containing 16-bit half-precision float
+///values into a 256-bit vector of [8 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPH2PS instruction.
+///
+/// \param __a
+///A 128-bit vector containing 16-bit half-precision float values to be
+///converted to 32-bit single-precision float values.
+/// \returns A vector of [8 x float] containing the converted 32-bit
+///single-precision float values.
 static __inline __m256 __attribute__((__always_inline__, __nodebug__, 
__target__("f16c")))
 _mm256_cvtph_ps(__m128i __a)
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r287436 - Doxygen comments for avxintrin.h.

2016-11-18 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Nov 18 22:59:08 2016
New Revision: 287436

URL: http://llvm.org/viewvc/llvm-project?rev=287436=rev
Log:
Doxygen comments for avxintrin.h.

Added doxygen comments to avxintrin.h's intrinsics. As of now, all the 
intrinsics in this file that were documented by Sony's intrinsics guide should 
have corresponding doxygen comments.

Note: The doxygen comments are automatically generated based on Sony's intrinsic
s document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.

Reviewed by Wolfgang Pieb.


Modified:
cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=287436=287435=287436=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Fri Nov 18 22:59:08 2016
@@ -2108,24 +2108,66 @@ _mm256_cvtps_epi32(__m256 __a)
   return (__m256i)__builtin_ia32_cvtps2dq256((__v8sf) __a);
 }
 
+/// \brief Converts a 128-bit vector of [4 x float] into a 256-bit vector of [4
+///x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPS2PD instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \returns A 256-bit vector of [4 x double] containing the converted values.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_cvtps_pd(__m128 __a)
 {
   return (__m256d)__builtin_convertvector((__v4sf)__a, __v4df);
 }
 
+/// \brief Converts a 256-bit vector of [4 x double] into a 128-bit vector of 
[4
+///x i32], truncating the result by rounding towards zero when it is
+///inexact.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTTPD2DQ instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double].
+/// \returns A 128-bit integer vector containing the converted values.
 static __inline __m128i __DEFAULT_FN_ATTRS
 _mm256_cvttpd_epi32(__m256d __a)
 {
   return (__m128i)__builtin_ia32_cvttpd2dq256((__v4df) __a);
 }
 
+/// \brief Converts a 256-bit vector of [4 x double] into a 128-bit vector of 
[4
+///x i32]. When a conversion is inexact, the value returned is rounded
+///according to the rounding control bits in the MXCSR register.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPD2DQ instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double].
+/// \returns A 128-bit integer vector containing the converted values.
 static __inline __m128i __DEFAULT_FN_ATTRS
 _mm256_cvtpd_epi32(__m256d __a)
 {
   return (__m128i)__builtin_ia32_cvtpd2dq256((__v4df) __a);
 }
 
+/// \brief Converts a vector of [8 x float] into a vector of [8 x i32],
+///truncating the result by rounding towards zero when it is inexact.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTTPS2DQ instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float].
+/// \returns A 256-bit integer vector containing the converted values.
 static __inline __m256i __DEFAULT_FN_ATTRS
 _mm256_cvttps_epi32(__m256 __a)
 {
@@ -2152,18 +2194,72 @@ _mm256_cvtss_f32(__m256 __a)
 }
 
 /* Vector replicate */
+/// \brief Moves and duplicates high-order (odd-indexed) values from a 256-bit
+///vector of [8 x float] to float values in a 256-bit vector of [8 x 
float].
+///Bits [255:224] of __a are written to bits [255:224] and [223:192]
+///of the return value.
+///Bits [191:160] of __a are written to bits [191:160] and [159:128]
+///of the return value.
+///Bits [127:96] of __a are written to bits [127:96] and [95:64] of
+///the return value.
+///Bits [63:32] of __a are written to bits [63:32] and [31:0] of the
+///return value.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVSHDUP instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float].
+/// \returns A 256-bit vector of [8 x float] containing the moved and 
duplicated
+///values.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_movehdup_ps(__m256 __a)
 {
   return __builtin_shufflevector((__v8sf)__a, (__v8sf)__a, 1, 1, 3, 3, 5, 5, 
7, 7);
 }
 
+/// \brief Moves and duplicates low-order (even-indexed) values from a 256-bit
+///vector of [8 x float] to float values in a 256-bit vector of [8 x 
float].
+///Bits [223:192] of __a are written to bits [255:224] and [223:192]
+///of the return value.
+///Bits [159:128] of __a are written to bits [191:160] and [159:128]
+///of the return value.
+///Bits [95:64] of __a are written to bits [127:96] and [95:64] of
+///the return value.
+///Bits [31:0] of __a are written to bits [63:32] and [31:0] of the
+///return value.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVSLDUP instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float].
+/// \returns A 256-bit vector 

r287317 - Add doxygen comments for lzcntintrin.h's intrinsics.

2016-11-17 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Nov 18 00:26:01 2016
New Revision: 287317

URL: http://llvm.org/viewvc/llvm-project?rev=287317=rev
Log:
Add doxygen comments for lzcntintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Charles Li.



Modified:
cfe/trunk/lib/Headers/lzcntintrin.h

Modified: cfe/trunk/lib/Headers/lzcntintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/lzcntintrin.h?rev=287317=287316=287317=diff
==
--- cfe/trunk/lib/Headers/lzcntintrin.h (original)
+++ cfe/trunk/lib/Headers/lzcntintrin.h Fri Nov 18 00:26:01 2016
@@ -31,18 +31,48 @@
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("lzcnt")))
 
+/// \brief Counts the number of leading zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c LZCNT instruction.
+///
+/// \param __X
+///An unsigned 16-bit integer whose leading zeros are to be counted.
+/// \returns An unsigned 16-bit integer containing the number of leading zero
+///bits in the operand.
 static __inline__ unsigned short __DEFAULT_FN_ATTRS
 __lzcnt16(unsigned short __X)
 {
   return __X ? __builtin_clzs(__X) : 16;
 }
 
+/// \brief Counts the number of leading zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c LZCNT instruction.
+///
+/// \param __X
+///An unsigned 32-bit integer whose leading zeros are to be counted.
+/// \returns An unsigned 32-bit integer containing the number of leading zero
+///bits in the operand.
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 __lzcnt32(unsigned int __X)
 {
   return __X ? __builtin_clz(__X) : 32;
 }
 
+/// \brief Counts the number of leading zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c LZCNT instruction.
+///
+/// \param __X
+///An unsigned 32-bit integer whose leading zeros are to be counted.
+/// \returns An unsigned 32-bit integer containing the number of leading zero
+///bits in the operand.
 static __inline__ unsigned int __DEFAULT_FN_ATTRS
 _lzcnt_u32(unsigned int __X)
 {
@@ -50,12 +80,32 @@ _lzcnt_u32(unsigned int __X)
 }
 
 #ifdef __x86_64__
+/// \brief Counts the number of leading zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c LZCNT instruction.
+///
+/// \param __X
+///An unsigned 64-bit integer whose leading zeros are to be counted.
+/// \returns An unsigned 64-bit integer containing the number of leading zero
+///bits in the operand.
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 __lzcnt64(unsigned long long __X)
 {
   return __X ? __builtin_clzll(__X) : 64;
 }
 
+/// \brief Counts the number of leading zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c LZCNT instruction.
+///
+/// \param __X
+///An unsigned 64-bit integer whose leading zeros are to be counted.
+/// \returns An unsigned 64-bit integer containing the number of leading zero
+///bits in the operand.
 static __inline__ unsigned long long __DEFAULT_FN_ATTRS
 _lzcnt_u64(unsigned long long __X)
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r287295 - Add doxygen comments to fxsrintrin.h's intrinsics.

2016-11-17 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Nov 17 19:42:01 2016
New Revision: 287295

URL: http://llvm.org/viewvc/llvm-project?rev=287295=rev
Log:
Add doxygen comments to fxsrintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Paul Robinson and 
Charles Li.


Modified:
cfe/trunk/lib/Headers/fxsrintrin.h

Modified: cfe/trunk/lib/Headers/fxsrintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/fxsrintrin.h?rev=287295=287294=287295=diff
==
--- cfe/trunk/lib/Headers/fxsrintrin.h (original)
+++ cfe/trunk/lib/Headers/fxsrintrin.h Thu Nov 17 19:42:01 2016
@@ -30,24 +30,72 @@
 
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  
__target__("fxsr")))
 
+/// \brief Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
+///memory region pointed to by the input parameter __p.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c FXSAVE instruction.
+///
+/// \param __p
+///A pointer to a 512-byte memory region. The beginning of this memory
+///region should be aligned on a 16-byte boundary.
 static __inline__ void __DEFAULT_FN_ATTRS
-_fxsave(void *__p) {
+_fxsave(void *__p)
+{
   return __builtin_ia32_fxsave(__p);
 }
 
+/// \brief Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
+///memory region pointed to by the input parameter __p. The contents of 
this
+///memory region should have been written to by a previous _fxsave or
+///_fxsave64 intrinsic.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c FXRSTOR instruction.
+///
+/// \param __p
+///A pointer to a 512-byte memory region. The beginning of this memory
+///region should be aligned on a 16-byte boundary.
 static __inline__ void __DEFAULT_FN_ATTRS
-_fxrstor(void *__p) {
+_fxrstor(void *__p)
+{
   return __builtin_ia32_fxrstor(__p);
 }
 
 #ifdef __x86_64__
+/// \brief Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
+///memory region pointed to by the input parameter__p.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c FXSAVE64 instruction.
+///
+/// \param __p
+///A pointer to a 512-byte memory region. The beginning of this memory
+///region should be aligned on a 16-byte boundary.
 static __inline__ void __DEFAULT_FN_ATTRS
-_fxsave64(void *__p) {
+_fxsave64(void *__p)
+{
   return __builtin_ia32_fxsave64(__p);
 }
 
+/// \brief Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
+///memory region pointed to by the input parameter __p. The contents of 
this
+///memory region should have been written to by a previous _fxsave or
+///_fxsave64 intrinsic.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c FXRSTOR64 instruction.
+///
+/// \param __p
+///A pointer to a 512-byte memory region. The beginning of this memory
+///region should be aligned on a 16-byte boundary.
 static __inline__ void __DEFAULT_FN_ATTRS
-_fxrstor64(void *__p) {
+_fxrstor64(void *__p)
+{
   return __builtin_ia32_fxrstor64(__p);
 }
 #endif


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r287278 - Minor changes in x86 intrinsics headers; NFC

2016-11-17 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Nov 17 17:02:00 2016
New Revision: 287278

URL: http://llvm.org/viewvc/llvm-project?rev=287278=rev
Log:
Minor changes in x86 intrinsics headers; NFC

I made several changes for consistency with the rest of x86 instrinsics header 
files. Some of these changes help to render doxygen comments better.

1. avxintrin.h –  Moved the opening bracket on a separate line for several 
  intrinsics (for consistency with the rest of the intrinsics).

2. emmintrin.h -  Moved the doxygen comment next to the body of the function;
   -  Added braces after extern "C"  even though there is only 
  one declaration each time

3. xmmintrin.h -  Moved the doxygen comment next to the body of the function;
   -  Added intrinsic prototypes for a couple of macro definitions
  into the doxygen comment;
   -  Added braces after extern "C"  even though there is only one
  declaration each time

4. ammintrin.h –  Removed extra line between the doxygen comment and the body
  of the functions (for consistency with the rest of the files).

Desk reviewed by Paul Robinson.


Modified:
cfe/trunk/lib/Headers/ammintrin.h
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/ammintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ammintrin.h?rev=287278=287277=287278=diff
==
--- cfe/trunk/lib/Headers/ammintrin.h (original)
+++ cfe/trunk/lib/Headers/ammintrin.h Thu Nov 17 17:02:00 2016
@@ -114,7 +114,6 @@ _mm_extract_si64(__m128i __x, __m128i __
 ///destination operand x with the specified bitfields replaced by the lower
 ///bits of source operand y. The upper 64 bits of the return value are
 ///undefined.
-
 #define _mm_inserti_si64(x, y, len, idx) \
   ((__m128i)__builtin_ia32_insertqi((__v2di)(__m128i)(x), \
 (__v2di)(__m128i)(y), \
@@ -146,7 +145,6 @@ _mm_extract_si64(__m128i __x, __m128i __
 ///destination operand __x with the specified bitfields replaced by the
 ///lower bits of source operand __y. The upper 64 bits of the return value
 ///are undefined.
-
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_insert_si64(__m128i __x, __m128i __y)
 {

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=287278=287277=287278=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Thu Nov 17 17:02:00 2016
@@ -3823,7 +3823,8 @@ _mm256_storeu2_m128i(__m128i *__addr_hi,
 /// \returns A 256-bit floating-point vector of [8 x float] containing the
 ///concatenated result.
 static __inline __m256 __DEFAULT_FN_ATTRS
-_mm256_set_m128 (__m128 __hi, __m128 __lo) {
+_mm256_set_m128 (__m128 __hi, __m128 __lo)
+{
   return (__m256) __builtin_shufflevector((__v4sf)__lo, (__v4sf)__hi, 0, 1, 2, 
3, 4, 5, 6, 7);
 }
 
@@ -3843,7 +3844,8 @@ _mm256_set_m128 (__m128 __hi, __m128 __l
 /// \returns A 256-bit floating-point vector of [4 x double] containing the
 ///concatenated result.
 static __inline __m256d __DEFAULT_FN_ATTRS
-_mm256_set_m128d (__m128d __hi, __m128d __lo) {
+_mm256_set_m128d (__m128d __hi, __m128d __lo)
+{
   return (__m256d)_mm256_set_m128((__m128)__hi, (__m128)__lo);
 }
 
@@ -3862,7 +3864,8 @@ _mm256_set_m128d (__m128d __hi, __m128d
 ///result.
 /// \returns A 256-bit integer vector containing the concatenated result.
 static __inline __m256i __DEFAULT_FN_ATTRS
-_mm256_set_m128i (__m128i __hi, __m128i __lo) {
+_mm256_set_m128i (__m128i __hi, __m128i __lo)
+{
   return (__m256i)_mm256_set_m128((__m128)__hi, (__m128)__lo);
 }
 
@@ -3884,7 +3887,8 @@ _mm256_set_m128i (__m128i __hi, __m128i
 /// \returns A 256-bit floating-point vector of [8 x float] containing the
 ///concatenated result.
 static __inline __m256 __DEFAULT_FN_ATTRS
-_mm256_setr_m128 (__m128 __lo, __m128 __hi) {
+_mm256_setr_m128 (__m128 __lo, __m128 __hi)
+{
   return _mm256_set_m128(__hi, __lo);
 }
 
@@ -3906,7 +3910,8 @@ _mm256_setr_m128 (__m128 __lo, __m128 __
 /// \returns A 256-bit floating-point vector of [4 x double] containing the
 ///concatenated result.
 static __inline __m256d __DEFAULT_FN_ATTRS
-_mm256_setr_m128d (__m128d __lo, __m128d __hi) {
+_mm256_setr_m128d (__m128d __lo, __m128d __hi)
+{
   return (__m256d)_mm256_set_m128((__m128)__hi, (__m128)__lo);
 }
 
@@ -3926,7 +3931,8 @@ _mm256_setr_m128d (__m128d __lo, __m128d
 ///result.
 /// \returns A 256-bit integer vector containing the concatenated result.
 static __inline __m256i __DEFAULT_FN_ATTRS
-_mm256_setr_m128i (__m128i __lo, __m128i __hi) {
+_mm256_setr_m128i (__m128i __lo, __m128i __hi)
+{
   return 

r286336 - Doxygen comments for avxintrin.h.

2016-11-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Nov  8 21:58:30 2016
New Revision: 286336

URL: http://llvm.org/viewvc/llvm-project?rev=286336=rev
Log:
Doxygen comments for avxintrin.h.

Added doxygen comments to avxintrin.h's intrinsics. As of now, around 75% of the
intrinsics in this file are documented here. The patches for the other 25% will 
be se
nt out later.

Removed extra spaces in emmitrin.h.

Note: The doxygen comments are automatically generated based on Sony's 
intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.




Modified:
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=286336=286335=286336=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Tue Nov  8 21:58:30 2016
@@ -2533,12 +2533,65 @@ _mm256_undefined_si256(void)
   return (__m256i)__builtin_ia32_undef256();
 }
 
+/// \brief Constructs a 256-bit floating-point vector of [4 x double]
+///initialized with the specified double-precision floating-point values.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VUNPCKLPD+VINSERTF128 instruction.
+///
+/// \param __a
+///A double-precision floating-point value used to initialize bits 
[255:192]
+///of the result.
+/// \param __b
+///A double-precision floating-point value used to initialize bits 
[191:128]
+///of the result.
+/// \param __c
+///A double-precision floating-point value used to initialize bits [127:64]
+///of the result.
+/// \param __d
+///A double-precision floating-point value used to initialize bits [63:0]
+///of the result.
+/// \returns An initialized 256-bit floating-point vector of [4 x double].
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_set_pd(double __a, double __b, double __c, double __d)
 {
   return (__m256d){ __d, __c, __b, __a };
 }
 
+/// \brief Constructs a 256-bit floating-point vector of [8 x float] 
initialized
+///with the specified single-precision floating-point values.
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __a
+///A single-precision floating-point value used to initialize bits 
[255:224]
+///of the result.
+/// \param __b
+///A single-precision floating-point value used to initialize bits 
[223:192]
+///of the result.
+/// \param __c
+///A single-precision floating-point value used to initialize bits 
[191:160]
+///of the result.
+/// \param __d
+///A single-precision floating-point value used to initialize bits 
[159:128]
+///of the result.
+/// \param __e
+///A single-precision floating-point value used to initialize bits [127:96]
+///of the result.
+/// \param __f
+///A single-precision floating-point value used to initialize bits [95:64]
+///of the result.
+/// \param __g
+///A single-precision floating-point value used to initialize bits [63:32]
+///of the result.
+/// \param __h
+///A single-precision floating-point value used to initialize bits [31:0]
+///of the result.
+/// \returns An initialized 256-bit floating-point vector of [8 x float].
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_set_ps(float __a, float __b, float __c, float __d,
   float __e, float __f, float __g, float __h)
@@ -2546,6 +2599,31 @@ _mm256_set_ps(float __a, float __b, floa
   return (__m256){ __h, __g, __f, __e, __d, __c, __b, __a };
 }
 
+/// \brief Constructs a 256-bit integer vector initialized with the specified
+///32-bit integral values.
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __i0
+///A 32-bit integral value used to initialize bits [255:224] of the result.
+/// \param __i1
+///A 32-bit integral value used to initialize bits [223:192] of the result.
+/// \param __i2
+///A 32-bit integral value used to initialize bits [191:160] of the result.
+/// \param __i3
+///A 32-bit integral value used to initialize bits [159:128] of the result.
+/// \param __i4
+///A 32-bit integral value used to initialize bits [127:96] of the result.
+/// \param __i5
+///A 32-bit integral value used to initialize bits [95:64] of the result.
+/// \param __i6
+///A 32-bit integral value used to initialize bits [63:32] of the result.
+/// \param __i7
+///A 32-bit integral value used to initialize bits [31:0] of the result.
+/// \returns An initialized 256-bit integer vector.
 static __inline __m256i __DEFAULT_FN_ATTRS
 _mm256_set_epi32(int __i0, int __i1, int __i2, int __i3,
  int __i4, int __i5, int __i6, int __i7)
@@ -2553,6 +2631,47 @@ _mm256_set_epi32(int __i0, int __i1, 

r284934 - Add more doxygen comments to emmintrin.h's intrinsics.

2016-10-23 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Sun Oct 23 02:30:50 2016
New Revision: 284934

URL: http://llvm.org/viewvc/llvm-project?rev=284934=rev
Log:
Add more doxygen comments to emmintrin.h's intrinsics.

With this patch, all intrinsics in this file (with an exception of a handful of 
a recently added ones) will be documented. I will send out a patch for 4 
missining intrisics later.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Yunzhong Gao.


Modified:
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=284934=284933=284934=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Sun Oct 23 02:30:50 2016
@@ -1210,18 +1210,63 @@ _mm_ucomige_sd(__m128d __a, __m128d __b)
   return __builtin_ia32_ucomisdge((__v2df)__a, (__v2df)__b);
 }
 
+/// \brief Compares the lower double-precision floating-point values in each of
+///the two 128-bit floating-point vectors of [2 x double] to determine if
+///the value in the first parameter is unequal to the corresponding value 
in
+///the second parameter. The comparison yields 0 for false, 1 for true. If
+///either of the two lower double-precision values is NaN, 0 is returned.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VUCOMISD / UCOMISD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double]. The lower double-precision value is
+///compared to the lower double-precision value of __b.
+/// \param __b
+///A 128-bit vector of [2 x double]. The lower double-precision value is
+///compared to the lower double-precision value of __a.
+/// \returns An integer containing the comparison result. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_ucomineq_sd(__m128d __a, __m128d __b)
 {
   return __builtin_ia32_ucomisdneq((__v2df)__a, (__v2df)__b);
 }
 
+/// \brief Converts the two double-precision floating-point elements of a
+///128-bit vector of [2 x double] into two single-precision floating-point
+///values, returned in the lower 64 bits of a 128-bit vector of [4 x 
float].
+///The upper 64 bits of the result vector are set to zero.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPD2PS / CVTPD2PS instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double].
+/// \returns A 128-bit vector of [4 x float] whose lower 64 bits contain the
+///converted values. The upper 64 bits are set to zero.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_cvtpd_ps(__m128d __a)
 {
   return __builtin_ia32_cvtpd2ps((__v2df)__a);
 }
 
+/// \brief Converts the lower two single-precision floating-point elements of a
+///128-bit vector of [4 x float] into two double-precision floating-point
+///values, returned in a 128-bit vector of [2 x double]. The upper two
+///elements of the input vector are unused.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPS2PD / CVTPS2PD instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float]. The lower two single-precision
+///floating-point elements are converted to double-precision values. The
+///upper two elements are unused.
+/// \returns A 128-bit vector of [2 x double] containing the converted values.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cvtps_pd(__m128 __a)
 {
@@ -1229,6 +1274,19 @@ _mm_cvtps_pd(__m128 __a)
   __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 0, 1), __v2df);
 }
 
+/// \brief Converts the lower two integer elements of a 128-bit vector of
+///[4 x i32] into two double-precision floating-point values, returned in a
+///128-bit vector of [2 x double]. The upper two elements of the input
+///vector are unused.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTDQ2PD / CVTDQ2PD instruction.
+///
+/// \param __a
+///A 128-bit integer vector of [4 x i32]. The lower two integer elements 
are
+///converted to double-precision values. The upper two elements are unused.
+/// \returns A 128-bit vector of [2 x double] containing the converted values.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_cvtepi32_pd(__m128i __a)
 {
@@ -1236,24 +1294,84 @@ _mm_cvtepi32_pd(__m128i __a)
   __builtin_shufflevector((__v4si)__a, (__v4si)__a, 0, 1), __v2df);
 }
 
+/// \brief Converts the two double-precision floating-point elements of a
+///128-bit vector of [2 x double] into two signed 32-bit integer values,
+///returned in the lower 64 bits of a 128-bit vector of [4 x i32]. The 
upper
+///64 bits of the result vector are set to zero.
+///

r284754 - Add more doxygen comments to emmintrin.h's intrinsics.

2016-10-20 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Oct 20 12:59:15 2016
New Revision: 284754

URL: http://llvm.org/viewvc/llvm-project?rev=284754=rev
Log:
Add more doxygen comments to emmintrin.h's intrinsics.

With this patch, 75% of the intrinsics in this file will be documented now. The 
patches for the rest of the intrisics in this file will be send out later.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code 
review upstream. This patch was internally reviewed by Yunzhong Gao.


Modified:
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=284754=284753=284754=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Oct 20 12:59:15 2016
@@ -49,6 +49,21 @@ typedef signed char __v16qs __attribute_
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("sse2")))
 
+/// \brief Adds lower double-precision values in both operands and returns the
+///sum in the lower 64 bits of the result. The upper 64 bits of the result
+///are copied from the upper double-precision value of the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDSD / ADDSD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \param __b
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \returns A 128-bit vector of [2 x double] whose lower 64 bits contain the
+///sum of the lower 64 bits of both operands. The upper 64 bits are copied
+///from the upper 64 bits of the first source operand.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_add_sd(__m128d __a, __m128d __b)
 {
@@ -56,12 +71,41 @@ _mm_add_sd(__m128d __a, __m128d __b)
   return __a;
 }
 
+/// \brief Adds two 128-bit vectors of [2 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDPD / ADDPD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \param __b
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \returns A 128-bit vector of [2 x double] containing the sums of both
+///operands.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_add_pd(__m128d __a, __m128d __b)
 {
   return (__m128d)((__v2df)__a + (__v2df)__b);
 }
 
+/// \brief Subtracts the lower double-precision value of the second operand
+///from the lower double-precision value of the first operand and returns
+///the difference in the lower 64 bits of the result. The upper 64 bits of
+///the result are copied from the upper double-precision value of the first
+///operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VSUBSD / SUBSD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double] containing the minuend.
+/// \param __b
+///A 128-bit vector of [2 x double] containing the subtrahend.
+/// \returns A 128-bit vector of [2 x double] whose lower 64 bits contain the
+///difference of the lower 64 bits of both operands. The upper 64 bits are
+///copied from the upper 64 bits of the first source operand.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_sub_sd(__m128d __a, __m128d __b)
 {
@@ -69,12 +113,40 @@ _mm_sub_sd(__m128d __a, __m128d __b)
   return __a;
 }
 
+/// \brief Subtracts two 128-bit vectors of [2 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VSUBPD / SUBPD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double] containing the minuend.
+/// \param __b
+///A 128-bit vector of [2 x double] containing the subtrahend.
+/// \returns A 128-bit vector of [2 x double] containing the differences 
between
+///both operands.
 static __inline__ __m128d __DEFAULT_FN_ATTRS
 _mm_sub_pd(__m128d __a, __m128d __b)
 {
   return (__m128d)((__v2df)__a - (__v2df)__b);
 }
 
+/// \brief Multiplies lower double-precision values in both operands and 
returns
+///the product in the lower 64 bits of the result. The upper 64 bits of the
+///result are copied from the upper double-precision value of the first
+///operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMULSD / MULSD instruction.
+///
+/// \param __a
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \param __b
+///A 128-bit vector of [2 x double] containing one of the source operands.
+/// \returns A 128-bit vector of [2 x double] whose lower 64 bits contain the
+///product of the lower 64 bits of both operands. The upper 64 bits are
+///copied from 

r276499 - Add doxygen comments to emmintrin.h's intrinsics.

2016-07-22 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Jul 22 18:49:37 2016
New Revision: 276499

URL: http://llvm.org/viewvc/llvm-project?rev=276499=rev
Log:
Add doxygen comments to emmintrin.h's intrinsics.

Only around 50% of the intrinsics in this file are documented now. The patches 
for the rest of the intrisics in this file will be send out later.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Paul Robinson.


Modified:
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=276499=276498=276499=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Fri Jul 22 18:49:37 2016
@@ -2154,42 +2154,169 @@ _mm_set1_epi8(char __b)
   return (__m128i)(__v16qi){ __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, 
__b, __b, __b, __b, __b, __b };
 }
 
+/// \brief Constructs a 128-bit integer vector, initialized in reverse order
+/// with the specified 64-bit integral values.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPUNPCKLQDQ / PUNPCKLQDQ instruction.
+///
+/// \param __q0
+///A 64-bit integral value used to initialize the lower 64 bits of the
+///result.
+/// \param __q1
+///A 64-bit integral value used to initialize the upper 64 bits of the
+///result.
+/// \returns An initialized 128-bit integer vector.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_setr_epi64(__m64 __q0, __m64 __q1)
 {
   return (__m128i){ (long long)__q0, (long long)__q1 };
 }
 
+/// \brief Constructs a 128-bit integer vector, initialized in reverse order
+/// with the specified 32-bit integral values.
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __i0
+///A 32-bit integral value used to initialize bits [31:0] of the result.
+/// \param __i1
+///A 32-bit integral value used to initialize bits [63:32] of the result.
+/// \param __i2
+///A 32-bit integral value used to initialize bits [95:64] of the result.
+/// \param __i3
+///A 32-bit integral value used to initialize bits [127:96] of the result.
+/// \returns An initialized 128-bit integer vector.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_setr_epi32(int __i0, int __i1, int __i2, int __i3)
 {
   return (__m128i)(__v4si){ __i0, __i1, __i2, __i3};
 }
 
+/// \brief Constructs a 128-bit integer vector, initialized in reverse order
+/// with the specified 16-bit integral values.
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __w0
+///A 16-bit integral value used to initialize bits [15:0] of the result.
+/// \param __w1
+///A 16-bit integral value used to initialize bits [31:16] of the result.
+/// \param __w2
+///A 16-bit integral value used to initialize bits [47:32] of the result.
+/// \param __w3
+///A 16-bit integral value used to initialize bits [63:48] of the result.
+/// \param __w4
+///A 16-bit integral value used to initialize bits [79:64] of the result.
+/// \param __w5
+///A 16-bit integral value used to initialize bits [95:80] of the result.
+/// \param __w6
+///A 16-bit integral value used to initialize bits [111:96] of the result.
+/// \param __w7
+///A 16-bit integral value used to initialize bits [127:112] of the result.
+/// \returns An initialized 128-bit integer vector.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_setr_epi16(short __w0, short __w1, short __w2, short __w3, short __w4, 
short __w5, short __w6, short __w7)
 {
   return (__m128i)(__v8hi){ __w0, __w1, __w2, __w3, __w4, __w5, __w6, __w7 };
 }
 
+/// \brief Constructs a 128-bit integer vector, initialized in reverse order
+/// with the specified 8-bit integral values.
+///
+/// \headerfile 
+///
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
+///
+/// \param __b0
+///An 8-bit integral value used to initialize bits [7:0] of the result.
+/// \param __b1
+///An 8-bit integral value used to initialize bits [15:8] of the result.
+/// \param __b2
+///An 8-bit integral value used to initialize bits [23:16] of the result.
+/// \param __b3
+///An 8-bit integral value used to initialize bits [31:24] of the result.
+/// \param __b4
+///An 8-bit integral value used to initialize bits [39:32] of the result.
+/// \param __b5
+///An 8-bit integral value used to initialize bits [47:40] of the result.
+/// \param __b6
+///An 8-bit integral value used to initialize bits [55:48] of the result.
+/// \param __b7
+///An 8-bit integral value used to initialize bits 

r272350 - Add doxygen comments to mmintrin.h's intrinsics.

2016-06-09 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Jun  9 19:10:40 2016
New Revision: 272350

URL: http://llvm.org/viewvc/llvm-project?rev=272350=rev
Log:
Add doxygen comments to mmintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/mmintrin.h

Modified: cfe/trunk/lib/Headers/mmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/mmintrin.h?rev=272350=272349=272350=diff
==
--- cfe/trunk/lib/Headers/mmintrin.h (original)
+++ cfe/trunk/lib/Headers/mmintrin.h Thu Jun  9 19:10:40 2016
@@ -34,366 +34,1314 @@ typedef char __v8qi __attribute__((__vec
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("mmx")))
 
+/// \brief Clears the MMX state by setting the state of the x87 stack registers
+///to empty.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c EMMS instruction.
+///
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm_empty(void)
 {
 __builtin_ia32_emms();
 }
 
+/// \brief Constructs a 64-bit integer vector, setting the lower 32 bits to the
+///value of the 32-bit integer parameter and setting the upper 32 bits to 
0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVD / MOVD instruction.
+///
+/// \param __i
+///A 32-bit integer value.
+/// \returns A 64-bit integer vector. The lower 32 bits contain the value of 
the
+///parameter. The upper 32 bits are set to 0.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_cvtsi32_si64(int __i)
 {
 return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
 }
 
+/// \brief Returns the lower 32 bits of a 64-bit integer vector as a 32-bit
+///signed integer.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVD / MOVD instruction.
+///
+/// \param __m
+///A 64-bit integer vector.
+/// \returns A 32-bit signed integer value containing the lower 32 bits of the
+///parameter.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_cvtsi64_si32(__m64 __m)
 {
 return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
 }
 
+/// \brief Casts a 64-bit signed integer value into a 64-bit integer vector.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVQ / MOVD instruction.
+///
+/// \param __i
+///A 64-bit signed integer.
+/// \returns A 64-bit integer vector containing the same bitwise pattern as the
+///parameter.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_cvtsi64_m64(long long __i)
 {
 return (__m64)__i;
 }
 
+/// \brief Casts a 64-bit integer vector into a 64-bit signed integer value.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVQ / MOVD instruction.
+///
+/// \param __m
+///A 64-bit integer vector.
+/// \returns A 64-bit signed integer containing the same bitwise pattern as the
+///parameter.
 static __inline__ long long __DEFAULT_FN_ATTRS
 _mm_cvtm64_si64(__m64 __m)
 {
 return (long long)__m;
 }
 
+/// \brief Converts 16-bit signed integers from both 64-bit integer vector
+///parameters of [4 x i16] into 8-bit signed integer values, and constructs
+///a 64-bit integer vector of [8 x i8] as the result. Positive values
+///greater than 0x7F are saturated to 0x7F. Negative values less than 0x80
+///are saturated to 0x80.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PACKSSWB instruction.
+///
+/// \param __m1
+///A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as 
a
+///16-bit signed integer and is converted to an 8-bit signed integer with
+///saturation. Positive values greater than 0x7F are saturated to 0x7F.
+///Negative values less than 0x80 are saturated to 0x80. The converted
+///[4 x i8] values are written to the lower 32 bits of the result.
+/// \param __m2
+///A 64-bit integer vector of [4 x i16]. Each 16-bit element is treated as 
a
+///16-bit signed integer and is converted to an 8-bit signed integer with
+///saturation. Positive values greater than 0x7F are saturated to 0x7F.
+///Negative values less than 0x80 are saturated to 0x80. The converted
+///[4 x i8] values are written to the upper 32 bits of the result.
+/// \returns A 64-bit integer vector of [8 x i8] containing the converted
+///values.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_packs_pi16(__m64 __m1, __m64 __m2)
 {
 return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
 }
 
+/// \brief Converts 32-bit signed integers from both 64-bit integer vector
+///parameters of [2 x i32] into 16-bit signed integer values, and 
constructs
+///a 64-bit integer vector of [4 x i16] as the result. Positive values
+///greater than 0x7FFF are saturated 

r272121 - Add doxygen comments to xmmintrin.h's intrinsics.

2016-06-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Jun  8 02:34:31 2016
New Revision: 272121

URL: http://llvm.org/viewvc/llvm-project?rev=272121=rev
Log:
Add doxygen comments to xmmintrin.h's intrinsics.
Only half of the intrinsics in this file is documented here. The patch for the o
ther half will be sent out later.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.


Modified:
cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=272121=272120=272121=diff
==
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Wed Jun  8 02:34:31 2016
@@ -1406,12 +1406,39 @@ _mm_cvttps_pi32(__m128 __a)
   return (__m64)__builtin_ia32_cvttps2pi((__v4sf)__a);
 }
 
+/// \brief Converts two low-order float values in a 128-bit vector of [4 x
+///float] into a 64-bit vector of [2 x i32], truncating the result when it
+///is inexact.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c CVTTPS2PI instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \returns A 64-bit integer vector containing the converted values.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_cvtt_ps2pi(__m128 __a)
 {
   return _mm_cvttps_pi32(__a);
 }
 
+/// \brief Converts a 32-bit signed integer value into a floating point value
+///and writes it to the lower 32 bits of the destination. The remaining
+///higher order elements of the destination vector are copied from the
+///corresponding elements in the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTSI2SS / CVTSI2SS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \param __b
+///A 32-bit signed integer operand containing the value to be converted.
+/// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
+///converted value of the second operand. The upper 96 bits are copied from
+///the upper 96 bits of the first operand.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_cvtsi32_ss(__m128 __a, int __b)
 {
@@ -1419,6 +1446,22 @@ _mm_cvtsi32_ss(__m128 __a, int __b)
   return __a;
 }
 
+/// \brief Converts a 32-bit signed integer value into a floating point value
+///and writes it to the lower 32 bits of the destination. The remaining
+///higher order elements of the destination are copied from the
+///corresponding elements in the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTSI2SS / CVTSI2SS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \param __b
+///A 32-bit signed integer operand containing the value to be converted.
+/// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
+///converted value of the second operand. The upper 96 bits are copied from
+///the upper 96 bits of the first operand.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_cvt_si2ss(__m128 __a, int __b)
 {
@@ -1427,6 +1470,22 @@ _mm_cvt_si2ss(__m128 __a, int __b)
 
 #ifdef __x86_64__
 
+/// \brief Converts a 64-bit signed integer value into a floating point value
+///and writes it to the lower 32 bits of the destination. The remaining
+///higher order elements of the destination are copied from the
+///corresponding elements in the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTSI2SS / CVTSI2SS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \param __b
+///A 64-bit signed integer operand containing the value to be converted.
+/// \returns A 128-bit vector of [4 x float] whose lower 32 bits contain the
+///converted value of the second operand. The upper 96 bits are copied from
+///the upper 96 bits of the first operand.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_cvtsi64_ss(__m128 __a, long long __b)
 {
@@ -1436,24 +1495,84 @@ _mm_cvtsi64_ss(__m128 __a, long long __b
 
 #endif
 
+/// \brief Converts two elements of a 64-bit vector of [2 x i32] into two
+///floating point values and writes them to the lower 64-bits of the
+///destination. The remaining higher order elements of the destination are
+///copied from the corresponding elements in the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c CVTPI2PS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \param __b
+///A 64-bit vector of [2 x i32]. The elements in this vector are converted
+///and written to the corresponding low-order elements in the destination.
+/// \returns A 128-bit vector of [4 x float] whose lower 64 bits contain the
+///converted value of the second operand. The 

r271077 - Clean up: remove trailing spaces in x86 intrinsic headers.

2016-05-27 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri May 27 19:18:59 2016
New Revision: 271077

URL: http://llvm.org/viewvc/llvm-project?rev=271077=rev
Log:
Clean up: remove trailing spaces in x86 intrinsic headers.

Differential Revision: http://reviews.llvm.org/D20614


Modified:
cfe/trunk/lib/Headers/__wmmintrin_aes.h
cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/lib/Headers/avx512vldqintrin.h
cfe/trunk/lib/Headers/mwaitxintrin.h
cfe/trunk/lib/Headers/pmmintrin.h

Modified: cfe/trunk/lib/Headers/__wmmintrin_aes.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_aes.h?rev=271077=271076=271077=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_aes.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_aes.h Fri May 27 19:18:59 2016
@@ -125,9 +125,9 @@ _mm_aesimc_si128(__m128i __V)
   return (__m128i)__builtin_ia32_aesimc128((__v2di)__V);
 }
 
-/// \brief Generates a round key for AES encyption, operating on 128-bit data 
+/// \brief Generates a round key for AES encyption, operating on 128-bit data
 ///specified in the first source operand and using an 8-bit round constant
-///specified by the second source operand, and writes the result to the 
+///specified by the second source operand, and writes the result to the
 ///destination.
 ///
 /// \headerfile 

Modified: cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_pclmul.h?rev=271077=271076=271077=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_pclmul.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_pclmul.h Fri May 27 19:18:59 2016
@@ -24,15 +24,15 @@
 #define _WMMINTRIN_PCLMUL_H
 
 /// \brief Multiplies two 64-bit integer values, which are selected from source
-///operands using the immediate-value operand. The multiplication is a 
+///operands using the immediate-value operand. The multiplication is a
 ///carry-less multiplication, and the 128-bit integer product is stored in
 ///the destination.
 ///
 /// \headerfile 
 ///
-/// \code 
+/// \code
 /// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I);
-/// \endcode 
+/// \endcode
 ///
 /// This intrinsic corresponds to the \c VPCLMULQDQ instruction.
 ///

Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=271077=271076=271077=diff
==
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Fri May 27 19:18:59 2016
@@ -949,7 +949,7 @@ _mm_maskz_max_sd(__mmask8 __U,__m128d __
(__v2df)_mm_setzero_pd(), \
(__mmask8)(U), (int)(R)); })
 
-static __inline __m512i 
+static __inline __m512i
 __DEFAULT_FN_ATTRS
 _mm512_max_epi32(__m512i __A, __m512i __B)
 {
@@ -1508,7 +1508,7 @@ _mm_rsqrt14_ss(__m128 __A, __m128 __B)
 }
 
 static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_mask_rsqrt14_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) 
+_mm_mask_rsqrt14_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B)
 {
  return (__m128) __builtin_ia32_rsqrt14ss_mask ((__v4sf) __A,
   (__v4sf) __B,
@@ -1517,7 +1517,7 @@ _mm_mask_rsqrt14_ss (__m128 __W, __mmask
 }
 
 static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_maskz_rsqrt14_ss (__mmask8 __U, __m128 __A, __m128 __B) 
+_mm_maskz_rsqrt14_ss (__mmask8 __U, __m128 __A, __m128 __B)
 {
  return (__m128) __builtin_ia32_rsqrt14ss_mask ((__v4sf) __A,
   (__v4sf) __B,
@@ -1536,7 +1536,7 @@ _mm_rsqrt14_sd(__m128d __A, __m128d __B)
 }
 
 static __inline__ __m128d __DEFAULT_FN_ATTRS
-_mm_mask_rsqrt14_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) 
+_mm_mask_rsqrt14_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B)
 {
  return (__m128d) __builtin_ia32_rsqrt14sd_mask ( (__v2df) __A,
   (__v2df) __B,
@@ -1545,7 +1545,7 @@ _mm_mask_rsqrt14_sd (__m128d __W, __mmas
 }
 
 static __inline__ __m128d __DEFAULT_FN_ATTRS
-_mm_maskz_rsqrt14_sd (__mmask8 __U, __m128d __A, __m128d __B) 
+_mm_maskz_rsqrt14_sd (__mmask8 __U, __m128d __A, __m128d __B)
 {
  return (__m128d) __builtin_ia32_rsqrt14sd_mask ( (__v2df) __A,
   (__v2df) __B,
@@ -1616,7 +1616,7 @@ _mm_rcp14_ss(__m128 __A, __m128 __B)
 }
 
 static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_mask_rcp14_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) 
+_mm_mask_rcp14_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B)
 {
  return (__m128) __builtin_ia32_rcp14ss_mask ((__v4sf) __A,
   (__v4sf) __B,
@@ -1625,7 +1625,7 @@ _mm_mask_rcp14_ss (__m128 __W, __mmask8
 }
 
 static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_maskz_rcp14_ss (__mmask8 __U, __m128 __A, __m128 __B) 

r269718 - Doxygen comments for avxintrin.h.

2016-05-16 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Mon May 16 17:54:45 2016
New Revision: 269718

URL: http://llvm.org/viewvc/llvm-project?rev=269718=rev
Log:
Doxygen comments for avxintrin.h.

Added doxygen comments to avxintrin.h's intrinsics. As of now, only around 50% 
of the intrinsics in this file are documented here. The patches for the other 
half will be sent out later.

Updated bmiintrin.h to fix an incorrect section name.
Updated f16cintrin.h to fix incorect parameter names.


The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.



Modified:
cfe/trunk/lib/Headers/avxintrin.h
cfe/trunk/lib/Headers/bmiintrin.h
cfe/trunk/lib/Headers/f16cintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=269718=269717=269718=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Mon May 16 17:54:45 2016
@@ -167,8 +167,8 @@ _mm256_addsub_ps(__m256 __a, __m256 __b)
 ///A 256-bit vector of [4 x double] containing the dividend.
 /// \param __b
 ///A 256-bit vector of [4 x double] containing the divisor.
-/// \returns A 256-bit vector of [4 x double] containing the quotients between
-///both operands.
+/// \returns A 256-bit vector of [4 x double] containing the quotients of both
+///operands.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_div_pd(__m256d __a, __m256d __b)
 {
@@ -185,8 +185,8 @@ _mm256_div_pd(__m256d __a, __m256d __b)
 ///A 256-bit vector of [8 x float] containing the dividend.
 /// \param __b
 ///A 256-bit vector of [8 x float] containing the divisor.
-/// \returns A 256-bit vector of [8 x float] containing the quotients between
-///both operands.
+/// \returns A 256-bit vector of [8 x float] containing the quotients of both
+///operands.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_div_ps(__m256 __a, __m256 __b)
 {
@@ -279,8 +279,8 @@ _mm256_min_ps(__m256 __a, __m256 __b)
 ///A 256-bit vector of [4 x double] containing one of the operands.
 /// \param __b
 ///A 256-bit vector of [4 x double] containing one of the operands.
-/// \returns A 256-bit vector of [4 x double] containing the products between
-///both operands.
+/// \returns A 256-bit vector of [4 x double] containing the products of both
+///operands.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_mul_pd(__m256d __a, __m256d __b)
 {
@@ -297,16 +297,16 @@ _mm256_mul_pd(__m256d __a, __m256d __b)
 ///A 256-bit vector of [8 x float] containing one of the operands.
 /// \param __b
 ///A 256-bit vector of [8 x float] containing one of the operands.
-/// \returns A 256-bit vector of [8 x float] containing the products between
-///both operands.
+/// \returns A 256-bit vector of [8 x float] containing the products of both
+///operands.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_mul_ps(__m256 __a, __m256 __b)
 {
   return (__m256)((__v8sf)__a * (__v8sf)__b);
 }
 
-/// \brief Calculates the square roots of the values stored in a 256-bit vector
-///of [4 x double].
+/// \brief Calculates the square roots of the values in a 256-bit vector of
+///[4 x double].
 ///
 /// \headerfile 
 ///
@@ -322,8 +322,8 @@ _mm256_sqrt_pd(__m256d __a)
   return (__m256d)__builtin_ia32_sqrtpd256((__v4df)__a);
 }
 
-/// \brief Calculates the square roots of the values stored in a 256-bit vector
-///of [8 x float].
+/// \brief Calculates the square roots of the values in a 256-bit vector of
+///[8 x float].
 ///
 /// \headerfile 
 ///
@@ -339,8 +339,8 @@ _mm256_sqrt_ps(__m256 __a)
   return (__m256)__builtin_ia32_sqrtps256((__v8sf)__a);
 }
 
-/// \brief Calculates the reciprocal square roots of the values stored in a
-///256-bit vector of [8 x float].
+/// \brief Calculates the reciprocal square roots of the values in a 256-bit
+///vector of [8 x float].
 ///
 /// \headerfile 
 ///
@@ -356,8 +356,8 @@ _mm256_rsqrt_ps(__m256 __a)
   return (__m256)__builtin_ia32_rsqrtps256((__v8sf)__a);
 }
 
-/// \brief Calculates the reciprocals of the values stored in a 256-bit vector
-///of [8 x float].
+/// \brief Calculates the reciprocals of the values in a 256-bit vector of
+///[8 x float].
 ///
 /// \headerfile 
 ///
@@ -373,9 +373,9 @@ _mm256_rcp_ps(__m256 __a)
   return (__m256)__builtin_ia32_rcpps256((__v8sf)__a);
 }
 
-/// \brief Rounds the values stored in a 256-bit vector of [4 x double] as
-///specified by the byte operand. The source values are rounded to integer
-///values and returned as 64-bit double-precision floating-point values.
+/// \brief Rounds the values in a 256-bit vector of [4 x double] as specified
+///by the byte operand. The source values are rounded to integer values and
+///returned as 64-bit double-precision 

r267676 - Updated doxygen comments for intrinsics.

2016-04-27 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Apr 27 02:14:02 2016
New Revision: 267676

URL: http://llvm.org/viewvc/llvm-project?rev=267676=rev
Log:
Updated doxygen comments for intrinsics.
(1) Removed \code.. \endcode tags around the instruction name. This matches the 
doxygen format for all other intrinsics.
(2) Did a better formatting for the comments (to fit into 80 columns more 
compactly).



Modified:
cfe/trunk/lib/Headers/ammintrin.h

Modified: cfe/trunk/lib/Headers/ammintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ammintrin.h?rev=267676=267675=267676=diff
==
--- cfe/trunk/lib/Headers/ammintrin.h (original)
+++ cfe/trunk/lib/Headers/ammintrin.h Wed Apr 27 02:14:02 2016
@@ -38,9 +38,7 @@
 /// __m128i _mm_extracti_si64(__m128i x, const int len, const int idx);
 /// \endcode
 ///
-/// \code
 /// This intrinsic corresponds to the \c EXTRQ instruction.
-/// \endcode
 ///
 /// \param x
 ///The value from which bits are extracted.
@@ -49,10 +47,10 @@
 ///are zero, the length is interpreted as 64.
 /// \param idx
 ///Bits [5:0] specify the index of the least significant bit; the other
-///bits are ignored. If the sum of the index and length is greater than
-///64, the result is undefined. If the length and index are both zero,
-///bits [63:0] of parameter x are extracted. If the length is zero
-///but the index is non-zero, the result is undefined.
+///bits are ignored. If the sum of the index and length is greater than 64,
+///the result is undefined. If the length and index are both zero, bits
+///[63:0] of parameter x are extracted. If the length is zero but the index
+///is non-zero, the result is undefined.
 /// \returns A 128-bit integer vector whose lower 64 bits contain the bits
 ///extracted from the source operand.
 #define _mm_extracti_si64(x, len, idx) \
@@ -64,20 +62,17 @@
 ///
 /// \headerfile 
 ///
-/// \code
 /// This intrinsic corresponds to the \c EXTRQ instruction.
-/// \endcode
 ///
 /// \param __x
 ///The value from which bits are extracted.
 /// \param __y
-///Specifies the index of the least significant bit at [13:8]
-///and the length at [5:0]; all other bits are ignored.
-///If bits [5:0] are zero, the length is interpreted as 64.
-///If the sum of the index and length is greater than 64, the result is
-///undefined. If the length and index are both zero, bits [63:0] of
-///parameter __x are extracted. If the length is zero but the index is
-///non-zero, the result is undefined.
+///Specifies the index of the least significant bit at [13:8] and the
+///length at [5:0]; all other bits are ignored. If bits [5:0] are zero, the
+///length is interpreted as 64. If the sum of the index and length is
+///greater than 64, the result is undefined. If the length and index are
+///both zero, bits [63:0] of parameter __x are extracted. If the length is
+///zero but the index is non-zero, the result is undefined.
 /// \returns A 128-bit vector whose lower 64 bits contain the bits extracted
 ///from the source operand.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
@@ -86,9 +81,9 @@ _mm_extract_si64(__m128i __x, __m128i __
   return (__m128i)__builtin_ia32_extrq((__v2di)__x, (__v16qi)__y);
 }
 
-/// \brief Inserts bits of a specified length from the source integer vector
-///y into the lower 64 bits of the destination integer vector x at the
-///index idx and of the length len.
+/// \brief Inserts bits of a specified length from the source integer vector y
+///into the lower 64 bits of the destination integer vector x at the index
+///idx and of the length len.
 ///
 /// \headerfile 
 ///
@@ -97,9 +92,7 @@ _mm_extract_si64(__m128i __x, __m128i __
 /// const int idx);
 /// \endcode
 ///
-/// \code
 /// This intrinsic corresponds to the \c INSERTQ instruction.
-/// \endcode
 ///
 /// \param x
 ///The destination operand where bits will be inserted. The inserted bits
@@ -113,14 +106,14 @@ _mm_extract_si64(__m128i __x, __m128i __
 ///are zero, the length is interpreted as 64.
 /// \param idx
 ///Bits [5:0] specify the index of the least significant bit; the other
-///bits are ignored. If the sum of the index and length is greater than
-///64, the result is undefined. If the length and index are both zero,
-///bits [63:0] of parameter y are inserted into parameter x. If the
-///length is zero but the index is non-zero, the result is undefined.
-/// \returns A 128-bit integer vector containing the original lower 64-bits
-///of destination operand x with the specified bitfields replaced by the
-///lower bits of source operand y. The upper 64 bits of the return value
-///are undefined.
+///bits are ignored. If the sum of the index and length is greater than 64,
+///the result is undefined. If the length and index are both zero, bits
+///[63:0] 

r265844 - Add doxygen comments to emmintrin.h's intrinsics. Only around 25% of the intrinsics in this file are documented now. The patches for the rest of the intrisics in this file will be send out l

2016-04-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Apr  8 15:45:48 2016
New Revision: 265844

URL: http://llvm.org/viewvc/llvm-project?rev=265844=rev
Log:
Add doxygen comments to emmintrin.h's intrinsics. Only around 25% of the 
intrinsics in this file are documented now. The patches for the rest of the 
intrisics in this file will be send out later.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code 
review upstream. This patch was internally reviewed by Paul Robinson.



Modified:
cfe/trunk/lib/Headers/emmintrin.h

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=265844=265843=265844=diff
==
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Fri Apr  8 15:45:48 2016
@@ -734,108 +734,348 @@ _mm_mulhi_epu16(__m128i __a, __m128i __b
   return (__m128i)__builtin_ia32_pmulhuw128((__v8hi)__a, (__v8hi)__b);
 }
 
+/// \brief Multiplies the corresponding elements of two [8 x short] vectors and
+///returns a vector containing the low-order 16 bits of each 32-bit product
+///in the corresponding element.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPMULLW / PMULLW instruction.
+///
+/// \param __a
+///A 128-bit integer vector containing one of the source operands.
+/// \param __b
+///A 128-bit integer vector containing one of the source operands.
+/// \returns A 128-bit integer vector containing the products of both operands.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_mullo_epi16(__m128i __a, __m128i __b)
 {
   return (__m128i)((__v8hi)__a * (__v8hi)__b);
 }
 
+/// \brief Multiplies 32-bit unsigned integer values contained in the lower 
bits
+///of the two 64-bit integer vectors and returns the 64-bit unsigned
+///product.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PMULUDQ instruction.
+///
+/// \param __a
+///A 64-bit integer containing one of the source operands.
+/// \param __b
+///A 64-bit integer containing one of the source operands.
+/// \returns A 64-bit integer vector containing the product of both operands.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_mul_su32(__m64 __a, __m64 __b)
 {
   return __builtin_ia32_pmuludq((__v2si)__a, (__v2si)__b);
 }
 
+/// \brief Multiplies 32-bit unsigned integer values contained in the lower
+///bits of the corresponding elements of two [2 x i64] vectors, and returns
+///the 64-bit products in the corresponding elements of a [2 x i64] vector.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPMULUDQ / PMULUDQ instruction.
+///
+/// \param __a
+///A [2 x i64] vector containing one of the source operands.
+/// \param __b
+///A [2 x i64] vector containing one of the source operands.
+/// \returns A [2 x i64] vector containing the product of both operands.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_mul_epu32(__m128i __a, __m128i __b)
 {
   return __builtin_ia32_pmuludq128((__v4si)__a, (__v4si)__b);
 }
 
+/// \brief Computes the absolute differences of corresponding 8-bit integer
+///values in two 128-bit vectors. Sums the first 8 absolute differences, 
and
+///separately sums the second 8 absolute differences. Packss these two
+///unsigned 16-bit integer sums into the upper and lower elements of a
+///[2 x i64] vector.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPSADBW / PSADBW instruction.
+///
+/// \param __a
+///A 128-bit integer vector containing one of the source operands.
+/// \param __b
+///A 128-bit integer vector containing one of the source operands.
+/// \returns A [2 x i64] vector containing the sums of the sets of absolute
+///differences between both operands.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_sad_epu8(__m128i __a, __m128i __b)
 {
   return __builtin_ia32_psadbw128((__v16qi)__a, (__v16qi)__b);
 }
 
+/// \brief Subtracts the corresponding 8-bit integer values in the operands.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPSUBB / PSUBB instruction.
+///
+/// \param __a
+///A 128-bit integer vector containing the minuends.
+/// \param __b
+///A 128-bit integer vector containing the subtrahends.
+/// \returns A 128-bit integer vector containing the differences of the values
+///in the operands.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_sub_epi8(__m128i __a, __m128i __b)
 {
   return (__m128i)((__v16qi)__a - (__v16qi)__b);
 }
 
+/// \brief Subtracts the corresponding 16-bit integer values in the operands.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPSUBW / PSUBW instruction.
+///
+/// \param __a
+///A 128-bit integer vector containing the minuends.
+/// \param __b
+///A 128-bit integer vector 

r263175 - Add doxygen comments to avxintrin.h's intrinsics.

2016-03-10 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Mar 10 18:05:54 2016
New Revision: 263175

URL: http://llvm.org/viewvc/llvm-project?rev=263175=rev
Log:
Add doxygen comments to avxintrin.h's intrinsics.
Only around 25% of the intrinsics in this file are documented here. The patches 
for the other half will be sent out later.

The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code 
review upstream.


Modified:
cfe/trunk/lib/Headers/avxintrin.h

Modified: cfe/trunk/lib/Headers/avxintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avxintrin.h?rev=263175=263174=263175=diff
==
--- cfe/trunk/lib/Headers/avxintrin.h (original)
+++ cfe/trunk/lib/Headers/avxintrin.h Thu Mar 10 18:05:54 2016
@@ -47,168 +47,610 @@ typedef long long __m256i __attribute__(
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("avx")))
 
 /* Arithmetic */
+/// \brief Adds two 256-bit vectors of [4 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDPD / ADDPD instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double] containing one of the source operands.
+/// \param __b
+///A 256-bit vector of [4 x double] containing one of the source operands.
+/// \returns A 256-bit vector of [4 x double] containing the sums of both
+///operands.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_add_pd(__m256d __a, __m256d __b)
 {
   return __a+__b;
 }
 
+/// \brief Adds two 256-bit vectors of [8 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDPS / ADDPS instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float] containing one of the source operands.
+/// \param __b
+///A 256-bit vector of [8 x float] containing one of the source operands.
+/// \returns A 256-bit vector of [8 x float] containing the sums of both
+///operands.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_add_ps(__m256 __a, __m256 __b)
 {
   return __a+__b;
 }
 
+/// \brief Subtracts two 256-bit vectors of [4 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VSUBPD / SUBPD instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double] containing the minuend.
+/// \param __b
+///A 256-bit vector of [4 x double] containing the subtrahend.
+/// \returns A 256-bit vector of [4 x double] containing the differences 
between
+///both operands.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_sub_pd(__m256d __a, __m256d __b)
 {
   return __a-__b;
 }
 
+/// \brief Subtracts two 256-bit vectors of [8 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VSUBPS / SUBPS instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float] containing the minuend.
+/// \param __b
+///A 256-bit vector of [8 x float] containing the subtrahend.
+/// \returns A 256-bit vector of [8 x float] containing the differences between
+///both operands.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_sub_ps(__m256 __a, __m256 __b)
 {
   return __a-__b;
 }
 
+/// \brief Adds the even-indexed values and subtracts the odd-indexed values of
+///two 256-bit vectors of [4 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDSUBPD / ADDSUBPD instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double] containing the left source operand.
+/// \param __b
+///A 256-bit vector of [4 x double] containing the right source operand.
+/// \returns A 256-bit vector of [4 x double] containing the alternating sums
+///and differences between both operands.
 static __inline __m256d __DEFAULT_FN_ATTRS
 _mm256_addsub_pd(__m256d __a, __m256d __b)
 {
   return (__m256d)__builtin_ia32_addsubpd256((__v4df)__a, (__v4df)__b);
 }
 
+/// \brief Adds the even-indexed values and subtracts the odd-indexed values of
+///two 256-bit vectors of [8 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDSUBPS / ADDSUBPS instruction.
+///
+/// \param __a
+///A 256-bit vector of [8 x float] containing the left source operand.
+/// \param __b
+///A 256-bit vector of [8 x float] containing the right source operand.
+/// \returns A 256-bit vector of [8 x float] containing the alternating sums 
and
+///differences between both operands.
 static __inline __m256 __DEFAULT_FN_ATTRS
 _mm256_addsub_ps(__m256 __a, __m256 __b)
 {
   return (__m256)__builtin_ia32_addsubps256((__v8sf)__a, (__v8sf)__b);
 }
 
+/// \brief Divides two 256-bit vectors of [4 x double].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VDIVPD / DIVPD instruction.
+///
+/// \param __a
+///A 256-bit vector of [4 x double] containing the dividend.
+/// \param __b
+///A 256-bit vector of [4 x double] containing the divisor.

r262895 - Add doxygen comments to bmiintrin.h's intrinsics.

2016-03-07 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Mon Mar  7 19:36:59 2016
New Revision: 262895

URL: http://llvm.org/viewvc/llvm-project?rev=262895=rev
Log:
Add doxygen comments to bmiintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code 
review upstream.


Modified:
cfe/trunk/lib/Headers/bmiintrin.h

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=262895=262894=262895=diff
==
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Mon Mar  7 19:36:59 2016
@@ -28,12 +28,107 @@
 #ifndef __BMIINTRIN_H
 #define __BMIINTRIN_H
 
+/// \brief Counts the number of trailing zero bits in the operand.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned short _tzcnt_u16(unsigned short a);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c TZCNT instruction.
+///
+/// \param a
+///An unsigned 16-bit integer whose trailing zeros are to be counted.
+/// \returns An unsigned 16-bit integer containing the number of trailing zero
+///bits in the operand.
 #define _tzcnt_u16(a) (__tzcnt_u16((a)))
+
+/// \brief Performs a bitwise AND of the second operand with the one's
+///complement of the first operand.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned int _andn_u32(unsigned int a, unsigned int b);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c ANDN instruction.
+///
+/// \param a
+///An unsigned integer containing one of the operands.
+/// \param b
+///An unsigned integer containing one of the operands.
+/// \returns An unsigned integer containing the bitwise AND of the second
+///operand with the one's complement of the first operand.
 #define _andn_u32(a, b)   (__andn_u32((a), (b)))
+
 /* _bextr_u32 != __bextr_u32 */
+/// \brief Clears all bits in the source except for the least significant bit
+///containing a value of 1 and returns the result.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned int _blsi_u32(unsigned int a);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c BLSI instruction.
+///
+/// \parama a
+///An unsigned integer whose bits are to be cleared.
+/// \returns An unsigned integer containing the result of clearing the bits 
from
+///the source operand.
 #define _blsi_u32(a)  (__blsi_u32((a)))
+
+/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
+///including the least siginificant bit that is set to 1 in the source
+///operand and returns the result.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned int _blsmsk_u32(unsigned int a);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c BLSMSK instruction.
+///
+/// \param a
+///An unsigned integer used to create the mask.
+/// \returns An unsigned integer containing the newly created mask.
 #define _blsmsk_u32(a)(__blsmsk_u32((a)))
+
+/// \brief Clears the least siginificant bit that is set to 1 in the source
+///operand and returns the result.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned int _blsr_u32(unsigned int a);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c BLSR instruction.
+///
+/// \param a
+///An unsigned integer containing the operand to be cleared.
+/// \returns An unsigned integer containing the result of clearing the source
+///operand.
 #define _blsr_u32(a)  (__blsr_u32((a)))
+
+/// \brief Counts the number of trailing zero bits in the operand.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned int _tzcnt_u32(unsigned int a);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c TZCNT instruction.
+///
+/// \param a
+///An unsigned 32-bit integer whose trailing zeros are to be counted.
+/// \returns An unsigned 32-bit integer containing the number of trailing zero
+///bits in the operand.
 #define _tzcnt_u32(a) (__tzcnt_u32((a)))
 
 /* Define the default attributes for the functions in this file. */
@@ -44,12 +139,35 @@
to use it as a potentially faster version of BSF. */
 #define __RELAXED_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
 
+/// \brief Counts the number of trailing zero bits in the operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c TZCNT instruction.
+///
+/// \param __X
+///An unsigned 16-bit integer whose trailing zeros are to be counted.
+/// \returns An unsigned 16-bit integer containing the number of trailing zero
+///bits in the operand.
 static __inline__ unsigned short __RELAXED_FN_ATTRS
 __tzcnt_u16(unsigned short __X)
 {
   return __X ? __builtin_ctzs(__X) : 16;
 }
 
+/// \brief Performs a bitwise AND of the second operand with the one's
+///complement of the first operand.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c ANDN instruction.
+///
+/// 

r262565 - This patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.

2016-03-02 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Wed Mar  2 18:20:11 2016
New Revision: 262565

URL: http://llvm.org/viewvc/llvm-project?rev=262565=rev
Log:
This patch adds doxygen comments for all the intrinsincs in the header file 
tmmintrin.h. 
The doxygen comments are automatically generated based on Sony's intrinsics 
document.

I got an OK from Eric Christopher to commit doxygen comments without prior code 
review upstream.


Modified:
cfe/trunk/lib/Headers/tmmintrin.h

Modified: cfe/trunk/lib/Headers/tmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/tmmintrin.h?rev=262565=262564=262565=diff
==
--- cfe/trunk/lib/Headers/tmmintrin.h (original)
+++ cfe/trunk/lib/Headers/tmmintrin.h Wed Mar  2 18:20:11 2016
@@ -29,187 +29,739 @@
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("ssse3")))
 
+/// \brief Computes the absolute value of each of the packed 8-bit signed
+///integers in the source operand and stores the 8-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PABSB instruction.
+///
+/// \param __a
+///A 64-bit vector of [8 x i8].
+/// \returns A 64-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_abs_pi8(__m64 __a)
 {
 return (__m64)__builtin_ia32_pabsb((__v8qi)__a);
 }
 
+/// \brief Computes the absolute value of each of the packed 8-bit signed
+///integers in the source operand and stores the 8-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPABSB instruction.
+///
+/// \param __a
+///A 128-bit vector of [16 x i8].
+/// \returns A 128-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_abs_epi8(__m128i __a)
 {
 return (__m128i)__builtin_ia32_pabsb128((__v16qi)__a);
 }
 
+/// \brief Computes the absolute value of each of the packed 16-bit signed
+///integers in the source operand and stores the 16-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PABSW instruction.
+///
+/// \param __a
+///A 64-bit vector of [4 x i16].
+/// \returns A 64-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_abs_pi16(__m64 __a)
 {
 return (__m64)__builtin_ia32_pabsw((__v4hi)__a);
 }
 
+/// \brief Computes the absolute value of each of the packed 16-bit signed
+///integers in the source operand and stores the 16-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPABSW instruction.
+///
+/// \param __a
+///A 128-bit vector of [8 x i16].
+/// \returns A 128-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_abs_epi16(__m128i __a)
 {
 return (__m128i)__builtin_ia32_pabsw128((__v8hi)__a);
 }
 
+/// \brief Computes the absolute value of each of the packed 32-bit signed
+///integers in the source operand and stores the 32-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c PABSD instruction.
+///
+/// \param __a
+///A 64-bit vector of [2 x i32].
+/// \returns A 64-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
 _mm_abs_pi32(__m64 __a)
 {
 return (__m64)__builtin_ia32_pabsd((__v2si)__a);
 }
 
+/// \brief Computes the absolute value of each of the packed 32-bit signed
+///integers in the source operand and stores the 32-bit unsigned integer
+///results in the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VPABSD instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x i32].
+/// \returns A 128-bit integer vector containing the absolute values of the
+///elements in the operand.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_abs_epi32(__m128i __a)
 {
 return (__m128i)__builtin_ia32_pabsd128((__v4si)__a);
 }
 
+/// \brief Concatenates the two 128-bit integer vector operands, and
+///right-shifts the result by the number of bytes specified in the 
immediate
+///operand.
+///
+/// \headerfile 
+///
+/// \code
+/// __m128i _mm_alignr_epi8(__m128i a, __m128i b, const int n);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c PALIGNR instruction.
+///
+/// \param a
+///A 128-bit vector of [16 x i8] containing one of the source operands.
+/// \param b
+///A 128-bit vector of [16 x i8] 

r262385 - This patch adds doxygen comments for the intrinsincs in the header file popcntintrin.h.

2016-03-01 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Mar  1 14:04:57 2016
New Revision: 262385

URL: http://llvm.org/viewvc/llvm-project?rev=262385=rev
Log:
This patch adds doxygen comments for the intrinsincs in the header file 
popcntintrin.h.

The doxygen comments are automatically generated based on Sony's intrinsics 
documentation.

Differential Revision: http://reviews.llvm.org/D17550 


Modified:
cfe/trunk/lib/Headers/popcntintrin.h

Modified: cfe/trunk/lib/Headers/popcntintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/popcntintrin.h?rev=262385=262384=262385=diff
==
--- cfe/trunk/lib/Headers/popcntintrin.h (original)
+++ cfe/trunk/lib/Headers/popcntintrin.h Tue Mar  1 14:04:57 2016
@@ -27,12 +27,32 @@
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("popcnt")))
 
+/// \brief Counts the number of bits in the source operand having a value of 1.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c POPCNT instruction.
+///
+/// \param __A
+///An unsigned 32-bit integer operand.
+/// \returns A 32-bit integer containing the number of bits with value 1 in the
+///source operand.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_popcnt_u32(unsigned int __A)
 {
   return __builtin_popcount(__A);
 }
 
+/// \brief Counts the number of bits in the source operand having a value of 1.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c POPCNT instruction.
+///
+/// \param __A
+///A signed 32-bit integer operand.
+/// \returns A 32-bit integer containing the number of bits with value 1 in the
+///source operand.
 static __inline__ int __DEFAULT_FN_ATTRS
 _popcnt32(int __A)
 {
@@ -40,12 +60,32 @@ _popcnt32(int __A)
 }
 
 #ifdef __x86_64__
+/// \brief Counts the number of bits in the source operand having a value of 1.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c POPCNT instruction.
+///
+/// \param __A
+///An unsigned 64-bit integer operand.
+/// \returns A 64-bit integer containing the number of bits with value 1 in the
+///source operand.
 static __inline__ long long __DEFAULT_FN_ATTRS
 _mm_popcnt_u64(unsigned long long __A)
 {
   return __builtin_popcountll(__A);
 }
 
+/// \brief Counts the number of bits in the source operand having a value of 1.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c POPCNT instruction.
+///
+/// \param __A
+///A signed 64-bit integer operand.
+/// \returns A 64-bit integer containing the number of bits with value 1 in the
+///source operand.
 static __inline__ long long __DEFAULT_FN_ATTRS
 _popcnt64(long long __A)
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r260333 - This patch adds doxygen comments for all the intrinsincs in the header file f16cintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document.

2016-02-09 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Feb  9 18:12:24 2016
New Revision: 260333

URL: http://llvm.org/viewvc/llvm-project?rev=260333=rev
Log:
This patch adds doxygen comments for all the intrinsincs in the header file 
f16cintrin.h. The doxygen comments are automatically generated based on Sony's 
intrinsics document.

Differential Revision: http://reviews.llvm.org/D17021


Modified:
cfe/trunk/lib/Headers/f16cintrin.h

Modified: cfe/trunk/lib/Headers/f16cintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/f16cintrin.h?rev=260333=260332=260333=diff
==
--- cfe/trunk/lib/Headers/f16cintrin.h (original)
+++ cfe/trunk/lib/Headers/f16cintrin.h Tue Feb  9 18:12:24 2016
@@ -29,9 +29,19 @@
 #define __F16CINTRIN_H
 
 /* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS \ 
+#define __DEFAULT_FN_ATTRS \
   __attribute__((__always_inline__, __nodebug__, __target__("f16c")))
 
+/// \brief Converts a 16-bit half-precision float value into a 32-bit float
+///value.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPH2PS instruction.
+///
+/// \param a
+///A 16-bit half-precision float value.
+/// \returns The converted 32-bit float value.
 static __inline float __DEFAULT_FN_ATTRS
 _cvtsh_ss(unsigned short a)
 {
@@ -40,17 +50,73 @@ _cvtsh_ss(unsigned short a)
   return r[0];
 }
 
+/// \brief Converts a 32-bit single-precision float value to a 16-bit
+///half-precision float value.
+///
+/// \headerfile 
+///
+/// \code
+/// unsigned short _cvtss_sh(float a, const int imm);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c VCVTPS2PH instruction.
+///
+/// \param a
+///A 32-bit single-precision float value to be converted to a 16-bit
+///half-precision float value.
+/// \param imm
+///An immediate value controlling rounding using bits [2:0]:
+///000: Nearest
+///001: Down
+///010: Up
+///011: Truncate
+///1XX: Use MXCSR.RC for rounding
+/// \returns The converted 16-bit half-precision float value.
 #define _cvtss_sh(a, imm)  \
   ((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
   (imm)))[0]))
 
+/// \brief Converts a 128-bit vector containing 32-bit float values into a
+///128-bit vector containing 16-bit half-precision float values.
+///
+/// \headerfile 
+///
+/// \code
+/// __m128i _mm_cvtps_ph(__m128 a, const int imm);
+/// \endcode
+///
+/// This intrinsic corresponds to the \c VCVTPS2PH instruction.
+///
+/// \param a
+///A 128-bit vector containing 32-bit float values.
+/// \param imm
+///An immediate value controlling rounding using bits [2:0]:
+///000: Nearest
+///001: Down
+///010: Up
+///011: Truncate
+///1XX: Use MXCSR.RC for rounding
+/// \returns A 128-bit vector containing converted 16-bit half-precision float
+///values. The lower 64 bits are used to store the converted 16-bit
+///half-precision floating-point values.
 #define _mm_cvtps_ph(a, imm) \
   ((__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm)))
 
+/// \brief Converts a 128-bit vector containing 16-bit half-precision float
+///values into a 128-bit vector containing 32-bit float values.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VCVTPH2PS instruction.
+///
+/// \param a
+///A 128-bit vector containing 16-bit half-precision float values. The 
lower
+///64 bits are used in the conversion.
+/// \returns A 128-bit vector of [4 x float] containing converted float values.
 static __inline __m128 __DEFAULT_FN_ATTRS
-_mm_cvtph_ps(__m128i __a)
+_mm_cvtph_ps(__m128i a)
 {
-  return (__m128)__builtin_ia32_vcvtph2ps((__v8hi)__a);
+  return (__m128)__builtin_ia32_vcvtph2ps((__v8hi)a);
 }
 
 #undef __DEFAULT_FN_ATTRS


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r260160 - This patch adds doxygen comments for all the intrinsincs in the header file pmmintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document.

2016-02-08 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Mon Feb  8 16:35:09 2016
New Revision: 260160

URL: http://llvm.org/viewvc/llvm-project?rev=260160=rev
Log:
This patch adds doxygen comments for all the intrinsincs in the header file 
pmmintrin.h. The doxygen comments are automatically generated based on Sony's 
intrinsics document.

Differential Revision: http://reviews.llvm.org/D16913


Modified:
cfe/trunk/lib/Headers/pmmintrin.h

Modified: cfe/trunk/lib/Headers/pmmintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/pmmintrin.h?rev=260160=260159=260160=diff
==
--- cfe/trunk/lib/Headers/pmmintrin.h (original)
+++ cfe/trunk/lib/Headers/pmmintrin.h Mon Feb  8 16:35:09 2016
@@ -27,64 +27,231 @@
 #include 
 
 /* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("sse3")))
+#define __DEFAULT_FN_ATTRS \
+  __attribute__((__always_inline__, __nodebug__, __target__("sse3")))
 
+/// \brief Loads data from an unaligned memory location to elements in a 
128-bit
+///vector. If the address of the data is not 16-byte aligned, the 
+///instruction may read two adjacent aligned blocks of memory to retrieve 
+///the requested data. 
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VLDDQU instruction.
+///
+/// \param __p
+///A pointer to a 128-bit integer vector containing integer values.
+/// \returns A 128-bit vector containing the moved values.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_lddqu_si128(__m128i const *__p)
 {
   return (__m128i)__builtin_ia32_lddqu((char const *)__p);
 }
 
+/// \brief Adds the even-indexed values and subtracts the odd-indexed values of
+///two 128-bit vectors of [4 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VADDSUBPS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float] containing the left source operand.
+/// \param __b
+///A 128-bit vector of [4 x float] containing the right source operand.
+/// \returns A 128-bit vector of [4 x float] containing the alternating sums 
and
+///differences of both operands.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_addsub_ps(__m128 __a, __m128 __b)
 {
   return __builtin_ia32_addsubps(__a, __b);
 }
 
+/// \brief Horizontally adds the adjacent pairs of values contained in two
+///128-bit vectors of [4 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VHADDPS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float] containing one of the source operands. 
+///The horizontal sums of the values are stored in the lower bits of the 
+///destination.
+/// \param __b
+///A 128-bit vector of [4 x float] containing one of the source operands. 
+///The horizontal sums of the values are stored in the upper bits of the 
+///destination.
+/// \returns A 128-bit vector of [4 x float] containing the horizontal sums of 
+///both operands.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_hadd_ps(__m128 __a, __m128 __b)
 {
   return __builtin_ia32_haddps(__a, __b);
 }
 
+/// \brief Horizontally subtracts the adjacent pairs of values contained in two
+///128-bit vectors of [4 x float].
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VHSUBPS instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float] containing one of the source operands. 
+///The horizontal differences between the values are stored in the lower 
+///bits of the destination.
+/// \param __b
+///A 128-bit vector of [4 x float] containing one of the source operands. 
+///The horizontal differences between the values are stored in the upper 
+///bits of the destination.
+/// \returns A 128-bit vector of [4 x float] containing the horizontal 
+///differences of both operands.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_hsub_ps(__m128 __a, __m128 __b)
 {
   return __builtin_ia32_hsubps(__a, __b);
 }
 
+/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
+///vector of [4 x float] to float values stored in a 128-bit vector of
+///[4 x float].
+///Bits [127:96] of the source are written to bits [127:96] and [95:64] of
+///the destination.
+///Bits [63:32] of the source are written to bits [63:32] and [31:0] of the
+///destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VMOVSHDUP instruction.
+///
+/// \param __a
+///A 128-bit vector of [4 x float].
+/// \returns A 128-bit vector of [4 x float] containing the moved and 
duplicated
+///values.
 static __inline__ __m128 __DEFAULT_FN_ATTRS
 _mm_movehdup_ps(__m128 __a)
 {
   return __builtin_shufflevector(__a, __a, 1, 1, 3, 3);
 }
 
+/// \brief Duplicates low-order (even-indexed) values from a 128-bit
+///vector of [4 x float] to float values 

r259275 - This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_aes.h.

2016-01-29 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Jan 29 17:59:00 2016
New Revision: 259275

URL: http://llvm.org/viewvc/llvm-project?rev=259275=rev
Log:
This patch adds doxygen comments for the intrinsincs in the header file 
__wmmintrin_aes.h.
The doxygen comments are automatically generated based on Sony's intrinsics 
document.

Differential Revision: http://reviews.llvm.org/D16562


Modified:
cfe/trunk/lib/Headers/__wmmintrin_aes.h

Modified: cfe/trunk/lib/Headers/__wmmintrin_aes.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_aes.h?rev=259275=259274=259275=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_aes.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_aes.h Fri Jan 29 17:59:00 2016
@@ -28,36 +28,121 @@
 /* Define the default attributes for the functions in this file. */
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("aes")))
 
+/// \brief Performs a single round of AES encryption using the Equivalent
+///Inverse Cipher, transforming the state value from the first source
+///operand using a 128-bit round key value contained in the second source
+///operand, and writes the result to the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VAESENC instruction.
+///
+/// \param __V
+///A 128-bit integer vector containing the state value.
+/// \param __R
+///A 128-bit integer vector containing the round key value.
+/// \returns A 128-bit integer vector containing the encrypted value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_aesenc_si128(__m128i __V, __m128i __R)
 {
   return (__m128i)__builtin_ia32_aesenc128(__V, __R);
 }
 
+/// \brief Performs the final round of AES encryption using the Equivalent
+///Inverse Cipher, transforming the state value from the first source
+///operand using a 128-bit round key value contained in the second source
+///operand, and writes the result to the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VAESENCLAST instruction.
+///
+/// \param __V
+///A 128-bit integer vector containing the state value.
+/// \param __R
+///A 128-bit integer vector containing the round key value.
+/// \returns A 128-bit integer vector containing the encrypted value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_aesenclast_si128(__m128i __V, __m128i __R)
 {
   return (__m128i)__builtin_ia32_aesenclast128(__V, __R);
 }
 
+/// \brief Performs a single round of AES decryption using the Equivalent
+///Inverse Cipher, transforming the state value from the first source
+///operand using a 128-bit round key value contained in the second source
+///operand, and writes the result to the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VAESDEC instruction.
+///
+/// \param __V
+///A 128-bit integer vector containing the state value.
+/// \param __R
+///A 128-bit integer vector containing the round key value.
+/// \returns A 128-bit integer vector containing the decrypted value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_aesdec_si128(__m128i __V, __m128i __R)
 {
   return (__m128i)__builtin_ia32_aesdec128(__V, __R);
 }
 
+/// \brief Performs the final round of AES decryption using the Equivalent
+///Inverse Cipher, transforming the state value from the first source
+///operand using a 128-bit round key value contained in the second source
+///operand, and writes the result to the destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VAESDECLAST instruction.
+///
+/// \param __V
+///A 128-bit integer vector containing the state value.
+/// \param __R
+///A 128-bit integer vector containing the round key value.
+/// \returns A 128-bit integer vector containing the decrypted value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_aesdeclast_si128(__m128i __V, __m128i __R)
 {
   return (__m128i)__builtin_ia32_aesdeclast128(__V, __R);
 }
 
+/// \brief Applies the AES InvMixColumns() transformation to an expanded key
+///contained in the source operand, and writes the result to the
+///destination.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c VAESIMC instruction.
+///
+/// \param __V
+///A 128-bit integer vector containing the expanded key.
+/// \returns A 128-bit integer vector containing the transformed value.
 static __inline__ __m128i __DEFAULT_FN_ATTRS
 _mm_aesimc_si128(__m128i __V)
 {
   return (__m128i)__builtin_ia32_aesimc128(__V);
 }
 
+/// \brief Generates a round key for AES encyption, operating on 128-bit data 
+///specified in the first source operand and using an 8-bit round constant
+///specified by the second source operand, and writes the result to the 
+///destination.
+///
+/// \headerfile 
+///
+/// \code
+/// __m128i _mm_aeskeygenassist_si128(__m128i C, const int R);
+/// \endcode
+///

r259239 - This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_pclmul.h. The doxygen comments are automatically generated based on Sony's intrinsics document.

2016-01-29 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Jan 29 14:37:14 2016
New Revision: 259239

URL: http://llvm.org/viewvc/llvm-project?rev=259239=rev
Log:
This patch adds doxygen comments for the intrinsincs in the header file 
__wmmintrin_pclmul.h. The doxygen comments are automatically generated based on 
Sony's intrinsics document.

Differential Revision: http://reviews.llvm.org/D15999

Modified:
cfe/trunk/lib/Headers/__wmmintrin_pclmul.h

Modified: cfe/trunk/lib/Headers/__wmmintrin_pclmul.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/__wmmintrin_pclmul.h?rev=259239=259238=259239=diff
==
--- cfe/trunk/lib/Headers/__wmmintrin_pclmul.h (original)
+++ cfe/trunk/lib/Headers/__wmmintrin_pclmul.h Fri Jan 29 14:37:14 2016
@@ -23,6 +23,34 @@
 #ifndef _WMMINTRIN_PCLMUL_H
 #define _WMMINTRIN_PCLMUL_H
 
+/// \brief Multiplies two 64-bit integer values, which are selected from source
+///operands using the immediate-value operand. The multiplication is a 
+///carry-less multiplication, and the 128-bit integer product is stored in
+///the destination.
+///
+/// \headerfile 
+///
+/// \code 
+/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I);
+/// \endcode 
+///
+/// This intrinsic corresponds to the \c VPCLMULQDQ instruction.
+///
+/// \param __X
+///A 128-bit vector of [2 x i64] containing one of the source operands.
+/// \param __Y
+///A 128-bit vector of [2 x i64] containing one of the source operands.
+/// \param __I
+///An immediate value specifying which 64-bit values to select from the
+///operands.
+///Bit 0 is used to select a value from operand __X,
+///and bit 4 is used to select a value from operand __Y:
+///Bit[0]=0 indicates that bits[63:0] of operand __X are used.
+///Bit[0]=1 indicates that bits[127:64] of operand __X are used.
+///Bit[4]=0 indicates that bits[63:0] of operand __Y are used.
+///Bit[4]=1 indicates that bits[127:64] of operand __Y are used.
+/// \returns The 128-bit integer vector containing the result of the carry-less
+///multiplication of the selected 64-bit values.
 #define _mm_clmulepi64_si128(__X, __Y, __I) \
   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(__X), \
 (__v2di)(__m128i)(__Y), (char)(__I)))


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r258492 - 2 missing intrinsics _cvtss_sh and _mm_cvtps_ph were added to the intrinsics header f16intrin.h

2016-01-21 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Jan 22 00:50:50 2016
New Revision: 258492

URL: http://llvm.org/viewvc/llvm-project?rev=258492=rev
Log:
2 missing intrinsics _cvtss_sh and _mm_cvtps_ph were added to the intrinsics 
header f16intrin.h
Differential Revision: http://reviews.llvm.org/D16177


Modified:
cfe/trunk/lib/Headers/f16cintrin.h
cfe/trunk/test/CodeGen/f16c-builtins.c

Modified: cfe/trunk/lib/Headers/f16cintrin.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/f16cintrin.h?rev=258492=258491=258492=diff
==
--- cfe/trunk/lib/Headers/f16cintrin.h (original)
+++ cfe/trunk/lib/Headers/f16cintrin.h Fri Jan 22 00:50:50 2016
@@ -29,10 +29,23 @@
 #define __F16CINTRIN_H
 
 /* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, 
__target__("f16c")))
+#define __DEFAULT_FN_ATTRS \ 
+  __attribute__((__always_inline__, __nodebug__, __target__("f16c")))
 
-#define _mm_cvtps_ph(a, imm) __extension__ ({ \
- (__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm)); })
+static __inline float __DEFAULT_FN_ATTRS
+_cvtsh_ss(unsigned short a)
+{
+  __v8hi v = {(short)a, 0, 0, 0, 0, 0, 0, 0};
+  __v4sf r = __builtin_ia32_vcvtph2ps(v);
+  return r[0];
+}
+
+#define _cvtss_sh(a, imm)  \
+  ((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
+  (imm)))[0]))
+
+#define _mm_cvtps_ph(a, imm) \
+  ((__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm)))
 
 static __inline __m128 __DEFAULT_FN_ATTRS
 _mm_cvtph_ps(__m128i __a)

Modified: cfe/trunk/test/CodeGen/f16c-builtins.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/f16c-builtins.c?rev=258492=258491=258492=diff
==
--- cfe/trunk/test/CodeGen/f16c-builtins.c (original)
+++ cfe/trunk/test/CodeGen/f16c-builtins.c Fri Jan 22 00:50:50 2016
@@ -5,6 +5,18 @@
 
 #include 
 
+float test_cvtsh_ss(unsigned short a) {
+  // CHECK-LABEL: test_cvtsh_ss
+  // CHECK: @llvm.x86.vcvtph2ps.128
+  return _cvtsh_ss(a);
+}
+
+unsigned short test_cvtss_sh(float a) {
+  // CHECK-LABEL: test_cvtss_sh
+  // CHECK: @llvm.x86.vcvtps2ph.128
+  return _cvtss_sh(a, 0);
+}
+
 __m128 test_mm_cvtph_ps(__m128i a) {
   // CHECK-LABEL: test_mm_cvtph_ps
   // CHECK: @llvm.x86.vcvtph2ps.128


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r257291 - Accidentally removed part of the file header. Restoring it back.

2016-01-10 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Sun Jan 10 10:18:09 2016
New Revision: 257291

URL: http://llvm.org/viewvc/llvm-project?rev=257291=rev
Log:
Accidentally removed part of the file header. Restoring it back.

Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=257291=257290=257291=diff
==
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Sun Jan 10 10:18:09 2016
@@ -1,4 +1,4 @@
-//===--- 
+//===--- CompilerInvocation.cpp 
---===//
 //
 // The LLVM Compiler Infrastructure
 //


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r256396 - Some minor correction based on David Blaikie post-commit code review for r255281.

2015-12-24 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec 24 16:52:41 2015
New Revision: 256396

URL: http://llvm.org/viewvc/llvm-project?rev=256396=rev
Log:
Some minor correction based on David Blaikie post-commit code review for 
r255281.

Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=256396=256395=256396=diff
==
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Dec 24 16:52:41 2015
@@ -1,4 +1,4 @@
-//===--- CompilerInvocation.cpp 
---===//
+//===--- 
 //
 // The LLVM Compiler Infrastructure
 //
@@ -417,8 +417,7 @@ static bool ParseCodeGenArgs(CodeGenOpti
   Opts.EmitCodeView = Args.hasArg(OPT_gcodeview);
   Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
   Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs);
-  if (Triple.isPS4CPU())
-Opts.DebugExplicitImport = true;
+  Opts.DebugExplicitImport = Triple.isPS4CPU(); 
 
   for (const auto  : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ))
 Opts.DebugPrefixMap.insert(StringRef(Arg).split('='));

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=256396=256395=256396=diff
==
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Thu Dec 24 16:52:41 2015
@@ -65,7 +65,7 @@ Parser::DeclGroupPtrTy Parser::ParseName
   if (Tok.is(tok::code_completion)) {
 Actions.CodeCompleteNamespaceDecl(getCurScope());
 cutOffParsing();
-return DeclGroupPtrTy();;
+return DeclGroupPtrTy();
   }
 
   SourceLocation IdentLoc;


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r255281 - Do not generate DW_TAG_imported_module for anonymous namespaces (even nested) for all the platforms except PS4.

2015-12-10 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Dec 10 12:52:50 2015
New Revision: 255281

URL: http://llvm.org/viewvc/llvm-project?rev=255281=rev
Log:
Do not generate DW_TAG_imported_module for anonymous namespaces (even nested) 
for all the platforms except PS4.
For PS4, generate explicit import for anonymous namespaces and mark it by 
DW_AT_artificial attribute.

Differential Revision: http://reviews.llvm.org/D12624


Added:
cfe/trunk/test/CodeGenCXX/debug-info-anon-namespace.cpp
Modified:
cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/include/clang/Sema/Sema.h
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/Parse/ParseDecl.cpp
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=255281=255280=255281=diff
==
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def Thu Dec 10 12:52:50 2015
@@ -166,6 +166,10 @@ CODEGENOPT(DebugColumnInfo, 1, 0) ///< W
 CODEGENOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should 
contain
///< external references to a PCH or module.
 
+CODEGENOPT(DebugExplicitImport, 1, 0)  ///< Whether or not debug info should 
+   ///< contain explicit imports for 
+   ///< anonymous namespaces
+
 CODEGENOPT(EmitLLVMUseLists, 1, 0) ///< Control whether to serialize use-lists.
 
 /// The user specified number of registers to be used for integral arguments,

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=255281=255280=255281=diff
==
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Thu Dec 10 12:52:50 2015
@@ -2337,8 +2337,8 @@ private:
 
   void DiagnoseUnexpectedNamespace(NamedDecl *Context);
 
-  Decl *ParseNamespace(unsigned Context, SourceLocation ,
-   SourceLocation InlineLoc = SourceLocation());
+  DeclGroupPtrTy ParseNamespace(unsigned Context, SourceLocation ,
+SourceLocation InlineLoc = SourceLocation());
   void ParseInnerNamespace(std::vector& IdentLoc,
std::vector& Ident,
std::vector& NamespaceLoc,

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=255281=255280=255281=diff
==
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Thu Dec 10 12:52:50 2015
@@ -4093,7 +4093,8 @@ public:
SourceLocation IdentLoc,
IdentifierInfo *Ident,
SourceLocation LBrace,
-   AttributeList *AttrList);
+   AttributeList *AttrList,
+   UsingDirectiveDecl * );
   void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace);
 
   NamespaceDecl *getStdNamespace() const;

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=255281=255280=255281=diff
==
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Dec 10 12:52:50 2015
@@ -3408,10 +3408,14 @@ llvm::DIScope *CGDebugInfo::getCurrentCo
 void CGDebugInfo::EmitUsingDirective(const UsingDirectiveDecl ) {
   if (CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo)
 return;
-  DBuilder.createImportedModule(
-  getCurrentContextDescriptor(cast(UD.getDeclContext())),
-  getOrCreateNameSpace(UD.getNominatedNamespace()),
-  getLineNumber(UD.getLocation()));
+  const NamespaceDecl *NSDecl = UD.getNominatedNamespace();
+  if (!NSDecl->isAnonymousNamespace() || 
+  CGM.getCodeGenOpts().DebugExplicitImport) { 
+DBuilder.createImportedModule(
+getCurrentContextDescriptor(cast(UD.getDeclContext())),
+getOrCreateNameSpace(NSDecl),
+getLineNumber(UD.getLocation()));
+  }
 }
 
 void CGDebugInfo::EmitUsingDecl(const UsingDecl ) {

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=255281=255280=255281=diff

r250252 - This patch adds missing pieces to clang, including the PS4 toolchain

2015-10-13 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Oct 13 18:40:02 2015
New Revision: 250252

URL: http://llvm.org/viewvc/llvm-project?rev=250252=rev
Log:
This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

Differential Revision: http://reviews.llvm.org/D13482


Added:
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/.keep
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/.keep
cfe/trunk/test/Driver/no-integrated-as.s
cfe/trunk/test/Driver/ps4-header-search.c
cfe/trunk/test/Driver/ps4-linker-non-win.c
cfe/trunk/test/Driver/ps4-linker-win.c
cfe/trunk/test/Driver/ps4-pic.c
cfe/trunk/test/Driver/ps4-sdk-root.c
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Driver/Tools.h
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
cfe/trunk/test/Driver/debug-options.c
cfe/trunk/test/Driver/stack-protector.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=250252=250251=250252=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Tue Oct 13 18:40:02 
2015
@@ -196,4 +196,18 @@ def warn_target_unsupported_nan2008 : Wa
 def warn_target_unsupported_nanlegacy : Warning<
   "ignoring '-mnan=legacy' option because the '%0' architecture does not 
support it">,
   InGroup;
+
+def warn_drv_unable_to_find_directory_expected : Warning<
+  "unable to find %0 directory, expected to be in '%1'">,
+  InGroup, DefaultIgnore;
+
+def warn_drv_ps4_force_pic : Warning<
+  "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
+  InGroup;
+
+def warn_drv_ps4_sdk_dir : Warning<
+  "environment variable SCE_PS4_SDK_DIR is set, but points to invalid or 
nonexistent directory '%0'">,
+  InGroup;
+
+def err_drv_unsupported_linker : Error<"unsupported value '%0' for -linker 
option">;
 }

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=250252=250251=250252=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Oct 13 18:40:02 2015
@@ -823,3 +823,7 @@ def CudaCompat : DiagGroup<"cuda-compat"
 
 // A warning group for things that will change semantics in the future.
 def FutureCompat : DiagGroup<"future-compat">;
+
+def InvalidOrNonExistentDirectory : 
DiagGroup<"invalid-or-nonexistent-directory">;
+
+def OptionIgnored : DiagGroup<"option-ignored">;

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=250252=250251=250252=diff
==
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Oct 13 18:40:02 2015
@@ -2261,6 +2261,9 @@ const ToolChain ::getToolChain(co
 case llvm::Triple::CUDA:
   TC = new toolchains::CudaToolChain(*this, Target, Args);
   break;
+case llvm::Triple::PS4:
+  TC = new toolchains::PS4CPU(*this, Target, Args);
+  break;
 default:
   // Of these targets, Hexagon is the only one that might have
   // an OS of Linux, in which case it got handled above already.

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=250252=250251=250252=diff
==
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Oct 13 18:40:02 2015
@@ -4066,3 +4066,77 @@ void WebAssembly::addClangTargetOptions(
  options::OPT_fno_use_init_array, true))
 CC1Args.push_back("-fuse-init-array");
 }
+
+PS4CPU::PS4CPU(const Driver , const llvm::Triple , const ArgList 
)
+: Generic_ELF(D, Triple, Args) {
+  if (Args.hasArg(options::OPT_static))
+D.Diag(diag::err_drv_unsupported_opt_for_target) << "-static" << "PS4";
+
+  // Determine where to find the PS4 libraries. We use SCE_PS4_SDK_DIR
+  // if it exists; otherwise use the driver's installation path, which
+  // should be /host_tools/bin.
+
+  SmallString<512> PS4SDKDir;
+  if (const char *EnvValue = getenv("SCE_PS4_SDK_DIR"))
+if (!llvm::sys::fs::exists(EnvValue))
+  

r250262 - I took care of the build problem in the commit 250252.

2015-10-13 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Tue Oct 13 20:09:02 2015
New Revision: 250262

URL: http://llvm.org/viewvc/llvm-project?rev=250262=rev
Log:
I took care of the build problem in the commit 250252.
Resubmitting the patch. 

This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

Differential Revision: http://reviews.llvm.org/D13482


Added:
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/.keep
  - copied unchanged from r250256, 
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/.keep
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/.keep
  - copied unchanged from r250256, 
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/.keep
cfe/trunk/test/Driver/no-integrated-as.s
  - copied unchanged from r250256, cfe/trunk/test/Driver/no-integrated-as.s
cfe/trunk/test/Driver/ps4-header-search.c
  - copied unchanged from r250256, cfe/trunk/test/Driver/ps4-header-search.c
cfe/trunk/test/Driver/ps4-linker-non-win.c
  - copied unchanged from r250256, 
cfe/trunk/test/Driver/ps4-linker-non-win.c
cfe/trunk/test/Driver/ps4-linker-win.c
  - copied unchanged from r250256, cfe/trunk/test/Driver/ps4-linker-win.c
cfe/trunk/test/Driver/ps4-pic.c
  - copied unchanged from r250256, cfe/trunk/test/Driver/ps4-pic.c
cfe/trunk/test/Driver/ps4-sdk-root.c
  - copied unchanged from r250256, cfe/trunk/test/Driver/ps4-sdk-root.c
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Driver/Tools.h
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
cfe/trunk/test/Driver/debug-options.c
cfe/trunk/test/Driver/stack-protector.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=250262=250261=250262=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Tue Oct 13 20:09:02 
2015
@@ -196,4 +196,18 @@ def warn_target_unsupported_nan2008 : Wa
 def warn_target_unsupported_nanlegacy : Warning<
   "ignoring '-mnan=legacy' option because the '%0' architecture does not 
support it">,
   InGroup;
+
+def warn_drv_unable_to_find_directory_expected : Warning<
+  "unable to find %0 directory, expected to be in '%1'">,
+  InGroup, DefaultIgnore;
+
+def warn_drv_ps4_force_pic : Warning<
+  "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
+  InGroup;
+
+def warn_drv_ps4_sdk_dir : Warning<
+  "environment variable SCE_PS4_SDK_DIR is set, but points to invalid or 
nonexistent directory '%0'">,
+  InGroup;
+
+def err_drv_unsupported_linker : Error<"unsupported value '%0' for -linker 
option">;
 }

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=250262=250261=250262=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Oct 13 20:09:02 2015
@@ -823,3 +823,7 @@ def CudaCompat : DiagGroup<"cuda-compat"
 
 // A warning group for things that will change semantics in the future.
 def FutureCompat : DiagGroup<"future-compat">;
+
+def InvalidOrNonExistentDirectory : 
DiagGroup<"invalid-or-nonexistent-directory">;
+
+def OptionIgnored : DiagGroup<"option-ignored">;

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=250262=250261=250262=diff
==
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Oct 13 20:09:02 2015
@@ -2261,6 +2261,9 @@ const ToolChain ::getToolChain(co
 case llvm::Triple::CUDA:
   TC = new toolchains::CudaToolChain(*this, Target, Args);
   break;
+case llvm::Triple::PS4:
+  TC = new toolchains::PS4CPU(*this, Target, Args);
+  break;
 default:
   // Of these targets, Hexagon is the only one that might have
   // an OS of Linux, in which case it got handled above already.

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=250262=250261=250262=diff
==
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Oct 13 

r248567 - New test ps4-linker-win.c (added in r48546) is causing problems for Windows bots. I'm deleting this file during investigation.

2015-09-25 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Fri Sep 25 04:10:33 2015
New Revision: 248567

URL: http://llvm.org/viewvc/llvm-project?rev=248567=rev
Log:
New test ps4-linker-win.c (added in r48546) is causing problems for Windows 
bots. I'm deleting this file during investigation.

Removed:
cfe/trunk/test/Driver/ps4-linker-win.c

Removed: cfe/trunk/test/Driver/ps4-linker-win.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/ps4-linker-win.c?rev=248566=auto
==
--- cfe/trunk/test/Driver/ps4-linker-win.c (original)
+++ cfe/trunk/test/Driver/ps4-linker-win.c (removed)
@@ -1,26 +0,0 @@
-// The full path to the gold linker was not found on Windows because the
-// driver fails to add an .exe extension to the name.
-// We check that gold linker's full name (with an extension) is specified
-// on the command line if -linker=gold, or -shared with no -linker option
-// are passed. Otherwise, we check that the PS4's linker's full name is
-// specified.
-
-// REQUIRES: system-windows, x86-registered-target
-
-// RUN: touch %T/ps4-ld.exe
-// RUN: touch %T/ps4-ld.gold.exe
-
-// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4  %s -linker=gold -### 
2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-PS4-GOLD %s
-// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4  %s -shared -### 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-PS4-GOLD %s
-
-// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4  %s -### 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4  %s -linker=ps4 -### 2>&1 
\
-// RUN:   | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4  %s -shared \
-// RUN: -linker=ps4 -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER 
%s
-
-// CHECK-PS4-GOLD: ps4-ld.gold.exe
-// CHECK-PS4-LINKER: ps4-ld.exe


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r248546 - This patch adds missing pieces to clang, including the PS4 toolchain

2015-09-24 Thread Ekaterina Romanova via cfe-commits
Author: kromanova
Date: Thu Sep 24 17:06:52 2015
New Revision: 248546

URL: http://llvm.org/viewvc/llvm-project?rev=248546=rev
Log:
This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

Differential Revision: http://reviews.llvm.org/D11279


Added:
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/.keep
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/
cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/.keep
cfe/trunk/test/Driver/ps4-header-search.c
cfe/trunk/test/Driver/ps4-linker-non-win.c
cfe/trunk/test/Driver/ps4-linker-win.c
cfe/trunk/test/Driver/ps4-pic.c
cfe/trunk/test/Driver/ps4-sdk-root.c
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Driver/Tools.h
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
cfe/trunk/test/Driver/debug-options.c
cfe/trunk/test/Driver/rtti-options.cpp
cfe/trunk/test/Driver/stack-protector.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=248546=248545=248546=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Sep 24 17:06:52 
2015
@@ -192,4 +192,18 @@ def warn_target_unsupported_nan2008 : Wa
 def warn_target_unsupported_nanlegacy : Warning<
   "ignoring '-mnan=legacy' option because the '%0' architecture does not 
support it">,
   InGroup;
+
+def warn_drv_unable_to_find_directory_expected : Warning<
+  "unable to find %0 directory, expected to be in '%1'">,
+  InGroup;
+
+def warn_drv_ps4_force_pic : Warning<
+  "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
+  InGroup;
+
+def warn_drv_ps4_sdk_dir : Warning<
+  "environment variable SCE_PS4_SDK_DIR is set, but points to invalid or 
nonexistent directory '%0'">,
+  InGroup;
+
+def err_drv_unsupported_linker : Error<"unsupported value '%0' for -linker 
option">;
 }

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=248546=248545=248546=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Sep 24 17:06:52 2015
@@ -820,3 +820,7 @@ def CudaCompat : DiagGroup<"cuda-compat"
 
 // A warning group for things that will change semantics in the future.
 def FutureCompat : DiagGroup<"future-compat">;
+
+def InvalidOrNonExistentDirectory : 
DiagGroup<"invalid-or-nonexistent-directory">;
+
+def OptionIgnored : DiagGroup<"option-ignored">;

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=248546=248545=248546=diff
==
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Sep 24 17:06:52 2015
@@ -2254,6 +2254,9 @@ const ToolChain ::getToolChain(co
 case llvm::Triple::CUDA:
   TC = new toolchains::CudaToolChain(*this, Target, Args);
   break;
+case llvm::Triple::PS4:
+  TC = new toolchains::PS4CPU(*this, Target, Args);
+  break;
 default:
   // Of these targets, Hexagon is the only one that might have
   // an OS of Linux, in which case it got handled above already.

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=248546=248545=248546=diff
==
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Sep 24 17:06:52 2015
@@ -4065,3 +4065,69 @@ void WebAssembly::addClangTargetOptions(
  options::OPT_fno_use_init_array, true))
 CC1Args.push_back("-fuse-init-array");
 }
+
+PS4CPU::PS4CPU(const Driver , const llvm::Triple , const ArgList 
)
+: Generic_ELF(D, Triple, Args) {
+  if (Args.hasArg(options::OPT_static))
+D.Diag(diag::err_drv_unsupported_opt_for_target) << "-static" << "PS4";
+
+  // Determine where to find the PS4 libraries. We use SCE_PS4_SDK_DIR
+  // if it exists; otherwise use the driver's installation