[clang] [clang] [doc] Added documentation to intrinsics in cpuid.h (PR #170507)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 3 23:16:08 PST 2025


================
@@ -345,6 +418,27 @@ static __inline int __get_cpuid_count (unsigned int __leaf,
 // builtin. Given __has_builtin does not detect builtins on aux triples, we need
 // to explicitly check for some offloading cases.
 #if !defined(__NVPTX__) && !defined(__AMDGPU__) && !defined(__SPIRV__)
+/// Executes the \c CPUID instruction with the specified leaf and subleaf
+/// values, and returns the results from the CPU's registers.
+///
+/// \headerfile <cpuid.h>
+///
+/// This intrinsic corresponds to the <c> CPUID </c> instruction.
+///
+/// \param __cpu_info
+///    An output array of four integers:
+///    <ul>
+///    <li>\a __cpuInfo[0] receives the value of the \c eax register.</li>
+///    <li>\a__cpuInfo[1] receives the value of the \c ebx register.</li>
+///    <li>\a__cpuInfo[2] receives the value of the \c ecx register.</li>
+///    <li>\a__cpuInfo[3] receives the value of the \c edx register.</li>
----------------
phoebewang wrote:

Space after `\a`

https://github.com/llvm/llvm-project/pull/170507


More information about the cfe-commits mailing list