[PATCH] D135966: [X86] Use unsigned int for return type of __get_cpuid_max.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 09:14:28 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: RKSimon, pengfei.
Herald added a subscriber: StephenFan.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: clang.

It looks like gcc's header already uses unsigned int and we should
match.

Fixes PR58359.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135966

Files:
  clang/lib/Headers/cpuid.h


Index: clang/lib/Headers/cpuid.h
===================================================================
--- clang/lib/Headers/cpuid.h
+++ clang/lib/Headers/cpuid.h
@@ -261,7 +261,8 @@
         : "0"(__leaf), "2"(__count))
 #endif
 
-static __inline int __get_cpuid_max (unsigned int __leaf, unsigned int *__sig)
+static __inline unsigned int __get_cpuid_max (unsigned int __leaf,
+                                              unsigned int *__sig)
 {
     unsigned int __eax, __ebx, __ecx, __edx;
 #if __i386__


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135966.467794.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221014/5304d13b/attachment.bin>


More information about the cfe-commits mailing list