[PATCH] D48187: [Intrinsics] Add/move some builtin declarations in intrin.h to get ms-intrinsics.c to not issue warnings
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 14 12:25:23 PDT 2018
craig.topper created this revision.
craig.topper added a reviewer: rnk.
Herald added a reviewer: javed.absar.
Herald added a subscriber: kristof.beyls.
__ud2 and __int2c were missing declarations entirely. And the bitscans were only under __x86_64__, but they seem to be in BuiltinsARM.def as well and are tested by ms_intrinsics.c
https://reviews.llvm.org/D48187
Files:
lib/Headers/intrin.h
Index: lib/Headers/intrin.h
===================================================================
--- lib/Headers/intrin.h
+++ lib/Headers/intrin.h
@@ -83,6 +83,7 @@
void __incfsword(unsigned long);
unsigned long __indword(unsigned short);
void __indwordstring(unsigned short, unsigned long *, unsigned long);
+void __int2c(void);
void __invlpg(void *);
unsigned short __inword(unsigned short);
void __inwordstring(unsigned short, unsigned short *, unsigned long);
@@ -140,6 +141,7 @@
void __svm_vmload(size_t);
void __svm_vmrun(size_t);
void __svm_vmsave(size_t);
+void __ud2(void);
unsigned __int64 __ull_rshift(unsigned __int64, int);
void __vmx_off(void);
void __vmx_vmptrst(unsigned __int64 *);
@@ -246,10 +248,6 @@
void __writegsdword(unsigned long, unsigned long);
void __writegsqword(unsigned long, unsigned __int64);
void __writegsword(unsigned long, unsigned short);
-static __inline__
-unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask);
-static __inline__
-unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask);
unsigned char _bittest64(__int64 const *, __int64);
unsigned char _bittestandcomplement64(__int64 *, __int64);
unsigned char _bittestandreset64(__int64 *, __int64);
@@ -304,6 +302,11 @@
#if defined(__x86_64__) || defined(__arm__)
static __inline__
+unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask);
+static __inline__
+unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask);
+
+static __inline__
__int64 _InterlockedDecrement64(__int64 volatile *_Addend);
static __inline__
__int64 _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48187.151401.patch
Type: text/x-patch
Size: 1703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180614/e0b2a299/attachment.bin>
More information about the cfe-commits
mailing list