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

Ekaterina Romanova via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 1 12:04:57 PST 2016


Author: kromanova
Date: Tue Mar  1 14:04:57 2016
New Revision: 262385

URL: http://llvm.org/viewvc/llvm-project?rev=262385&view=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&r1=262384&r2=262385&view=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 <x86intrin.h>
+///
+/// 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 <x86intrin.h>
+///
+/// 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 <x86intrin.h>
+///
+/// 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 <x86intrin.h>
+///
+/// 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)
 {




More information about the cfe-commits mailing list