From: Craig Topper Date: Thu, 21 Jun 2018 17:07:04 +0000 (+0000) Subject: [Intrinsics] Add/move some builtin declarations in intrin.h to get ms-intrinsics... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2431c6c337e7fb340e79dbd65dd96f599268121;p=platform%2Fupstream%2Fllvm.git [Intrinsics] Add/move some builtin declarations in intrin.h to get ms-intrinsics.c to not issue warnings 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 Differential Revision: https://reviews.llvm.org/D48187 llvm-svn: 335259 --- diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h index 5ac8e30..cf6e25a 100644 --- a/clang/lib/Headers/intrin.h +++ b/clang/lib/Headers/intrin.h @@ -83,6 +83,7 @@ void __incfsdword(unsigned long); 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_stgi(void); 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 __writegsbyte(unsigned long, unsigned char); 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 @@ unsigned __int64 _umul128(unsigned __int64, #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);