Path: blob/master/tools/android-sdk/renderscript/clang-include/adxintrin.h
496 views
/*===---- adxintrin.h - ADX intrinsics -------------------------------------===1*2* Permission is hereby granted, free of charge, to any person obtaining a copy3* of this software and associated documentation files (the "Software"), to deal4* in the Software without restriction, including without limitation the rights5* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6* copies of the Software, and to permit persons to whom the Software is7* furnished to do so, subject to the following conditions:8*9* The above copyright notice and this permission notice shall be included in10* all copies or substantial portions of the Software.11*12* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN18* THE SOFTWARE.19*20*===-----------------------------------------------------------------------===21*/2223#ifndef __IMMINTRIN_H24#error "Never use <adxintrin.h> directly; include <immintrin.h> instead."25#endif2627#ifndef __ADXINTRIN_H28#define __ADXINTRIN_H2930/* Define the default attributes for the functions in this file. */31#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))3233/* Intrinsics that are available only if __ADX__ defined */34static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))35_addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y,36unsigned int *__p)37{38return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);39}4041#ifdef __x86_64__42static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))43_addcarryx_u64(unsigned char __cf, unsigned long long __x,44unsigned long long __y, unsigned long long *__p)45{46return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);47}48#endif4950/* Intrinsics that are also available if __ADX__ undefined */51static __inline unsigned char __DEFAULT_FN_ATTRS52_addcarry_u32(unsigned char __cf, unsigned int __x, unsigned int __y,53unsigned int *__p)54{55return __builtin_ia32_addcarry_u32(__cf, __x, __y, __p);56}5758#ifdef __x86_64__59static __inline unsigned char __DEFAULT_FN_ATTRS60_addcarry_u64(unsigned char __cf, unsigned long long __x,61unsigned long long __y, unsigned long long *__p)62{63return __builtin_ia32_addcarry_u64(__cf, __x, __y, __p);64}65#endif6667static __inline unsigned char __DEFAULT_FN_ATTRS68_subborrow_u32(unsigned char __cf, unsigned int __x, unsigned int __y,69unsigned int *__p)70{71return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p);72}7374#ifdef __x86_64__75static __inline unsigned char __DEFAULT_FN_ATTRS76_subborrow_u64(unsigned char __cf, unsigned long long __x,77unsigned long long __y, unsigned long long *__p)78{79return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p);80}81#endif8283#undef __DEFAULT_FN_ATTRS8485#endif /* __ADXINTRIN_H */868788