Skip to content

[Headers] Add \returns to _rdpid_u32 #70481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2023
Merged

[Headers] Add \returns to _rdpid_u32 #70481

merged 1 commit into from
Oct 27, 2023

Conversation

pogo59
Copy link
Collaborator

@pogo59 pogo59 commented Oct 27, 2023

Our doc tooling complained about this missing directive.

@pogo59 pogo59 requested review from RKSimon and phoebewang October 27, 2023 17:01
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics labels Oct 27, 2023
@llvmbot
Copy link
Member

llvmbot commented Oct 27, 2023

@llvm/pr-subscribers-backend-x86

@llvm/pr-subscribers-clang

Author: Paul T Robinson (pogo59)

Changes

Our doc tooling complained about this missing directive.


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

1 Files Affected:

  • (modified) clang/lib/Headers/immintrin.h (+3-1)
diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h
index 642602be14e60e6..9bfe2fcdabdb3a5 100644
--- a/clang/lib/Headers/immintrin.h
+++ b/clang/lib/Headers/immintrin.h
@@ -291,11 +291,13 @@
 
 #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
     defined(__RDPID__)
-/// Returns the value of the IA32_TSC_AUX MSR (0xc0000103).
+/// Reads the value of the IA32_TSC_AUX MSR (0xc0000103).
 ///
 /// \headerfile <immintrin.h>
 ///
 /// This intrinsic corresponds to the <c> RDPID </c> instruction.
+///
+/// \returns The 32-bit contents of the MSR.
 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("rdpid")))
 _rdpid_u32(void) {
   return __builtin_ia32_rdpid();

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pogo59 pogo59 merged commit 793e636 into llvm:main Oct 27, 2023
@pogo59 pogo59 deleted the rdpid-returns branch October 27, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants