[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-10 Thread Paul T Robinson via cfe-commits

https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Shengchen Kan via cfe-commits

https://github.com/KanRobert approved this pull request.


https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Phoebe Wang via cfe-commits

https://github.com/phoebewang approved this pull request.

LGTM.

https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Shengchen Kan via cfe-commits

KanRobert wrote:

cc @FreddyLeaf 

https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Paul T Robinson via cfe-commits

pogo59 wrote:

I'm going to be adding some new function descriptions to this file shortly, and 
figured I should get the formatting thing out of the way first.

https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Paul T Robinson via cfe-commits

https://github.com/pogo59 updated 
https://github.com/llvm/llvm-project/pull/77525

>From cd91a7f0e5cacb682cb6280655a8d1112cecaf6a Mon Sep 17 00:00:00 2001
From: Paul Robinson 
Date: Tue, 9 Jan 2024 13:22:36 -0800
Subject: [PATCH 1/2] [Headers][X86] Reformat ia32intrin.h doc to match the
 other headers

Doxygen comment style for every other intrinsic-function header uses
/// comments, so change ia32intrin.h from the /** style to /// style.
While I was in there, change ` INSTR ` to `\c INSTR` and toss
in a few missing full-stops.
---
 clang/lib/Headers/ia32intrin.h | 376 -
 1 file changed, 182 insertions(+), 194 deletions(-)

diff --git a/clang/lib/Headers/ia32intrin.h b/clang/lib/Headers/ia32intrin.h
index f1904efd71c4c7..04238d8f176ef4 100644
--- a/clang/lib/Headers/ia32intrin.h
+++ b/clang/lib/Headers/ia32intrin.h
@@ -26,51 +26,48 @@
 #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
 #endif
 
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+/// 
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfd(int __A) {
   return __builtin_ctz((unsigned int)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsrd(int __A) {
   return 31 - __builtin_clz((unsigned int)__A);
 }
 
-/** Swaps the bytes in the input. Converting little endian to big endian or
- *  vice versa.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSWAP  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the swapped bytes.
- */
+/// Swaps the bytes in the input. Converting little endian to big endian or
+///vice versa.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSWAP instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the swapped bytes.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bswapd(int __A) {
   return (int)__builtin_bswap32((unsigned int)__A);
@@ -85,51 +82,48 @@ _bswap(int __A) {
 #define _bit_scan_reverse(A) __bsrd((A))
 
 #ifdef __x86_64__
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 64-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfq(long long __A) {
   return (long long)__builtin_ctzll((unsigned long long)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 64-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsrq(long long __A) {
   return 63 - __builtin_clzll((unsigned long long)__A);
 }
 
-/** Swaps the bytes i

[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread via cfe-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff 47605ffec8864e989905027b2f56277e2dc8b8fa 
cd91a7f0e5cacb682cb6280655a8d1112cecaf6a -- clang/lib/Headers/ia32intrin.h
``





View the diff from clang-format here.


``diff
diff --git a/clang/lib/Headers/ia32intrin.h b/clang/lib/Headers/ia32intrin.h
index 04238d8f17..a8b59dfaad 100644
--- a/clang/lib/Headers/ia32intrin.h
+++ b/clang/lib/Headers/ia32intrin.h
@@ -30,7 +30,7 @@
 ///input is 0.
 ///
 /// \headerfile 
-/// 
+///
 /// This intrinsic corresponds to the \c BSF instruction or the
 ///\c TZCNT instruction.
 ///
@@ -135,7 +135,7 @@ __bswapq(long long __A) {
 /// Counts the number of bits in the source operand having a value of 1.
 ///
 /// \headerfile 
-/// 
+///
 /// This intrinsic corresponds to the \c POPCNT instruction or a
 ///a sequence of arithmetic and logic ops to calculate it.
 ///
@@ -263,7 +263,7 @@ _castu64_f64(unsigned long long __A) {
 /// unsigned char operand.
 ///
 /// \headerfile 
-/// 
+///
 /// This intrinsic corresponds to the \c CRC32B instruction.
 ///
 /// \param __C
@@ -283,7 +283,7 @@ __crc32b(unsigned int __C, unsigned char __D)
 ///unsigned short operand.
 ///
 /// \headerfile 
-/// 
+///
 /// This intrinsic corresponds to the \c CRC32W instruction.
 ///
 /// \param __C
@@ -303,7 +303,7 @@ __crc32w(unsigned int __C, unsigned short __D)
 ///second unsigned integer operand.
 ///
 /// \headerfile 
-/// 
+///
 /// This intrinsic corresponds to the \c CRC32D instruction.
 ///
 /// \param __C

``




https://github.com/llvm/llvm-project/pull/77525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread via cfe-commits

llvmbot wrote:



@llvm/pr-subscribers-backend-x86

@llvm/pr-subscribers-clang

Author: Paul T Robinson (pogo59)


Changes

Doxygen comment style for every other intrinsic-function header uses /// 
comments, so change ia32intrin.h from the /** style to /// style. While I was 
in there, change ` INSTR ` to `\c INSTR` and toss in a few 
missing full-stops.

---
Full diff: https://github.com/llvm/llvm-project/pull/77525.diff


1 Files Affected:

- (modified) clang/lib/Headers/ia32intrin.h (+182-194) 


``diff
diff --git a/clang/lib/Headers/ia32intrin.h b/clang/lib/Headers/ia32intrin.h
index f1904efd71c4c7..04238d8f176ef4 100644
--- a/clang/lib/Headers/ia32intrin.h
+++ b/clang/lib/Headers/ia32intrin.h
@@ -26,51 +26,48 @@
 #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
 #endif
 
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+/// 
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfd(int __A) {
   return __builtin_ctz((unsigned int)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsrd(int __A) {
   return 31 - __builtin_clz((unsigned int)__A);
 }
 
-/** Swaps the bytes in the input. Converting little endian to big endian or
- *  vice versa.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSWAP  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the swapped bytes.
- */
+/// Swaps the bytes in the input. Converting little endian to big endian or
+///vice versa.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSWAP instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the swapped bytes.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bswapd(int __A) {
   return (int)__builtin_bswap32((unsigned int)__A);
@@ -85,51 +82,48 @@ _bswap(int __A) {
 #define _bit_scan_reverse(A) __bsrd((A))
 
 #ifdef __x86_64__
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 64-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfq(long long __A) {
   return (long long)__builtin_ctzll((unsigned long long)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 64-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsrq(long long __A) {
   return 63 - __builtin_clzll((unsigned long long)__A);
 }
 
-/** Swaps the bytes in the input. Converting little endian to big endian or
- *  vice versa.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  

[clang] [Headers][X86] Reformat ia32intrin.h doc to match the other headers (PR #77525)

2024-01-09 Thread Paul T Robinson via cfe-commits

https://github.com/pogo59 created 
https://github.com/llvm/llvm-project/pull/77525

Doxygen comment style for every other intrinsic-function header uses /// 
comments, so change ia32intrin.h from the /** style to /// style. While I was 
in there, change ` INSTR ` to `\c INSTR` and toss in a few missing 
full-stops.

>From cd91a7f0e5cacb682cb6280655a8d1112cecaf6a Mon Sep 17 00:00:00 2001
From: Paul Robinson 
Date: Tue, 9 Jan 2024 13:22:36 -0800
Subject: [PATCH] [Headers][X86] Reformat ia32intrin.h doc to match the other
 headers

Doxygen comment style for every other intrinsic-function header uses
/// comments, so change ia32intrin.h from the /** style to /// style.
While I was in there, change ` INSTR ` to `\c INSTR` and toss
in a few missing full-stops.
---
 clang/lib/Headers/ia32intrin.h | 376 -
 1 file changed, 182 insertions(+), 194 deletions(-)

diff --git a/clang/lib/Headers/ia32intrin.h b/clang/lib/Headers/ia32intrin.h
index f1904efd71c4c7..04238d8f176ef4 100644
--- a/clang/lib/Headers/ia32intrin.h
+++ b/clang/lib/Headers/ia32intrin.h
@@ -26,51 +26,48 @@
 #define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
 #endif
 
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+/// 
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfd(int __A) {
   return __builtin_ctz((unsigned int)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsrd(int __A) {
   return 31 - __builtin_clz((unsigned int)__A);
 }
 
-/** Swaps the bytes in the input. Converting little endian to big endian or
- *  vice versa.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSWAP  instruction.
- *
- *  \param __A
- * A 32-bit integer operand.
- *  \returns A 32-bit integer containing the swapped bytes.
- */
+/// Swaps the bytes in the input. Converting little endian to big endian or
+///vice versa.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSWAP instruction.
+///
+/// \param __A
+///A 32-bit integer operand.
+/// \returns A 32-bit integer containing the swapped bytes.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bswapd(int __A) {
   return (int)__builtin_bswap32((unsigned int)__A);
@@ -85,51 +82,48 @@ _bswap(int __A) {
 #define _bit_scan_reverse(A) __bsrd((A))
 
 #ifdef __x86_64__
-/** Find the first set bit starting from the lsb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSF  instruction or the
- *   TZCNT  instruction.
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the lsb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSF instruction or the
+///\c TZCNT instruction.
+///
+/// \param __A
+///A 64-bit integer operand.
+/// \returns A 32-bit integer containing the bit number.
 static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR
 __bsfq(long long __A) {
   return (long long)__builtin_ctzll((unsigned long long)__A);
 }
 
-/** Find the first set bit starting from the msb. Result is undefined if
- *  input is 0.
- *
- *  \headerfile 
- *
- *  This intrinsic corresponds to the  BSR  instruction or the
- *   LZCNT  instruction and an  XOR .
- *
- *  \param __A
- * A 64-bit integer operand.
- *  \returns A 32-bit integer containing the bit number.
- */
+/// Find the first set bit starting from the msb. Result is undefined if
+///input is 0.
+///
+/// \headerfile 
+///
+/// This intrinsic corresponds to the \c BSR instruction or the
+///\c LZCNT instruction and an \c XOR.
+///
+/// \param __A
+///A 64-bit intege