# 1 "" # 1 "gcm.c" /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Thanks to Thomas Pornin for the ideas how to implement the constat time * binary multiplication. */ #ifdef FREEBL_NO_DEPEND #if 0 /* expanded by -frewrite-includes */ #include "stubs.h" #endif /* expanded by -frewrite-includes */ # 8 "gcm.c" # 9 "gcm.c" #endif # 10 "gcm.c" #if 0 /* expanded by -frewrite-includes */ #include "blapii.h" #endif /* expanded by -frewrite-includes */ # 10 "gcm.c" # 1 "./blapii.h" 1 /* * blapii.h - private data structures and prototypes for the freebl library * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _BLAPII_H_ #define _BLAPII_H_ #if 0 /* expanded by -frewrite-includes */ #include "blapit.h" #endif /* expanded by -frewrite-includes */ # 11 "./blapii.h" # 1 "./blapit.h" 1 /* * blapit.h - public data structures for the freebl library * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _BLAPIT_H_ #define _BLAPIT_H_ #if 0 /* expanded by -frewrite-includes */ #include "seccomon.h" #endif /* expanded by -frewrite-includes */ # 11 "./blapit.h" # 1 "../../../dist/public/nss/seccomon.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * seccomon.h - common data structures for security libraries * * This file should have lowest-common-denominator datastructures * for security libraries. It should not be dependent on any other * headers, and should not require linking with any libraries. */ #ifndef _SECCOMMON_H_ #define _SECCOMMON_H_ #if 0 /* expanded by -frewrite-includes */ #include "utilrename.h" #endif /* expanded by -frewrite-includes */ # 16 "../../../dist/public/nss/seccomon.h" # 1 "../../../dist/public/nss/utilrename.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * utilrename.h - rename symbols moved from libnss3 to libnssutil3 * */ #ifndef _LIBUTIL_H_ #define _LIBUTIL_H_ _LIBUTIL_H__Util #ifdef USE_UTIL_DIRECTLY /* functions moved from libnss3 */ #define ATOB_AsciiToData ATOB_AsciiToData_Util #define ATOB_ConvertAsciiToItem ATOB_ConvertAsciiToItem_Util #define BTOA_ConvertItemToAscii BTOA_ConvertItemToAscii_Util #define BTOA_DataToAscii BTOA_DataToAscii_Util #define CERT_GenTime2FormattedAscii CERT_GenTime2FormattedAscii_Util #define DER_AsciiToTime DER_AsciiToTime_Util #define DER_DecodeTimeChoice DER_DecodeTimeChoice_Util #define DER_Encode DER_Encode_Util #define DER_EncodeTimeChoice DER_EncodeTimeChoice_Util #define DER_GeneralizedDayToAscii DER_GeneralizedDayToAscii_Util #define DER_GeneralizedTimeToTime DER_GeneralizedTimeToTime_Util #define DER_GetInteger DER_GetInteger_Util #define DER_Lengths DER_Lengths_Util #define DER_TimeChoiceDayToAscii DER_TimeChoiceDayToAscii_Util #define DER_TimeToGeneralizedTime DER_TimeToGeneralizedTime_Util #define DER_TimeToGeneralizedTimeArena DER_TimeToGeneralizedTimeArena_Util #define DER_TimeToUTCTime DER_TimeToUTCTime_Util #define DER_UTCDayToAscii DER_UTCDayToAscii_Util #define DER_UTCTimeToAscii DER_UTCTimeToAscii_Util #define DER_UTCTimeToTime DER_UTCTimeToTime_Util #define NSS_PutEnv NSS_PutEnv_Util #define NSSBase64_DecodeBuffer NSSBase64_DecodeBuffer_Util #define NSSBase64_EncodeItem NSSBase64_EncodeItem_Util #define NSSBase64Decoder_Create NSSBase64Decoder_Create_Util #define NSSBase64Decoder_Destroy NSSBase64Decoder_Destroy_Util #define NSSBase64Decoder_Update NSSBase64Decoder_Update_Util #define NSSBase64Encoder_Create NSSBase64Encoder_Create_Util #define NSSBase64Encoder_Destroy NSSBase64Encoder_Destroy_Util #define NSSBase64Encoder_Update NSSBase64Encoder_Update_Util #define NSSRWLock_Destroy NSSRWLock_Destroy_Util #define NSSRWLock_HaveWriteLock NSSRWLock_HaveWriteLock_Util #define NSSRWLock_LockRead NSSRWLock_LockRead_Util #define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util #define NSSRWLock_New NSSRWLock_New_Util #define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util #define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util #define PORT_Alloc PORT_Alloc_Util #define PORT_ArenaAlloc PORT_ArenaAlloc_Util #define PORT_ArenaGrow PORT_ArenaGrow_Util #define PORT_ArenaMark PORT_ArenaMark_Util #define PORT_ArenaRelease PORT_ArenaRelease_Util #define PORT_ArenaStrdup PORT_ArenaStrdup_Util #define PORT_ArenaUnmark PORT_ArenaUnmark_Util #define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util #define PORT_Free PORT_Free_Util #define PORT_FreeArena PORT_FreeArena_Util #define PORT_GetError PORT_GetError_Util #define PORT_NewArena PORT_NewArena_Util #define PORT_Realloc PORT_Realloc_Util #define PORT_SetError PORT_SetError_Util #define PORT_SetUCS2_ASCIIConversionFunction PORT_SetUCS2_ASCIIConversionFunction_Util #define PORT_SetUCS2_UTF8ConversionFunction PORT_SetUCS2_UTF8ConversionFunction_Util #define PORT_SetUCS4_UTF8ConversionFunction PORT_SetUCS4_UTF8ConversionFunction_Util #define PORT_Strdup PORT_Strdup_Util #define PORT_UCS2_ASCIIConversion PORT_UCS2_ASCIIConversion_Util #define PORT_UCS2_UTF8Conversion PORT_UCS2_UTF8Conversion_Util #define PORT_ZAlloc PORT_ZAlloc_Util #define PORT_ZAllocAligned PORT_ZAllocAligned_Util #define PORT_ZAllocAlignedOffset PORT_ZAllocAlignedOffset_Util #define PORT_ZFree PORT_ZFree_Util #define SEC_ASN1Decode SEC_ASN1Decode_Util #define SEC_ASN1DecodeInteger SEC_ASN1DecodeInteger_Util #define SEC_ASN1DecodeItem SEC_ASN1DecodeItem_Util #define SEC_ASN1DecoderAbort SEC_ASN1DecoderAbort_Util #define SEC_ASN1DecoderClearFilterProc SEC_ASN1DecoderClearFilterProc_Util #define SEC_ASN1DecoderClearNotifyProc SEC_ASN1DecoderClearNotifyProc_Util #define SEC_ASN1DecoderFinish SEC_ASN1DecoderFinish_Util #define SEC_ASN1DecoderSetFilterProc SEC_ASN1DecoderSetFilterProc_Util #define SEC_ASN1DecoderSetNotifyProc SEC_ASN1DecoderSetNotifyProc_Util #define SEC_ASN1DecoderStart SEC_ASN1DecoderStart_Util #define SEC_ASN1DecoderUpdate SEC_ASN1DecoderUpdate_Util #define SEC_ASN1Encode SEC_ASN1Encode_Util #define SEC_ASN1EncodeInteger SEC_ASN1EncodeInteger_Util #define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util #define SEC_ASN1EncoderAbort SEC_ASN1EncoderAbort_Util #define SEC_ASN1EncoderClearNotifyProc SEC_ASN1EncoderClearNotifyProc_Util #define SEC_ASN1EncoderClearStreaming SEC_ASN1EncoderClearStreaming_Util #define SEC_ASN1EncoderClearTakeFromBuf SEC_ASN1EncoderClearTakeFromBuf_Util #define SEC_ASN1EncoderFinish SEC_ASN1EncoderFinish_Util #define SEC_ASN1EncoderSetNotifyProc SEC_ASN1EncoderSetNotifyProc_Util #define SEC_ASN1EncoderSetStreaming SEC_ASN1EncoderSetStreaming_Util #define SEC_ASN1EncoderSetTakeFromBuf SEC_ASN1EncoderSetTakeFromBuf_Util #define SEC_ASN1EncoderStart SEC_ASN1EncoderStart_Util #define SEC_ASN1EncoderUpdate SEC_ASN1EncoderUpdate_Util #define SEC_ASN1EncodeUnsignedInteger SEC_ASN1EncodeUnsignedInteger_Util #define SEC_ASN1LengthLength SEC_ASN1LengthLength_Util #define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util #define SECITEM_AllocItem SECITEM_AllocItem_Util #define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util #define SECITEM_CompareItem SECITEM_CompareItem_Util #define SECITEM_CopyItem SECITEM_CopyItem_Util #define SECITEM_DupItem SECITEM_DupItem_Util #define SECITEM_FreeItem SECITEM_FreeItem_Util #define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util #define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util #define SECOID_AddEntry SECOID_AddEntry_Util #define SECOID_CompareAlgorithmID SECOID_CompareAlgorithmID_Util #define SECOID_CopyAlgorithmID SECOID_CopyAlgorithmID_Util #define SECOID_DestroyAlgorithmID SECOID_DestroyAlgorithmID_Util #define SECOID_FindOID SECOID_FindOID_Util #define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util #define SECOID_FindOIDTag SECOID_FindOIDTag_Util #define SECOID_FindOIDTagDescription SECOID_FindOIDTagDescription_Util #define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util #define SECOID_SetAlgorithmID SECOID_SetAlgorithmID_Util #define SGN_CompareDigestInfo SGN_CompareDigestInfo_Util #define SGN_CopyDigestInfo SGN_CopyDigestInfo_Util #define SGN_CreateDigestInfo SGN_CreateDigestInfo_Util #define SGN_DestroyDigestInfo SGN_DestroyDigestInfo_Util /* templates moved from libnss3 */ #define NSS_Get_SEC_AnyTemplate NSS_Get_SEC_AnyTemplate_Util #define NSS_Get_SEC_BitStringTemplate NSS_Get_SEC_BitStringTemplate_Util #define NSS_Get_SEC_BMPStringTemplate NSS_Get_SEC_BMPStringTemplate_Util #define NSS_Get_SEC_BooleanTemplate NSS_Get_SEC_BooleanTemplate_Util #define NSS_Get_SEC_GeneralizedTimeTemplate NSS_Get_SEC_GeneralizedTimeTemplate_Util #define NSS_Get_SEC_IA5StringTemplate NSS_Get_SEC_IA5StringTemplate_Util #define NSS_Get_SEC_IntegerTemplate NSS_Get_SEC_IntegerTemplate_Util #define NSS_Get_SEC_NullTemplate NSS_Get_SEC_NullTemplate_Util #define NSS_Get_SEC_ObjectIDTemplate NSS_Get_SEC_ObjectIDTemplate_Util #define NSS_Get_SEC_OctetStringTemplate NSS_Get_SEC_OctetStringTemplate_Util #define NSS_Get_SEC_PointerToAnyTemplate NSS_Get_SEC_PointerToAnyTemplate_Util #define NSS_Get_SEC_PointerToOctetStringTemplate NSS_Get_SEC_PointerToOctetStringTemplate_Util #define NSS_Get_SEC_SetOfAnyTemplate NSS_Get_SEC_SetOfAnyTemplate_Util #define NSS_Get_SEC_UTCTimeTemplate NSS_Get_SEC_UTCTimeTemplate_Util #define NSS_Get_SEC_UTF8StringTemplate NSS_Get_SEC_UTF8StringTemplate_Util #define NSS_Get_SECOID_AlgorithmIDTemplate NSS_Get_SECOID_AlgorithmIDTemplate_Util #define NSS_Get_sgn_DigestInfoTemplate NSS_Get_sgn_DigestInfoTemplate_Util #define SEC_AnyTemplate SEC_AnyTemplate_Util #define SEC_BitStringTemplate SEC_BitStringTemplate_Util #define SEC_BMPStringTemplate SEC_BMPStringTemplate_Util #define SEC_BooleanTemplate SEC_BooleanTemplate_Util #define SEC_GeneralizedTimeTemplate SEC_GeneralizedTimeTemplate_Util #define SEC_IA5StringTemplate SEC_IA5StringTemplate_Util #define SEC_IntegerTemplate SEC_IntegerTemplate_Util #define SEC_NullTemplate SEC_NullTemplate_Util #define SEC_ObjectIDTemplate SEC_ObjectIDTemplate_Util #define SEC_OctetStringTemplate SEC_OctetStringTemplate_Util #define SEC_PointerToAnyTemplate SEC_PointerToAnyTemplate_Util #define SEC_PointerToOctetStringTemplate SEC_PointerToOctetStringTemplate_Util #define SEC_SetOfAnyTemplate SEC_SetOfAnyTemplate_Util #define SEC_UTCTimeTemplate SEC_UTCTimeTemplate_Util #define SEC_UTF8StringTemplate SEC_UTF8StringTemplate_Util #define SECOID_AlgorithmIDTemplate SECOID_AlgorithmIDTemplate_Util #define sgn_DigestInfoTemplate sgn_DigestInfoTemplate_Util #endif /* USE_UTIL_DIRECTLY */ # 163 "../../../dist/public/nss/utilrename.h" #endif /* _LIBUTIL_H_ */ # 165 "../../../dist/public/nss/utilrename.h" # 17 "../../../dist/public/nss/seccomon.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 17 "../../../dist/public/nss/seccomon.h" # 1 "/usr/local/include/nspr/prtypes.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* ** File: prtypes.h ** Description: Definitions of NSPR's basic types ** ** Prototypes and macros used to make up for deficiencies that we have found ** in ANSI environments. ** ** Since we do not wrap and all the other standard headers, authors ** of portable code will not know in general that they need these definitions. ** Instead of requiring these authors to find the dependent uses in their code ** and take the following steps only in those C files, we take steps once here ** for all C files. **/ #ifndef prtypes_h___ #define prtypes_h___ #ifdef MDCPUCFG #if 0 /* expanded by -frewrite-includes */ #include MDCPUCFG #endif /* expanded by -frewrite-includes */ # 24 "/usr/local/include/nspr/prtypes.h" # 25 "/usr/local/include/nspr/prtypes.h" #else # 26 "/usr/local/include/nspr/prtypes.h" #if 0 /* expanded by -frewrite-includes */ #include "prcpucfg.h" #endif /* expanded by -frewrite-includes */ # 26 "/usr/local/include/nspr/prtypes.h" # 1 "/usr/local/include/nspr/prcpucfg.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ #ifndef XP_UNIX #define XP_UNIX #endif # 12 "/usr/local/include/nspr/prcpucfg.h" #ifndef FREEBSD #define FREEBSD #endif # 16 "/usr/local/include/nspr/prcpucfg.h" #define PR_AF_INET6 28 /* same as AF_INET6 */ #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG #endif # 22 "/usr/local/include/nspr/prcpucfg.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__i386__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 24 "/usr/local/include/nspr/prcpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #undef HAVE_ALIGNED_DOUBLES #undef HAVE_ALIGNED_LONGLONGS #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__alpha__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 69 "/usr/local/include/nspr/prcpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define HAVE_ALIGNED_DOUBLES #define HAVE_ALIGNED_LONGLONGS #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__sparc__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 115 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define HAVE_ALIGNED_DOUBLES #define HAVE_ALIGNED_LONGLONGS #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__ia64__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 161 "/usr/local/include/nspr/prcpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define HAVE_ALIGNED_DOUBLES #define HAVE_ALIGNED_LONGLONGS #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__amd64__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 208 "/usr/local/include/nspr/prcpucfg.h" #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define HAVE_ALIGNED_DOUBLES #define HAVE_ALIGNED_LONGLONGS #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 255 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__powerpc__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 301 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__aarch64__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 346 "/usr/local/include/nspr/prcpucfg.h" #undef IS_BIG_ENDIAN #define IS_LITTLE_ENDIAN 1 #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__arm__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 392 "/usr/local/include/nspr/prcpucfg.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__ARMEB__) || defined(__ARM_BIG_ENDIAN__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 394 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #else # 397 "/usr/local/include/nspr/prcpucfg.h" #undef IS_BIG_ENDIAN #define IS_LITTLE_ENDIAN 1 #endif # 400 "/usr/local/include/nspr/prcpucfg.h" #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__mips64__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 442 "/usr/local/include/nspr/prcpucfg.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__MIPSEB__) || defined(_MIPSEB) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 444 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #else # 447 "/usr/local/include/nspr/prcpucfg.h" #undef IS_BIG_ENDIAN #define IS_LITTLE_ENDIAN 1 #endif # 450 "/usr/local/include/nspr/prcpucfg.h" #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__mips__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 494 "/usr/local/include/nspr/prcpucfg.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__MIPSEB__) || defined(_MIPSEB) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 496 "/usr/local/include/nspr/prcpucfg.h" #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #else # 499 "/usr/local/include/nspr/prcpucfg.h" #undef IS_BIG_ENDIAN #define IS_LITTLE_ENDIAN 1 #endif # 502 "/usr/local/include/nspr/prcpucfg.h" #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #else # 544 "/usr/local/include/nspr/prcpucfg.h" #error "Unknown CPU architecture" #endif # 548 "/usr/local/include/nspr/prcpucfg.h" #ifndef NO_NSPR_10_SUPPORT #define BYTES_PER_BYTE PR_BYTES_PER_BYTE #define BYTES_PER_SHORT PR_BYTES_PER_SHORT #define BYTES_PER_INT PR_BYTES_PER_INT #define BYTES_PER_INT64 PR_BYTES_PER_INT64 #define BYTES_PER_LONG PR_BYTES_PER_LONG #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE #define BYTES_PER_WORD PR_BYTES_PER_WORD #define BYTES_PER_DWORD PR_BYTES_PER_DWORD #define BITS_PER_BYTE PR_BITS_PER_BYTE #define BITS_PER_SHORT PR_BITS_PER_SHORT #define BITS_PER_INT PR_BITS_PER_INT #define BITS_PER_INT64 PR_BITS_PER_INT64 #define BITS_PER_LONG PR_BITS_PER_LONG #define BITS_PER_FLOAT PR_BITS_PER_FLOAT #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE #define BITS_PER_WORD PR_BITS_PER_WORD #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT #define ALIGN_OF_INT PR_ALIGN_OF_INT #define ALIGN_OF_LONG PR_ALIGN_OF_LONG #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER #define ALIGN_OF_WORD PR_ALIGN_OF_WORD #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 #endif /* NO_NSPR_10_SUPPORT */ # 593 "/usr/local/include/nspr/prcpucfg.h" #endif /* nspr_cpucfg___ */ # 595 "/usr/local/include/nspr/prcpucfg.h" # 27 "/usr/local/include/nspr/prtypes.h" 2 #endif # 28 "/usr/local/include/nspr/prtypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/local/include/nspr/prtypes.h" # 1 "/usr/include/stddef.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)stddef.h 8.1 (Berkeley) 6/2/93 * * $FreeBSD$ */ #ifndef _STDDEF_H_ #define _STDDEF_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/stddef.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Berkeley Software Design, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 * $FreeBSD$ */ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ /* * Testing against Clang-specific extensions. */ #ifndef __has_attribute #define __has_attribute(x) 0 #endif # 47 "/usr/include/sys/cdefs.h" 3 4 #ifndef __has_extension #define __has_extension __has_feature #endif # 50 "/usr/include/sys/cdefs.h" 3 4 #ifndef __has_feature #define __has_feature(x) 0 #endif # 53 "/usr/include/sys/cdefs.h" 3 4 #ifndef __has_include #define __has_include(x) 0 #endif # 56 "/usr/include/sys/cdefs.h" 3 4 #ifndef __has_builtin #define __has_builtin(x) 0 #endif # 59 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 61 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_DECLS extern "C" { #define __END_DECLS } #else # 64 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_DECLS #define __END_DECLS #endif # 67 "/usr/include/sys/cdefs.h" 3 4 /* * This code has been put in place to help reduce the addition of * compiler specific defines in FreeBSD code. It helps to aid in * having a compiler-agnostic source tree. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC__ >= 3 || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 77 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_ASM 3 #define __GNUCLIKE_MATH_BUILTIN_CONSTANTS #else # 80 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_ASM 2 #endif # 82 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE___TYPEOF 1 #define __GNUCLIKE___OFFSETOF 1 #define __GNUCLIKE___SECTION 1 #ifndef __INTEL_COMPILER #define __GNUCLIKE_CTOR_SECTION_HANDLING 1 #endif # 89 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_BUILTIN_CONSTANT_P 1 #if 0 /* disabled by -frewrite-includes */ #if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ __INTEL_COMPILER < 800 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/include/sys/cdefs.h" 3 4 #undef __GNUCLIKE_BUILTIN_CONSTANT_P #endif # 95 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 97 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_BUILTIN_VARARGS 1 #define __GNUCLIKE_BUILTIN_STDARG 1 #define __GNUCLIKE_BUILTIN_VAALIST 1 #endif # 101 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 103 "/usr/include/sys/cdefs.h" 3 4 #define __GNUC_VA_LIST_COMPATIBILITY 1 #endif # 105 "/usr/include/sys/cdefs.h" 3 4 /* * Compiler memory barriers, specific to gcc and clang. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 110 "/usr/include/sys/cdefs.h" 3 4 #define __compiler_membar() __asm __volatile(" " : : : "memory") #endif # 112 "/usr/include/sys/cdefs.h" 3 4 #ifndef __INTEL_COMPILER #define __GNUCLIKE_BUILTIN_NEXT_ARG 1 #define __GNUCLIKE_MATH_BUILTIN_RELOPS #endif # 117 "/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_BUILTIN_MEMCPY 1 /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ #define __CC_SUPPORTS_INLINE 1 #define __CC_SUPPORTS___INLINE 1 #define __CC_SUPPORTS___INLINE__ 1 #define __CC_SUPPORTS___FUNC__ 1 #define __CC_SUPPORTS_WARNING 1 #define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ #define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 #endif /* __GNUC__ || __INTEL_COMPILER */ # 133 "/usr/include/sys/cdefs.h" 3 4 /* * Macro to test if we're using a specific version of gcc or later. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 138 "/usr/include/sys/cdefs.h" 3 4 #define __GNUC_PREREQ__(ma, mi) \ (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) #else # 141 "/usr/include/sys/cdefs.h" 3 4 #define __GNUC_PREREQ__(ma, mi) 0 #endif # 143 "/usr/include/sys/cdefs.h" 3 4 /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI * mode -- there must be no spaces between its arguments, and for nested * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also * concatenate double-quoted strings produced by the __STRING macro, but * this only works with ANSI C. * * __XSTRING is like __STRING, but it expands any macros in its argument * first. It is only available with ANSI C. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC__) || defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 157 "/usr/include/sys/cdefs.h" 3 4 #define __P(protos) protos /* full-blown ANSI C */ #define __CONCAT1(x,y) x ## y #define __CONCAT(x,y) __CONCAT1(x,y) #define __STRING(x) #x /* stringify without expanding x */ #define __XSTRING(x) __STRING(x) /* expand x, then stringify */ #define __const const /* define reserved names to standard */ #define __signed signed #define __volatile volatile #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 167 "/usr/include/sys/cdefs.h" 3 4 #define __inline inline /* convert to C++ keyword */ #else # 169 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !(defined(__CC_SUPPORTS___INLINE)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 170 "/usr/include/sys/cdefs.h" 3 4 #define __inline /* delete GCC keyword */ #endif /* ! __CC_SUPPORTS___INLINE */ # 172 "/usr/include/sys/cdefs.h" 3 4 #endif /* !__cplusplus */ # 173 "/usr/include/sys/cdefs.h" 3 4 #else /* !(__STDC__ || __cplusplus) */ # 175 "/usr/include/sys/cdefs.h" 3 4 #define __P(protos) () /* traditional C preprocessor */ #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" #if 0 /* disabled by -frewrite-includes */ #if !defined(__CC_SUPPORTS___INLINE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 180 "/usr/include/sys/cdefs.h" 3 4 #define __const /* delete pseudo-ANSI C keywords */ #define __inline #define __signed #define __volatile /* * In non-ANSI C environments, new programs will want ANSI-only C keywords * deleted from the program and old programs will want them left alone. * When using a compiler other than gcc, programs using the ANSI C keywords * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. * When using "gcc -traditional", we assume that this is the intent; if * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. */ #ifndef NO_ANSI_KEYWORDS #define const /* delete ANSI C keywords */ #define inline #define signed #define volatile #endif /* !NO_ANSI_KEYWORDS */ # 198 "/usr/include/sys/cdefs.h" 3 4 #endif /* !__CC_SUPPORTS___INLINE */ # 199 "/usr/include/sys/cdefs.h" 3 4 #endif /* !(__STDC__ || __cplusplus) */ # 200 "/usr/include/sys/cdefs.h" 3 4 /* * Compiler-dependent macros to help declare dead (non-returning) and * pure (no side effects) functions, and unused variables. They are * null except for versions of gcc that are known to support the features * properly (old versions of gcc-2 supported the dead and pure features * in a different (wrong) way). If we do not provide an implementation * for a given compiler, let the compile fail if it is told to use * a feature that we cannot live without. */ #define __weak_symbol __attribute__((__weak__)) #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 212 "/usr/include/sys/cdefs.h" 3 4 #define __dead2 #define __pure2 #define __unused #endif # 216 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 217 "/usr/include/sys/cdefs.h" 3 4 #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) #define __unused /* XXX Find out what to do for __packed, __aligned and __section */ #endif # 222 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 223 "/usr/include/sys/cdefs.h" 3 4 #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif # 231 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 232 "/usr/include/sys/cdefs.h" 3 4 #define __alloc_size(x) __attribute__((__alloc_size__(x))) #define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) #else # 235 "/usr/include/sys/cdefs.h" 3 4 #define __alloc_size(x) #define __alloc_size2(n, x) #endif # 238 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 239 "/usr/include/sys/cdefs.h" 3 4 #define __alloc_align(x) __attribute__((__alloc_align__(x))) #else # 241 "/usr/include/sys/cdefs.h" 3 4 #define __alloc_align(x) #endif # 243 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ__(2, 95) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 245 "/usr/include/sys/cdefs.h" 3 4 #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) #endif # 247 "/usr/include/sys/cdefs.h" 3 4 /* * Keywords added in C11. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 253 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_extension(c_alignas) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 255 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_alignas) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 257 "/usr/include/sys/cdefs.h" 3 4 #define _Alignas(x) alignas(x) #else # 259 "/usr/include/sys/cdefs.h" 3 4 /* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ #define _Alignas(x) __aligned(x) #endif # 262 "/usr/include/sys/cdefs.h" 3 4 #endif # 263 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) && __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 265 "/usr/include/sys/cdefs.h" 3 4 #define _Alignof(x) alignof(x) #else # 267 "/usr/include/sys/cdefs.h" 3 4 #define _Alignof(x) __alignof(x) #endif # 269 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) && !__has_extension(c_atomic) && \ !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 272 "/usr/include/sys/cdefs.h" 3 4 /* * No native support for _Atomic(). Place object in structure to prevent * most forms of direct non-atomic access. */ #define _Atomic(T) struct { T volatile __val; } #endif # 278 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) && __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 280 "/usr/include/sys/cdefs.h" 3 4 #define _Noreturn [[noreturn]] #else # 282 "/usr/include/sys/cdefs.h" 3 4 #define _Noreturn __dead2 #endif # 284 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_extension(c_static_assert) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 286 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 288 "/usr/include/sys/cdefs.h" 3 4 #define _Static_assert(x, y) static_assert(x, y) #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 290 "/usr/include/sys/cdefs.h" 3 4 /* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__COUNTER__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 292 "/usr/include/sys/cdefs.h" 3 4 #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) #define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ __unused #else # 297 "/usr/include/sys/cdefs.h" 3 4 #define _Static_assert(x, y) struct __hack #endif # 299 "/usr/include/sys/cdefs.h" 3 4 #endif # 300 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_extension(c_thread_local) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 302 "/usr/include/sys/cdefs.h" 3 4 /* * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode * without actually supporting the thread_local keyword. Don't check for * the presence of C++11 when defining _Thread_local. */ #if 0 /* disabled by -frewrite-includes */ #if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ __has_extension(cxx_thread_local) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 309 "/usr/include/sys/cdefs.h" 3 4 #define _Thread_local thread_local #else # 311 "/usr/include/sys/cdefs.h" 3 4 #define _Thread_local __thread #endif # 313 "/usr/include/sys/cdefs.h" 3 4 #endif # 314 "/usr/include/sys/cdefs.h" 3 4 #endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ # 316 "/usr/include/sys/cdefs.h" 3 4 /* * Emulation of C11 _Generic(). Unlike the previously defined C11 * keywords, it is not possible to implement this using exactly the same * syntax. Therefore implement something similar under the name * __generic(). Unlike _Generic(), this macro can only distinguish * between a single type, so it requires nested invocations to * distinguish multiple cases. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ __has_extension(c_generic_selections) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 328 "/usr/include/sys/cdefs.h" 3 4 #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 331 "/usr/include/sys/cdefs.h" 3 4 #define __generic(expr, t, yes, no) \ __builtin_choose_expr( \ __builtin_types_compatible_p(__typeof(expr), t), yes, no) #endif # 335 "/usr/include/sys/cdefs.h" 3 4 /* * C99 Static array indices in function parameter declarations. Syntax such as: * void bar(int myArray[static 10]); * is allowed in C99 but not in C++. Define __min_size appropriately so * headers using it can be compiled in either language. Use like this: * void bar(int myArray[__min_size(10)]); */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) && \ (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 346 "/usr/include/sys/cdefs.h" 3 4 #define __min_size(x) static (x) #else # 348 "/usr/include/sys/cdefs.h" 3 4 #define __min_size(x) (x) #endif # 350 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(2, 96) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 352 "/usr/include/sys/cdefs.h" 3 4 #define __malloc_like __attribute__((__malloc__)) #define __pure __attribute__((__pure__)) #else # 355 "/usr/include/sys/cdefs.h" 3 4 #define __malloc_like #define __pure #endif # 358 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 360 "/usr/include/sys/cdefs.h" 3 4 #define __always_inline __attribute__((__always_inline__)) #else # 362 "/usr/include/sys/cdefs.h" 3 4 #define __always_inline #endif # 364 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(3, 1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 366 "/usr/include/sys/cdefs.h" 3 4 #define __noinline __attribute__ ((__noinline__)) #else # 368 "/usr/include/sys/cdefs.h" 3 4 #define __noinline #endif # 370 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(3, 4) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 372 "/usr/include/sys/cdefs.h" 3 4 #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) #else # 375 "/usr/include/sys/cdefs.h" 3 4 #define __fastcall #define __result_use_check #endif # 378 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 380 "/usr/include/sys/cdefs.h" 3 4 #define __returns_twice __attribute__((__returns_twice__)) #else # 382 "/usr/include/sys/cdefs.h" 3 4 #define __returns_twice #endif # 384 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 386 "/usr/include/sys/cdefs.h" 3 4 #define __unreachable() __builtin_unreachable() #else # 388 "/usr/include/sys/cdefs.h" 3 4 #define __unreachable() ((void)0) #endif # 390 "/usr/include/sys/cdefs.h" 3 4 /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 393 "/usr/include/sys/cdefs.h" 3 4 #define __func__ NULL #endif # 395 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 397 "/usr/include/sys/cdefs.h" 3 4 #define __LONG_LONG_SUPPORTED #endif # 399 "/usr/include/sys/cdefs.h" 3 4 /* C++11 exposes a load of C99 stuff */ #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) && __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 402 "/usr/include/sys/cdefs.h" 3 4 #define __LONG_LONG_SUPPORTED #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif # 406 "/usr/include/sys/cdefs.h" 3 4 #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif # 409 "/usr/include/sys/cdefs.h" 3 4 #endif # 410 "/usr/include/sys/cdefs.h" 3 4 /* * GCC 2.95 provides `__restrict' as an extension to C90 to support the * C99-specific `restrict' type qualifier. We happen to use `__restrict' as * a way to define the `restrict' type qualifier without disturbing older * software that is unaware of C99 keywords. */ #if 0 /* disabled by -frewrite-includes */ #if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 418 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 419 "/usr/include/sys/cdefs.h" 3 4 #define __restrict #else # 421 "/usr/include/sys/cdefs.h" 3 4 #define __restrict restrict #endif # 423 "/usr/include/sys/cdefs.h" 3 4 #endif # 424 "/usr/include/sys/cdefs.h" 3 4 /* * GNU C version 2.96 adds explicit branch prediction so that * the CPU back-end can hint the processor and also so that * code blocks can be reordered such that the predicted path * sees a more linear flow, thus improving cache behavior, etc. * * The following two macros provide us with a way to utilize this * compiler feature. Use __predict_true() if you expect the expression * to evaluate to true, and __predict_false() if you expect the * expression to evaluate to false. * * A few notes about usage: * * * Generally, __predict_false() error condition checks (unless * you have some _strong_ reason to do otherwise, in which case * document it), and/or __predict_true() `no-error' condition * checks, assuming you want to optimize for the no-error case. * * * Other than that, if you don't know the likelihood of a test * succeeding from empirical or other `hard' evidence, don't * make predictions. * * * These are meant to be used in places that are run `a lot'. * It is wasteful to make predictions in code that is run * seldomly (e.g. at subsystem initialization time) as the * basic block reordering that this affects can often generate * larger code. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(2, 96) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 454 "/usr/include/sys/cdefs.h" 3 4 #define __predict_true(exp) __builtin_expect((exp), 1) #define __predict_false(exp) __builtin_expect((exp), 0) #else # 457 "/usr/include/sys/cdefs.h" 3 4 #define __predict_true(exp) (exp) #define __predict_false(exp) (exp) #endif # 460 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 462 "/usr/include/sys/cdefs.h" 3 4 #define __null_sentinel __attribute__((__sentinel__)) #define __exported __attribute__((__visibility__("default"))) #define __hidden __attribute__((__visibility__("hidden"))) #else # 466 "/usr/include/sys/cdefs.h" 3 4 #define __null_sentinel #define __exported #define __hidden #endif # 470 "/usr/include/sys/cdefs.h" 3 4 /* * We define this here since , , and * require it. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(4, 1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 476 "/usr/include/sys/cdefs.h" 3 4 #define __offsetof(type, field) __builtin_offsetof(type, field) #else # 478 "/usr/include/sys/cdefs.h" 3 4 #ifndef __cplusplus #define __offsetof(type, field) \ ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) #else # 482 "/usr/include/sys/cdefs.h" 3 4 #define __offsetof(type, field) \ (__offsetof__ (reinterpret_cast <__size_t> \ (&reinterpret_cast \ (static_cast (0)->field)))) #endif # 487 "/usr/include/sys/cdefs.h" 3 4 #endif # 488 "/usr/include/sys/cdefs.h" 3 4 #define __rangeof(type, start, end) \ (__offsetof(type, end) - __offsetof(type, start)) /* * Given the pointer x to the member m of the struct s, return * a pointer to the containing structure. When using GCC, we first * assign pointer x to a local variable, to check that its type is * compatible with member m. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ__(3, 1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 498 "/usr/include/sys/cdefs.h" 3 4 #define __containerof(x, s, m) ({ \ const volatile __typeof(((s *)0)->m) *__x = (x); \ __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ }) #else # 503 "/usr/include/sys/cdefs.h" 3 4 #define __containerof(x, s, m) \ __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) #endif # 506 "/usr/include/sys/cdefs.h" 3 4 /* * Compiler-dependent macros to declare that functions take printf-like * or scanf-like arguments. They are null except for versions of gcc * that are known to support the features properly (old versions of gcc-2 * didn't permit keeping the keywords out of the application namespace). */ #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 514 "/usr/include/sys/cdefs.h" 3 4 #define __printflike(fmtarg, firstvararg) #define __scanflike(fmtarg, firstvararg) #define __format_arg(fmtarg) #define __strfmonlike(fmtarg, firstvararg) #define __strftimelike(fmtarg, firstvararg) #else # 520 "/usr/include/sys/cdefs.h" 3 4 #define __printflike(fmtarg, firstvararg) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) #define __scanflike(fmtarg, firstvararg) \ __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) #define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) #define __strfmonlike(fmtarg, firstvararg) \ __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) #define __strftimelike(fmtarg, firstvararg) \ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) #endif # 530 "/usr/include/sys/cdefs.h" 3 4 /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ defined(__GNUC__) && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 534 "/usr/include/sys/cdefs.h" 3 4 #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else # 537 "/usr/include/sys/cdefs.h" 3 4 #define __printf0like(fmtarg, firstvararg) #endif # 539 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 541 "/usr/include/sys/cdefs.h" 3 4 #ifndef __INTEL_COMPILER #define __strong_reference(sym,aliassym) \ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) #endif # 545 "/usr/include/sys/cdefs.h" 3 4 #ifdef __STDC__ #define __weak_reference(sym,alias) \ __asm__(".weak " #alias); \ __asm__(".equ " #alias ", " #sym) #define __warn_references(sym,msg) \ __asm__(".section .gnu.warning." #sym); \ __asm__(".asciz \"" msg "\""); \ __asm__(".previous") #define __sym_compat(sym,impl,verid) \ __asm__(".symver " #impl ", " #sym "@" #verid) #define __sym_default(sym,impl,verid) \ __asm__(".symver " #impl ", " #sym "@@@" #verid) #else # 558 "/usr/include/sys/cdefs.h" 3 4 #define __weak_reference(sym,alias) \ __asm__(".weak alias"); \ __asm__(".equ alias, sym") #define __warn_references(sym,msg) \ __asm__(".section .gnu.warning.sym"); \ __asm__(".asciz \"msg\""); \ __asm__(".previous") #define __sym_compat(sym,impl,verid) \ __asm__(".symver impl, sym@verid") #define __sym_default(impl,sym,verid) \ __asm__(".symver impl, sym@@@verid") #endif /* __STDC__ */ # 570 "/usr/include/sys/cdefs.h" 3 4 #endif /* __GNUC__ || __INTEL_COMPILER */ # 571 "/usr/include/sys/cdefs.h" 3 4 #define __GLOBL1(sym) __asm__(".globl " #sym) #define __GLOBL(sym) __GLOBL1(sym) #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 576 "/usr/include/sys/cdefs.h" 3 4 #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else # 578 "/usr/include/sys/cdefs.h" 3 4 /* * The following definition might not work well if used in header files, * but it should be better than nothing. If you want a "do nothing" * version, then it should generate some harmless declaration, such as: * #define __IDSTRING(name,string) struct __hack */ #define __IDSTRING(name,string) static const char name[] __unused = string #endif # 586 "/usr/include/sys/cdefs.h" 3 4 /* * Embed the rcs id of a source file in the resulting library. Note that in * more recent ELF binutils, we use .ident allowing the ID to be stripped. * Usage: * __FBSDID("$FreeBSD$"); */ #ifndef __FBSDID #if 0 /* disabled by -frewrite-includes */ #if !defined(STRIP_FBSDID) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 595 "/usr/include/sys/cdefs.h" 3 4 #define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) #else # 597 "/usr/include/sys/cdefs.h" 3 4 #define __FBSDID(s) struct __hack #endif # 599 "/usr/include/sys/cdefs.h" 3 4 #endif # 600 "/usr/include/sys/cdefs.h" 3 4 #ifndef __RCSID #ifndef NO__RCSID #define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) #else # 605 "/usr/include/sys/cdefs.h" 3 4 #define __RCSID(s) struct __hack #endif # 607 "/usr/include/sys/cdefs.h" 3 4 #endif # 608 "/usr/include/sys/cdefs.h" 3 4 #ifndef __RCSID_SOURCE #ifndef NO__RCSID_SOURCE #define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) #else # 613 "/usr/include/sys/cdefs.h" 3 4 #define __RCSID_SOURCE(s) struct __hack #endif # 615 "/usr/include/sys/cdefs.h" 3 4 #endif # 616 "/usr/include/sys/cdefs.h" 3 4 #ifndef __SCCSID #ifndef NO__SCCSID #define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) #else # 621 "/usr/include/sys/cdefs.h" 3 4 #define __SCCSID(s) struct __hack #endif # 623 "/usr/include/sys/cdefs.h" 3 4 #endif # 624 "/usr/include/sys/cdefs.h" 3 4 #ifndef __COPYRIGHT #ifndef NO__COPYRIGHT #define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) #else # 629 "/usr/include/sys/cdefs.h" 3 4 #define __COPYRIGHT(s) struct __hack #endif # 631 "/usr/include/sys/cdefs.h" 3 4 #endif # 632 "/usr/include/sys/cdefs.h" 3 4 #ifndef __DECONST #define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) #endif # 636 "/usr/include/sys/cdefs.h" 3 4 #ifndef __DEVOLATILE #define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) #endif # 640 "/usr/include/sys/cdefs.h" 3 4 #ifndef __DEQUALIFY #define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) #endif # 644 "/usr/include/sys/cdefs.h" 3 4 /*- * The following definitions are an extension of the behavior originally * implemented in , but with a different level of granularity. * POSIX.1 requires that the macros we test be defined before any standard * header file is included. * * Here's a quick run-down of the versions: * defined(_POSIX_SOURCE) 1003.1-1988 * _POSIX_C_SOURCE == 1 1003.1-1990 * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option * _POSIX_C_SOURCE == 199309 1003.1b-1993 * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, * and the omnibus ISO/IEC 9945-1: 1996 * _POSIX_C_SOURCE == 200112 1003.1-2001 * _POSIX_C_SOURCE == 200809 1003.1-2008 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of * that specification, and which subsumes _POSIX_C_SOURCE. * * Our macros begin with two underscores to avoid namespace screwage. */ /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ #if 0 /* disabled by -frewrite-includes */ #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 670 "/usr/include/sys/cdefs.h" 3 4 #undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ #define _POSIX_C_SOURCE 199009 #endif # 673 "/usr/include/sys/cdefs.h" 3 4 /* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ #if 0 /* disabled by -frewrite-includes */ #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 676 "/usr/include/sys/cdefs.h" 3 4 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199209 #endif # 679 "/usr/include/sys/cdefs.h" 3 4 /* Deal with various X/Open Portability Guides and Single UNIX Spec. */ #ifdef _XOPEN_SOURCE #if 0 /* disabled by -frewrite-includes */ #if _XOPEN_SOURCE - 0 >= 700 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 683 "/usr/include/sys/cdefs.h" 3 4 #define __XSI_VISIBLE 700 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _XOPEN_SOURCE - 0 >= 600 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 687 "/usr/include/sys/cdefs.h" 3 4 #define __XSI_VISIBLE 600 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _XOPEN_SOURCE - 0 >= 500 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 691 "/usr/include/sys/cdefs.h" 3 4 #define __XSI_VISIBLE 500 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199506 #endif # 695 "/usr/include/sys/cdefs.h" 3 4 #endif # 696 "/usr/include/sys/cdefs.h" 3 4 /* * Deal with all versions of POSIX. The ordering relative to the tests above is * important. */ #if 0 /* disabled by -frewrite-includes */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 702 "/usr/include/sys/cdefs.h" 3 4 #define _POSIX_C_SOURCE 198808 #endif # 704 "/usr/include/sys/cdefs.h" 3 4 #ifdef _POSIX_C_SOURCE #if 0 /* disabled by -frewrite-includes */ #if _POSIX_C_SOURCE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 706 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 200809 #define __ISO_C_VISIBLE 1999 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _POSIX_C_SOURCE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 709 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 200112 #define __ISO_C_VISIBLE 1999 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _POSIX_C_SOURCE >= 199506 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 712 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 199506 #define __ISO_C_VISIBLE 1990 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _POSIX_C_SOURCE >= 199309 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 715 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 199309 #define __ISO_C_VISIBLE 1990 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _POSIX_C_SOURCE >= 199209 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 718 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 199209 #define __ISO_C_VISIBLE 1990 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif _POSIX_C_SOURCE >= 199009 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 721 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 199009 #define __ISO_C_VISIBLE 1990 #else # 724 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 198808 #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ # 727 "/usr/include/sys/cdefs.h" 3 4 #else # 728 "/usr/include/sys/cdefs.h" 3 4 /*- * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly * requested, then define our internal feature-test macros to zero. This * makes no difference to the preprocessor (undefined symbols in preprocessing * expressions are defined to have value zero), but makes it more convenient for * a test program to print out the values. * * If a program mistakenly defines _ANSI_SOURCE and some other macro such as * _POSIX_C_SOURCE, we will assume that it wants the broader compilation * environment (and in fact we will never get here). */ #if 0 /* disabled by -frewrite-includes */ #if defined(_ANSI_SOURCE) /* Hide almost everything. */ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 741 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1990 #define __EXT1_VISIBLE 0 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 747 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 #define __EXT1_VISIBLE 0 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 753 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 2011 #define __EXT1_VISIBLE 0 #else /* Default environment: show everything. */ # 759 "/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 #define __ISO_C_VISIBLE 2011 #define __EXT1_VISIBLE 1 #endif # 765 "/usr/include/sys/cdefs.h" 3 4 #endif # 766 "/usr/include/sys/cdefs.h" 3 4 /* User override __EXT1_VISIBLE */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 769 "/usr/include/sys/cdefs.h" 3 4 #undef __EXT1_VISIBLE #if 0 /* disabled by -frewrite-includes */ #if __STDC_WANT_LIB_EXT1__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 771 "/usr/include/sys/cdefs.h" 3 4 #define __EXT1_VISIBLE 1 #else # 773 "/usr/include/sys/cdefs.h" 3 4 #define __EXT1_VISIBLE 0 #endif # 775 "/usr/include/sys/cdefs.h" 3 4 #endif /* __STDC_WANT_LIB_EXT1__ */ # 776 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__mips) || defined(__riscv) || \ (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 779 "/usr/include/sys/cdefs.h" 3 4 #define __NO_TLS 1 #endif # 781 "/usr/include/sys/cdefs.h" 3 4 /* * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__arm__) && !defined(__ARM_ARCH) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 787 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 787 "/usr/include/sys/cdefs.h" 3 4 # 788 "/usr/include/sys/cdefs.h" 3 4 #endif # 789 "/usr/include/sys/cdefs.h" 3 4 /* * Nullability qualifiers: currently only supported by Clang. */ #if 0 /* disabled by -frewrite-includes */ #if !(defined(__clang__) && __has_feature(nullability)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 794 "/usr/include/sys/cdefs.h" 3 4 #define _Nonnull #define _Nullable #define _Null_unspecified #define __NULLABILITY_PRAGMA_PUSH #define __NULLABILITY_PRAGMA_POP #else # 800 "/usr/include/sys/cdefs.h" 3 4 #define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") #define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") #endif # 804 "/usr/include/sys/cdefs.h" 3 4 /* * Type Safety Checking * * Clang provides additional attributes to enable checking type safety * properties that cannot be enforced by the C type system. */ #if 0 /* disabled by -frewrite-includes */ #if __has_attribute(__argument_with_type_tag__) && \ __has_attribute(__type_tag_for_datatype__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 814 "/usr/include/sys/cdefs.h" 3 4 #define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) #define __datatype_type_tag(kind, type) \ __attribute__((__type_tag_for_datatype__(kind, type))) #else # 819 "/usr/include/sys/cdefs.h" 3 4 #define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) #define __datatype_type_tag(kind, type) #endif # 822 "/usr/include/sys/cdefs.h" 3 4 /* * Lock annotations. * * Clang provides support for doing basic thread-safety tests at * compile-time, by marking which locks will/should be held when * entering/leaving a functions. * * Furthermore, it is also possible to annotate variables and structure * members to enforce that they are only accessed when certain locks are * held. */ #if 0 /* disabled by -frewrite-includes */ #if __has_extension(c_thread_safety_attributes) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 836 "/usr/include/sys/cdefs.h" 3 4 #define __lock_annotate(x) __attribute__((x)) #else # 838 "/usr/include/sys/cdefs.h" 3 4 #define __lock_annotate(x) #endif # 840 "/usr/include/sys/cdefs.h" 3 4 /* Structure implements a lock. */ #define __lockable __lock_annotate(lockable) /* Function acquires an exclusive or shared lock. */ #define __locks_exclusive(...) \ __lock_annotate(exclusive_lock_function(__VA_ARGS__)) #define __locks_shared(...) \ __lock_annotate(shared_lock_function(__VA_ARGS__)) /* Function attempts to acquire an exclusive or shared lock. */ #define __trylocks_exclusive(...) \ __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) #define __trylocks_shared(...) \ __lock_annotate(shared_trylock_function(__VA_ARGS__)) /* Function releases a lock. */ #define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) /* Function asserts that an exclusive or shared lock is held. */ #define __asserts_exclusive(...) \ __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) #define __asserts_shared(...) \ __lock_annotate(assert_shared_lock(__VA_ARGS__)) /* Function requires that an exclusive or shared lock is or is not held. */ #define __requires_exclusive(...) \ __lock_annotate(exclusive_locks_required(__VA_ARGS__)) #define __requires_shared(...) \ __lock_annotate(shared_locks_required(__VA_ARGS__)) #define __requires_unlocked(...) \ __lock_annotate(locks_excluded(__VA_ARGS__)) /* Function should not be analyzed. */ #define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) /* * Function or variable should not be sanitized, i.e. by AddressSanitizer. * GCC has the nosanitize attribute, but as a function attribute only, and * warns on use as a variable attribute. */ #if 0 /* disabled by -frewrite-includes */ #if __has_attribute(no_sanitize) && defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 882 "/usr/include/sys/cdefs.h" 3 4 #define __nosanitizeaddress __attribute__((no_sanitize("address"))) #else # 884 "/usr/include/sys/cdefs.h" 3 4 #define __nosanitizeaddress #endif # 886 "/usr/include/sys/cdefs.h" 3 4 /* Guard variables and structure members by lock. */ #define __guarded_by(x) __lock_annotate(guarded_by(x)) #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) #endif /* !_SYS_CDEFS_H_ */ # 892 "/usr/include/sys/cdefs.h" 3 4 # 40 "/usr/include/stddef.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/stddef.h" 3 4 # 1 "/usr/include/sys/_null.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/include/sys/_null.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 37 "/usr/include/sys/_null.h" 3 4 #define NULL nullptr #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 39 "/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/include/sys/_null.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__LP64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/include/sys/_null.h" 3 4 # 41 "/usr/include/stddef.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/stddef.h" 3 4 # 1 "/usr/include/sys/_types.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS__TYPES_H_ #define _SYS__TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/sys/_types.h" 3 4 # 35 "/usr/include/sys/_types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/_types.h" 3 4 # 1 "/usr/include/machine/_types.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 2002 Mike Barcroft * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 * From: @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD$ */ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ #ifndef _SYS_CDEFS_H_ #error this file needs sys/cdefs.h as a prerequisite #endif # 47 "/usr/include/machine/_types.h" 3 4 /* * Basic types upon which most other types are built. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; #ifdef __LP64__ typedef long __int64_t; typedef unsigned long __uint64_t; #else # 61 "/usr/include/machine/_types.h" 3 4 #ifndef lint __extension__ #endif # 64 "/usr/include/machine/_types.h" 3 4 /* LONGLONG */ typedef long long __int64_t; #ifndef lint __extension__ #endif # 69 "/usr/include/machine/_types.h" 3 4 /* LONGLONG */ typedef unsigned long long __uint64_t; #endif # 72 "/usr/include/machine/_types.h" 3 4 /* * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ #ifndef _STANDALONE typedef double __double_t; typedef float __float_t; #endif # 81 "/usr/include/machine/_types.h" 3 4 #ifdef __LP64__ typedef __int64_t __critical_t; typedef __int64_t __intfptr_t; typedef __int64_t __intptr_t; #else # 86 "/usr/include/machine/_types.h" 3 4 typedef __int32_t __critical_t; typedef __int32_t __intfptr_t; typedef __int32_t __intptr_t; #endif # 90 "/usr/include/machine/_types.h" 3 4 typedef __int64_t __intmax_t; typedef __int32_t __int_fast8_t; typedef __int32_t __int_fast16_t; typedef __int32_t __int_fast32_t; typedef __int64_t __int_fast64_t; typedef __int8_t __int_least8_t; typedef __int16_t __int_least16_t; typedef __int32_t __int_least32_t; typedef __int64_t __int_least64_t; #ifdef __LP64__ typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int64_t __register_t; typedef __int64_t __segsz_t; /* segment size (in pages) */ typedef __uint64_t __size_t; /* sizeof() */ typedef __int64_t __ssize_t; /* byte count or error */ #else # 106 "/usr/include/machine/_types.h" 3 4 typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int32_t __register_t; typedef __int32_t __segsz_t; /* segment size (in pages) */ typedef __uint32_t __size_t; /* sizeof() */ typedef __int32_t __ssize_t; /* byte count or error */ #endif # 112 "/usr/include/machine/_types.h" 3 4 typedef __int64_t __time_t; /* time()... */ #ifdef __LP64__ typedef __uint64_t __uintfptr_t; typedef __uint64_t __uintptr_t; #else # 117 "/usr/include/machine/_types.h" 3 4 typedef __uint32_t __uintfptr_t; typedef __uint32_t __uintptr_t; #endif # 120 "/usr/include/machine/_types.h" 3 4 typedef __uint64_t __uintmax_t; typedef __uint32_t __uint_fast8_t; typedef __uint32_t __uint_fast16_t; typedef __uint32_t __uint_fast32_t; typedef __uint64_t __uint_fast64_t; typedef __uint8_t __uint_least8_t; typedef __uint16_t __uint_least16_t; typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; #ifdef __LP64__ typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_size_t; #else # 135 "/usr/include/machine/_types.h" 3 4 typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; #ifdef BOOKE typedef __uint64_t __vm_paddr_t; #else # 140 "/usr/include/machine/_types.h" 3 4 typedef __uint32_t __vm_paddr_t; #endif # 142 "/usr/include/machine/_types.h" 3 4 typedef __uint32_t __vm_size_t; #endif # 144 "/usr/include/machine/_types.h" 3 4 typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ #endif /* !_MACHINE__TYPES_H_ */ # 150 "/usr/include/machine/_types.h" 3 4 # 36 "/usr/include/sys/_types.h" 2 3 4 /* * Standard type definitions. */ typedef __int32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ typedef __uint32_t __fflags_t; /* file flags */ typedef __uint64_t __fsblkcnt_t; typedef __uint64_t __fsfilcnt_t; typedef __uint32_t __gid_t; typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ typedef __uint64_t __ino_t; /* inode number */ typedef long __key_t; /* IPC key (for Sys V IPC) */ typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ typedef __uint16_t __mode_t; /* permissions */ typedef int __accmode_t; /* access permissions */ typedef int __nl_item; typedef __uint64_t __nlink_t; /* link count */ typedef __int64_t __off_t; /* file offset */ typedef __int64_t __off64_t; /* file offset (alias) */ typedef __int32_t __pid_t; /* process [group] */ typedef __int64_t __rlim_t; /* resource limit - intentionally */ /* signed, because of legacy code */ /* that uses -1 for RLIM_INFINITY */ typedef __uint8_t __sa_family_t; typedef __uint32_t __socklen_t; typedef long __suseconds_t; /* microseconds (signed) */ typedef struct __timer *__timer_t; /* timer_gettime()... */ typedef struct __mq *__mqd_t; /* mq_open()... */ typedef __uint32_t __uid_t; typedef unsigned int __useconds_t; /* microseconds (unsigned) */ typedef int __cpuwhich_t; /* which parameter for cpuset. */ typedef int __cpulevel_t; /* level parameter for cpuset. */ typedef int __cpusetid_t; /* cpuset identifier. */ typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ /* * Unusual type definitions. */ /* * rune_t is declared to be an ``int'' instead of the more natural * ``unsigned long'' or ``long''. Two things are happening here. It is not * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, * it looks like 10646 will be a 31 bit standard. This means that if your * ints cannot hold 32 bits, you will be in trouble. The reason an int was * chosen over a long is that the is*() and to*() routines take ints (says * ANSI C), but they use __ct_rune_t instead of int. * * NOTE: rune_t is not covered by ANSI nor other standards, and should not * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and * rune_t must be the same type. Also, wint_t should be able to hold all * members of the largest character set plus one extra value (WEOF), and * must be at least 16 bits. */ typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ /* Clang already provides these types as built-ins, but only in C++ mode. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__clang__) || !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 97 "/usr/include/sys/_types.h" 3 4 typedef __uint_least16_t __char16_t; typedef __uint_least32_t __char32_t; #endif # 100 "/usr/include/sys/_types.h" 3 4 /* In C++11, char16_t and char32_t are built-in types. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__cplusplus) && __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/include/sys/_types.h" 3 4 #define _CHAR16_T_DECLARED #define _CHAR32_T_DECLARED #endif # 105 "/usr/include/sys/_types.h" 3 4 typedef struct { long long __max_align1 __aligned(_Alignof(long long)); #ifndef _STANDALONE long double __max_align2 __aligned(_Alignof(long double)); #endif # 111 "/usr/include/sys/_types.h" 3 4 } __max_align_t; typedef __uint64_t __dev_t; /* device number */ typedef __uint32_t __fixpt_t; /* fixed point number */ /* * mbstate_t is an opaque object to keep conversion state during multibyte * stream conversions. */ typedef union { char __mbstate8[128]; __int64_t _mbstateL; /* for alignment */ } __mbstate_t; typedef __uintmax_t __rman_res_t; /* * Types for varargs. These are all provided by builtin types these * days, so centralize their definition. */ #ifdef __GNUCLIKE_BUILTIN_VARARGS typedef __builtin_va_list __va_list; /* internally known to gcc */ #else # 135 "/usr/include/sys/_types.h" 3 4 #error "No support for your compiler for stdargs" #endif # 137 "/usr/include/sys/_types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ && !defined(__NO_GNUC_VA_LIST) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 139 "/usr/include/sys/_types.h" 3 4 #define __GNUC_VA_LIST typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif # 142 "/usr/include/sys/_types.h" 3 4 /* * When the following macro is defined, the system uses 64-bit inode numbers. * Programs can use this to avoid including , with its associated * namespace pollution. */ #define __INO64 #endif /* !_SYS__TYPES_H_ */ # 151 "/usr/include/sys/_types.h" 3 4 # 42 "/usr/include/stddef.h" 2 3 4 #ifndef _PTRDIFF_T_DECLARED typedef __ptrdiff_t ptrdiff_t; #define _PTRDIFF_T_DECLARED #endif # 47 "/usr/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 49 "/usr/include/stddef.h" 3 4 #ifndef _RUNE_T_DECLARED typedef __rune_t rune_t; #define _RUNE_T_DECLARED #endif # 53 "/usr/include/stddef.h" 3 4 #endif # 54 "/usr/include/stddef.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 59 "/usr/include/stddef.h" 3 4 #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif # 65 "/usr/include/stddef.h" 3 4 #endif # 66 "/usr/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/usr/include/stddef.h" 3 4 #ifndef __CLANG_MAX_ALIGN_T_DEFINED typedef __max_align_t max_align_t; #define __CLANG_MAX_ALIGN_T_DEFINED #define _GCC_MAX_ALIGN_T #endif # 73 "/usr/include/stddef.h" 3 4 #endif # 74 "/usr/include/stddef.h" 3 4 #define offsetof(type, field) __offsetof(type, field) #if 0 /* disabled by -frewrite-includes */ #if __EXT1_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 78 "/usr/include/stddef.h" 3 4 /* ISO/IEC 9899:2011 K.3.3.2 */ #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif # 83 "/usr/include/stddef.h" 3 4 #endif /* __EXT1_VISIBLE */ # 84 "/usr/include/stddef.h" 3 4 #endif /* _STDDEF_H_ */ # 86 "/usr/include/stddef.h" 3 4 # 30 "/usr/local/include/nspr/prtypes.h" 2 /*********************************************************************** ** MACROS: PR_EXTERN ** PR_IMPLEMENT ** DESCRIPTION: ** These are only for externally visible routines and globals. For ** internal routines, just use "extern" for type checking and that ** will not export internal cross-file or forward-declared symbols. ** Define a macro for declaring procedures return types. We use this to ** deal with windoze specific type hackery for DLL definitions. Use ** PR_EXTERN when the prototype for the method is declared. Use ** PR_IMPLEMENT for the implementation of the method. ** ** Example: ** in dowhim.h ** PR_EXTERN( void ) DoWhatIMean( void ); ** in dowhim.c ** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } ** ** ***********************************************************************/ #if 0 /* disabled by -frewrite-includes */ #if defined(WIN32) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/local/include/nspr/prtypes.h" #define PR_EXPORT(__type) extern __declspec(dllexport) __type #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPORT(__type) __declspec(dllimport) __type #define PR_IMPORT_DATA(__type) __declspec(dllimport) __type #define PR_EXTERN(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT(__type) __declspec(dllexport) __type #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(XP_OS2) && defined(__declspec) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 68 "/usr/local/include/nspr/prtypes.h" #define PR_EXPORT(__type) extern __declspec(dllexport) __type #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPORT(__type) extern __declspec(dllimport) __type #define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type #define PR_EXTERN(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT(__type) __declspec(dllexport) __type #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #else /* Unix */ # 84 "/usr/local/include/nspr/prtypes.h" /* GCC 3.3 and later support the visibility attribute. */ #if 0 /* disabled by -frewrite-includes */ #if (__GNUC__ >= 4) || \ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 88 "/usr/local/include/nspr/prtypes.h" #define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #else # 90 "/usr/local/include/nspr/prtypes.h" #define PR_VISIBILITY_DEFAULT #endif # 92 "/usr/local/include/nspr/prtypes.h" #define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type #define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #endif # 107 "/usr/local/include/nspr/prtypes.h" #if 0 /* disabled by -frewrite-includes */ #if defined(_NSPR_BUILD_) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 109 "/usr/local/include/nspr/prtypes.h" #define NSPR_API(__type) PR_EXPORT(__type) #define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) #else # 112 "/usr/local/include/nspr/prtypes.h" #define NSPR_API(__type) PR_IMPORT(__type) #define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) #endif # 115 "/usr/local/include/nspr/prtypes.h" /*********************************************************************** ** MACROS: PR_BEGIN_MACRO ** PR_END_MACRO ** DESCRIPTION: ** Macro body brackets so that macros with compound statement definitions ** behave syntactically more like functions when called. ***********************************************************************/ #define PR_BEGIN_MACRO do { #define PR_END_MACRO } while (0) /*********************************************************************** ** MACROS: PR_BEGIN_EXTERN_C ** PR_END_EXTERN_C ** DESCRIPTION: ** Macro shorthands for conditional C++ extern block delimiters. ***********************************************************************/ #ifdef __cplusplus #define PR_BEGIN_EXTERN_C extern "C" { #define PR_END_EXTERN_C } #else # 136 "/usr/local/include/nspr/prtypes.h" #define PR_BEGIN_EXTERN_C #define PR_END_EXTERN_C #endif # 139 "/usr/local/include/nspr/prtypes.h" /*********************************************************************** ** MACROS: PR_BIT ** PR_BITMASK ** DESCRIPTION: ** Bit masking macros. XXX n must be <= 31 to be portable ***********************************************************************/ #define PR_BIT(n) ((PRUint32)1 << (n)) #define PR_BITMASK(n) (PR_BIT(n) - 1) /*********************************************************************** ** MACROS: PR_ROUNDUP ** PR_MIN ** PR_MAX ** PR_ABS ** DESCRIPTION: ** Commonly used macros for operations on compatible types. ***********************************************************************/ #define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) #define PR_MIN(x,y) ((x)<(y)?(x):(y)) #define PR_MAX(x,y) ((x)>(y)?(x):(y)) #define PR_ABS(x) ((x)<0?-(x):(x)) /*********************************************************************** ** MACROS: PR_ARRAY_SIZE ** DESCRIPTION: ** The number of elements in an array. ***********************************************************************/ #define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) PR_BEGIN_EXTERN_C /* ** Starting in NSPR 4.9.5, NSPR's exact-width integer types should match ** the exact-width integer types defined in . This allows sloppy ** code to use PRInt{N} and int{N}_t interchangeably. ** ** The 8-bit and 16-bit integer types can only be defined using char and ** short. All platforms define the 32-bit integer types using int. So only ** the 64-bit integer types could be defined differently. ** ** NSPR's original strategy was to use the "shortest" 64-bit integer type: ** if long is 64-bit, then prefer it over long long. This strategy is also ** used by Linux/glibc, FreeBSD, and NetBSD. ** ** Other platforms use a different strategy: simply define the 64-bit ** integer types using long long. We define the PR_ALTERNATE_INT64_TYPEDEF ** macro on these platforms. Note that PR_ALTERNATE_INT64_TYPEDEF is for ** internal use by NSPR headers only. Do not define or test this macro in ** your code. ** ** NOTE: NSPR can't use because C99 requires C++ code to define ** __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS to make all the macros ** defined in available. This strange requirement is gone in ** C11. When most platforms ignore this C99 requirement, NSPR will be able ** to use . A patch to do that is in NSPR bug 634793. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__APPLE__) || defined(__OpenBSD__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 198 "/usr/local/include/nspr/prtypes.h" #define PR_ALTERNATE_INT64_TYPEDEF #endif # 200 "/usr/local/include/nspr/prtypes.h" /************************************************************************ ** TYPES: PRUint8 ** PRInt8 ** DESCRIPTION: ** The int8 types are known to be 8 bits each. There is no type that ** is equivalent to a plain "char". ************************************************************************/ #if 0 /* disabled by -frewrite-includes */ #if PR_BYTES_PER_BYTE == 1 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 209 "/usr/local/include/nspr/prtypes.h" typedef unsigned char PRUint8; /* ** There are two scenarios that require us to define PRInt8 as type 'char'. ** (1) ** Some cfront-based C++ compilers do not like 'signed char' and ** issue the warning message: ** warning: "signed" not implemented (ignored) ** For these compilers, we have to define PRInt8 as plain 'char'. ** Make sure that plain 'char' is indeed signed under these compilers. ** (2) ** Mozilla C++ code expects the PRInt{N} and int{N}_t types to match (see bug ** 634793). If a platform defines int8_t as 'char', but NSPR defines it as ** 'signed char', it results in a type mismatch. ** On such platforms we define PRInt8 as 'char' to avoid the mismatch. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(HPUX) && defined(__cplusplus) /* reason 1*/ \ && !defined(__GNUC__) && __cplusplus < 199707L) \ || (defined(SCO) && defined(__cplusplus) /* reason 1 */ \ && !defined(__GNUC__) && __cplusplus == 1L) \ || (defined(__sun) && defined(__cplusplus)) /* reason 2 */ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 229 "/usr/local/include/nspr/prtypes.h" typedef char PRInt8; #else # 231 "/usr/local/include/nspr/prtypes.h" typedef signed char PRInt8; #endif # 233 "/usr/local/include/nspr/prtypes.h" #else # 234 "/usr/local/include/nspr/prtypes.h" #error No suitable type for PRInt8/PRUint8 #endif # 236 "/usr/local/include/nspr/prtypes.h" /************************************************************************ * MACROS: PR_INT8_MAX * PR_INT8_MIN * PR_UINT8_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt8 or PRUint8. ************************************************************************/ #define PR_INT8_MAX 127 #define PR_INT8_MIN (-128) #define PR_UINT8_MAX 255U /************************************************************************ ** TYPES: PRUint16 ** PRInt16 ** DESCRIPTION: ** The int16 types are known to be 16 bits each. ************************************************************************/ #if 0 /* disabled by -frewrite-includes */ #if PR_BYTES_PER_SHORT == 2 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 256 "/usr/local/include/nspr/prtypes.h" typedef unsigned short PRUint16; typedef short PRInt16; #else # 259 "/usr/local/include/nspr/prtypes.h" #error No suitable type for PRInt16/PRUint16 #endif # 261 "/usr/local/include/nspr/prtypes.h" /************************************************************************ * MACROS: PR_INT16_MAX * PR_INT16_MIN * PR_UINT16_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt16 or PRUint16. ************************************************************************/ #define PR_INT16_MAX 32767 #define PR_INT16_MIN (-32768) #define PR_UINT16_MAX 65535U /************************************************************************ ** TYPES: PRUint32 ** PRInt32 ** DESCRIPTION: ** The int32 types are known to be 32 bits each. ************************************************************************/ #if 0 /* disabled by -frewrite-includes */ #if PR_BYTES_PER_INT == 4 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 281 "/usr/local/include/nspr/prtypes.h" typedef unsigned int PRUint32; typedef int PRInt32; #define PR_INT32(x) x #define PR_UINT32(x) x ## U #if 0 /* disabled by -frewrite-includes */ #if 0 #elif PR_BYTES_PER_LONG == 4 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 286 "/usr/local/include/nspr/prtypes.h" typedef unsigned long PRUint32; typedef long PRInt32; #define PR_INT32(x) x ## L #define PR_UINT32(x) x ## UL #else # 291 "/usr/local/include/nspr/prtypes.h" #error No suitable type for PRInt32/PRUint32 #endif # 293 "/usr/local/include/nspr/prtypes.h" /************************************************************************ * MACROS: PR_INT32_MAX * PR_INT32_MIN * PR_UINT32_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt32 or PRUint32. ************************************************************************/ #define PR_INT32_MAX PR_INT32(2147483647) #define PR_INT32_MIN (-PR_INT32_MAX - 1) #define PR_UINT32_MAX PR_UINT32(4294967295) /************************************************************************ ** TYPES: PRUint64 ** PRInt64 ** DESCRIPTION: ** The int64 types are known to be 64 bits each. Care must be used when ** declaring variables of type PRUint64 or PRInt64. Different hardware ** architectures and even different compilers have varying support for ** 64 bit values. The only guaranteed portability requires the use of ** the LL_ macros (see prlong.h). ** ** MACROS: PR_INT64 ** PR_UINT64 ** DESCRIPTION: ** The PR_INT64 and PR_UINT64 macros provide a portable way for ** specifying 64-bit integer constants. They can only be used if ** PRInt64 and PRUint64 are defined as compiler-supported 64-bit ** integer types (i.e., if HAVE_LONG_LONG is defined, which is true ** for all the supported compilers topday). If PRInt64 and PRUint64 ** are defined as structs, the LL_INIT macro defined in prlong.h has ** to be used. ** ** MACROS: PR_INT64_MAX ** PR_INT64_MIN ** PR_UINT64_MAX ** DESCRIPTION: ** The maximum and minimum values of a PRInt64 or PRUint64. ************************************************************************/ #ifdef HAVE_LONG_LONG /* Keep this in sync with prlong.h. */ #if 0 /* disabled by -frewrite-includes */ #if PR_BYTES_PER_LONG == 8 && !defined(PR_ALTERNATE_INT64_TYPEDEF) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 336 "/usr/local/include/nspr/prtypes.h" typedef long PRInt64; typedef unsigned long PRUint64; #define PR_INT64(x) x ## L #define PR_UINT64(x) x ## UL #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(WIN32) && !defined(__GNUC__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 341 "/usr/local/include/nspr/prtypes.h" typedef __int64 PRInt64; typedef unsigned __int64 PRUint64; #define PR_INT64(x) x ## i64 #define PR_UINT64(x) x ## ui64 #else # 346 "/usr/local/include/nspr/prtypes.h" typedef long long PRInt64; typedef unsigned long long PRUint64; #define PR_INT64(x) x ## LL #define PR_UINT64(x) x ## ULL #endif /* PR_BYTES_PER_LONG == 8 */ # 351 "/usr/local/include/nspr/prtypes.h" #define PR_INT64_MAX PR_INT64(0x7fffffffffffffff) #define PR_INT64_MIN (-PR_INT64_MAX - 1) #define PR_UINT64_MAX PR_UINT64(-1) #else /* !HAVE_LONG_LONG */ # 356 "/usr/local/include/nspr/prtypes.h" typedef struct { #ifdef IS_LITTLE_ENDIAN PRUint32 lo, hi; #else # 360 "/usr/local/include/nspr/prtypes.h" PRUint32 hi, lo; #endif # 362 "/usr/local/include/nspr/prtypes.h" } PRInt64; typedef PRInt64 PRUint64; #define PR_INT64_MAX (PRInt64){0x7fffffff, 0xffffffff} #define PR_INT64_MIN (PRInt64){0xffffffff, 0xffffffff} #define PR_UINT64_MAX (PRUint64){0xffffffff, 0xffffffff} #endif /* !HAVE_LONG_LONG */ # 370 "/usr/local/include/nspr/prtypes.h" /************************************************************************ ** TYPES: PRUintn ** PRIntn ** DESCRIPTION: ** The PRIntn types are most appropriate for automatic variables. They are ** guaranteed to be at least 16 bits, though various architectures may ** define them to be wider (e.g., 32 or even 64 bits). These types are ** never valid for fields of a structure. ************************************************************************/ #if 0 /* disabled by -frewrite-includes */ #if PR_BYTES_PER_INT >= 2 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 381 "/usr/local/include/nspr/prtypes.h" typedef int PRIntn; typedef unsigned int PRUintn; #else # 384 "/usr/local/include/nspr/prtypes.h" #error 'sizeof(int)' not sufficient for platform use #endif # 386 "/usr/local/include/nspr/prtypes.h" /************************************************************************ ** TYPES: PRFloat64 ** DESCRIPTION: ** NSPR's floating point type is always 64 bits. ************************************************************************/ typedef double PRFloat64; /************************************************************************ ** TYPES: PRSize ** DESCRIPTION: ** A type for representing the size of objects. ************************************************************************/ typedef size_t PRSize; /************************************************************************ ** TYPES: PROffset32, PROffset64 ** DESCRIPTION: ** A type for representing byte offsets from some location. ************************************************************************/ typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; /************************************************************************ ** TYPES: PRPtrDiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable ** for storing a pointer or pointer subtraction. ************************************************************************/ typedef ptrdiff_t PRPtrdiff; /************************************************************************ ** TYPES: PRUptrdiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable ** for storing a pointer or pointer sutraction. ************************************************************************/ #ifdef _WIN64 typedef PRUint64 PRUptrdiff; #else # 427 "/usr/local/include/nspr/prtypes.h" typedef unsigned long PRUptrdiff; #endif # 429 "/usr/local/include/nspr/prtypes.h" /************************************************************************ ** TYPES: PRBool ** DESCRIPTION: ** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE ** for clarity of target type in assignments and actual arguments. Use ** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans ** just as you would C int-valued conditions. ************************************************************************/ typedef PRIntn PRBool; #define PR_TRUE 1 #define PR_FALSE 0 /************************************************************************ ** TYPES: PRPackedBool ** DESCRIPTION: ** Use PRPackedBool within structs where bitfields are not desirable ** but minimum and consistant overhead matters. ************************************************************************/ typedef PRUint8 PRPackedBool; /* ** Status code used by some routines that have a single point of failure or ** special status return. */ typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; #ifndef __PRUNICHAR__ #define __PRUNICHAR__ #ifdef WIN32 typedef wchar_t PRUnichar; #else # 461 "/usr/local/include/nspr/prtypes.h" typedef PRUint16 PRUnichar; #endif # 463 "/usr/local/include/nspr/prtypes.h" #endif # 464 "/usr/local/include/nspr/prtypes.h" /* ** WARNING: The undocumented data types PRWord and PRUword are ** only used in the garbage collection and arena code. Do not ** use PRWord and PRUword in new code. ** ** A PRWord is an integer that is the same size as a void*. ** It implements the notion of a "word" in the Java Virtual ** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine ** Specification, Addison-Wesley, September 1996. ** http://java.sun.com/docs/books/vmspec/index.html.) */ #ifdef _WIN64 typedef PRInt64 PRWord; typedef PRUint64 PRUword; #else # 480 "/usr/local/include/nspr/prtypes.h" typedef long PRWord; typedef unsigned long PRUword; #endif # 483 "/usr/local/include/nspr/prtypes.h" /* * PR_PRETEND_NORETURN, specified at the end of a function declaration, * indicates that for the purposes of static analysis, this function does not * return. (The function definition does not need to be annotated.) * * void PR_Assert(const char *s, const char *file, PRIntn ln) * PR_PRETEND_NORETURN; * * Some static analyzers, like scan-build from clang, can use this information * to eliminate false positives. From the upstream documentation of * scan-build: * This attribute is useful for annotating assertion handlers that actually * can return, but for the purpose of using the analyzer we want to pretend * that such functions do not return. */ #ifdef __clang_analyzer__ #if 0 /* disabled by -frewrite-includes */ #if __has_extension(attribute_analyzer_noreturn) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 501 "/usr/local/include/nspr/prtypes.h" #define PR_PRETEND_NORETURN __attribute__((analyzer_noreturn)) #endif # 503 "/usr/local/include/nspr/prtypes.h" #endif # 504 "/usr/local/include/nspr/prtypes.h" #ifndef PR_PRETEND_NORETURN #define PR_PRETEND_NORETURN /* no support */ #endif # 508 "/usr/local/include/nspr/prtypes.h" #if 0 /* disabled by -frewrite-includes */ #if defined(NO_NSPR_10_SUPPORT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 510 "/usr/local/include/nspr/prtypes.h" #else # 511 "/usr/local/include/nspr/prtypes.h" /********* ???????????????? FIX ME ??????????????????????????? *****/ /********************** Some old definitions until pr=>ds transition is done ***/ /********************** Also, we are still using NSPR 1.0. GC ******************/ /* ** Fundamental NSPR macros, used nearly everywhere. */ #define PR_PUBLIC_API PR_IMPLEMENT /* ** Macro body brackets so that macros with compound statement definitions ** behave syntactically more like functions when called. */ #define NSPR_BEGIN_MACRO do { #define NSPR_END_MACRO } while (0) /* ** Macro shorthands for conditional C++ extern block delimiters. */ #ifdef NSPR_BEGIN_EXTERN_C #undef NSPR_BEGIN_EXTERN_C #endif # 533 "/usr/local/include/nspr/prtypes.h" #ifdef NSPR_END_EXTERN_C #undef NSPR_END_EXTERN_C #endif # 536 "/usr/local/include/nspr/prtypes.h" #ifdef __cplusplus #define NSPR_BEGIN_EXTERN_C extern "C" { #define NSPR_END_EXTERN_C } #else # 541 "/usr/local/include/nspr/prtypes.h" #define NSPR_BEGIN_EXTERN_C #define NSPR_END_EXTERN_C #endif # 544 "/usr/local/include/nspr/prtypes.h" #if 0 /* expanded by -frewrite-includes */ #include "obsolete/protypes.h" #endif /* expanded by -frewrite-includes */ # 545 "/usr/local/include/nspr/prtypes.h" # 546 "/usr/local/include/nspr/prtypes.h" /********* ????????????? End Fix me ?????????????????????????????? *****/ #endif /* NO_NSPR_10_SUPPORT */ # 549 "/usr/local/include/nspr/prtypes.h" /* ** Compile-time assert. "condition" must be a constant expression. ** The macro can be used only in places where an "extern" declaration is ** allowed. */ #define PR_STATIC_ASSERT(condition) \ extern void pr_static_assert(int arg[(condition) ? 1 : -1]) PR_END_EXTERN_C #endif /* prtypes_h___ */ # 561 "/usr/local/include/nspr/prtypes.h" # 18 "../../../dist/public/nss/seccomon.h" 2 #ifdef __cplusplus #define SEC_BEGIN_PROTOS extern "C" { #define SEC_END_PROTOS } #else # 23 "../../../dist/public/nss/seccomon.h" #define SEC_BEGIN_PROTOS #define SEC_END_PROTOS #endif # 26 "../../../dist/public/nss/seccomon.h" #if 0 /* expanded by -frewrite-includes */ #include "secport.h" #endif /* expanded by -frewrite-includes */ # 27 "../../../dist/public/nss/seccomon.h" # 1 "../../../dist/public/nss/secport.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * secport.h - portability interfaces for security libraries */ #ifndef _SECPORT_H_ #define _SECPORT_H_ #if 0 /* expanded by -frewrite-includes */ #include "utilrename.h" #endif /* expanded by -frewrite-includes */ # 12 "../../../dist/public/nss/secport.h" # 13 "../../../dist/public/nss/secport.h" #if 0 /* expanded by -frewrite-includes */ #include "prlink.h" #endif /* expanded by -frewrite-includes */ # 13 "../../../dist/public/nss/secport.h" # 1 "/usr/local/include/nspr/prlink.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prlink_h___ #define prlink_h___ /* ** API to static and dynamic linking. */ #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 12 "/usr/local/include/nspr/prlink.h" # 13 "/usr/local/include/nspr/prlink.h" PR_BEGIN_EXTERN_C typedef struct PRLibrary PRLibrary; typedef struct PRStaticLinkTable { const char *name; void (*fp)(void); } PRStaticLinkTable; /* ** Change the default library path to the given string. The string is ** copied. This call will fail if it runs out of memory. ** ** The string provided as 'path' is copied. The caller can do whatever is ** convenient with the argument when the function is complete. */ NSPR_API(PRStatus) PR_SetLibraryPath(const char *path); /* ** Return a character string which contains the path used to search for ** dynamically loadable libraries. ** ** The returned value is basically a copy of a PR_SetLibraryPath(). ** The storage is allocated by the runtime and becomes the responsibilty ** of the caller. */ NSPR_API(char*) PR_GetLibraryPath(void); /* ** Given a directory name "dir" and a library name "lib" construct a full ** path name that will refer to the actual dynamically loaded ** library. This does not test for existance of said file, it just ** constructs the full filename. The name constructed is system dependent ** and prepared for PR_LoadLibrary. The result must be free'd when the ** caller is done with it. ** ** The storage for the result is allocated by the runtime and becomes the ** responsibility of the caller. */ NSPR_API(char*) PR_GetLibraryName(const char *dir, const char *lib); /* ** ** Free the memory allocated, for the caller, by PR_GetLibraryName */ NSPR_API(void) PR_FreeLibraryName(char *mem); /* ** Given a library "name" try to load the library. The argument "name" ** is a machine-dependent name for the library, such as the full pathname ** returned by PR_GetLibraryName. If the library is already loaded, ** this function will avoid loading the library twice. ** ** If the library is loaded successfully, then a pointer to the PRLibrary ** structure representing the library is returned. Otherwise, NULL is ** returned. ** ** This increments the reference count of the library. */ NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name); /* ** Each operating system has its preferred way of specifying ** a file in the file system. Most operating systems use ** a pathname. Mac OS Classic, on the other hand, uses the FSSpec ** structure to specify a file. PRLibSpec allows NSPR clients ** to use the type of file specification that is most efficient ** for a particular platform. ** ** On some operating systems such as Mac OS Classic, a shared library ** may contain code fragments that can be individually loaded. ** PRLibSpec also allows NSPR clients to identify a code fragment ** in a library, if code fragments are supported by the OS. ** A code fragment can be specified by name or by an integer index. ** ** Right now PRLibSpec supports four types of library specification: ** a pathname in the native character encoding, a Mac code fragment ** by name, a Mac code fragment by index, and a UTF-16 pathname. */ typedef enum PRLibSpecType { PR_LibSpec_Pathname, PR_LibSpec_MacNamedFragment, /* obsolete (for Mac OS Classic) */ PR_LibSpec_MacIndexedFragment, /* obsolete (for Mac OS Classic) */ PR_LibSpec_PathnameU /* supported only on Win32 */ } PRLibSpecType; struct FSSpec; /* Mac OS Classic FSSpec */ typedef struct PRLibSpec { PRLibSpecType type; union { /* if type is PR_LibSpec_Pathname */ const char *pathname; /* if type is PR_LibSpec_MacNamedFragment */ struct { const struct FSSpec *fsspec; const char *name; } mac_named_fragment; /* obsolete (for Mac OS Classic) */ /* if type is PR_LibSpec_MacIndexedFragment */ struct { const struct FSSpec *fsspec; PRUint32 index; } mac_indexed_fragment; /* obsolete (for Mac OS Classic) */ /* if type is PR_LibSpec_PathnameU */ const PRUnichar *pathname_u; /* supported only on Win32 */ } value; } PRLibSpec; /* ** The following bit flags may be or'd together and passed ** as the 'flags' argument to PR_LoadLibraryWithFlags. ** Flags not supported by the underlying OS are ignored. */ #define PR_LD_LAZY 0x1 /* equivalent to RTLD_LAZY on Unix */ #define PR_LD_NOW 0x2 /* equivalent to RTLD_NOW on Unix */ #define PR_LD_GLOBAL 0x4 /* equivalent to RTLD_GLOBAL on Unix */ #define PR_LD_LOCAL 0x8 /* equivalent to RTLD_LOCAL on Unix */ /* The following is equivalent to LOAD_WITH_ALTERED_SEARCH_PATH on Windows */ #define PR_LD_ALT_SEARCH_PATH 0x10 /* 0x8000 reserved for NSPR internal use */ /* ** Load the specified library, in the manner specified by 'flags'. */ NSPR_API(PRLibrary *) PR_LoadLibraryWithFlags( PRLibSpec libSpec, /* the shared library */ PRIntn flags /* flags that affect the loading */ ); /* ** Unload a previously loaded library. If the library was a static ** library then the static link table will no longer be referenced. The ** associated PRLibrary object is freed. ** ** PR_FAILURE is returned if the library cannot be unloaded. ** ** This function decrements the reference count of the library. */ NSPR_API(PRStatus) PR_UnloadLibrary(PRLibrary *lib); /* ** Given the name of a procedure, return the address of the function that ** implements the procedure, or NULL if no such function can be ** found. This does not find symbols in the main program (the ".exe"); ** use PR_LoadStaticLibrary to register symbols in the main program. ** ** This function does not modify the reference count of the library. */ NSPR_API(void*) PR_FindSymbol(PRLibrary *lib, const char *name); /* ** Similar to PR_FindSymbol, except that the return value is a pointer to ** a function, and not a pointer to void. Casting between a data pointer ** and a function pointer is not portable according to the C standard. ** Any function pointer can be cast to any other function pointer. ** ** This function does not modify the reference count of the library. */ typedef void (*PRFuncPtr)(void); NSPR_API(PRFuncPtr) PR_FindFunctionSymbol(PRLibrary *lib, const char *name); /* ** Finds a symbol in one of the currently loaded libraries. Given the ** name of a procedure, return the address of the function that ** implements the procedure, and return the library that contains that ** symbol, or NULL if no such function can be found. This does not find ** symbols in the main program (the ".exe"); use PR_AddStaticLibrary to ** register symbols in the main program. ** ** This increments the reference count of the library. */ NSPR_API(void*) PR_FindSymbolAndLibrary(const char *name, PRLibrary* *lib); /* ** Similar to PR_FindSymbolAndLibrary, except that the return value is ** a pointer to a function, and not a pointer to void. Casting between a ** data pointer and a function pointer is not portable according to the C ** standard. Any function pointer can be cast to any other function pointer. ** ** This increments the reference count of the library. */ NSPR_API(PRFuncPtr) PR_FindFunctionSymbolAndLibrary(const char *name, PRLibrary* *lib); /* ** Register a static link table with the runtime under the name ** "name". The symbols present in the static link table will be made ** available to PR_FindSymbol. If "name" is null then the symbols will be ** made available to the library which represents the executable. The ** tables are not copied. ** ** Returns the library object if successful, null otherwise. ** ** This increments the reference count of the library. */ NSPR_API(PRLibrary*) PR_LoadStaticLibrary( const char *name, const PRStaticLinkTable *table); /* ** Return the pathname of the file that the library "name" was loaded ** from. "addr" is the address of a function defined in the library. ** ** The caller is responsible for freeing the result with PR_Free. */ NSPR_API(char *) PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr); PR_END_EXTERN_C #endif /* prlink_h___ */ # 231 "/usr/local/include/nspr/prlink.h" # 14 "../../../dist/public/nss/secport.h" 2 /* * define XP_WIN, XP_BEOS, or XP_UNIX, in case they are not defined * by anyone else */ #ifdef _WINDOWS #ifndef XP_WIN #define XP_WIN #endif # 23 "../../../dist/public/nss/secport.h" #if 0 /* disabled by -frewrite-includes */ #if defined(_WIN32) || defined(WIN32) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 24 "../../../dist/public/nss/secport.h" #ifndef XP_WIN32 #define XP_WIN32 #endif # 27 "../../../dist/public/nss/secport.h" #endif # 28 "../../../dist/public/nss/secport.h" #endif # 29 "../../../dist/public/nss/secport.h" #ifdef __BEOS__ #ifndef XP_BEOS #define XP_BEOS #endif # 34 "../../../dist/public/nss/secport.h" #endif # 35 "../../../dist/public/nss/secport.h" #ifdef unix #ifndef XP_UNIX #define XP_UNIX #endif # 40 "../../../dist/public/nss/secport.h" #endif # 41 "../../../dist/public/nss/secport.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "../../../dist/public/nss/secport.h" # 1 "/usr/include/sys/types.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)types.h 8.6 (Berkeley) 2/19/95 * $FreeBSD$ */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/types.h" 3 4 # 44 "/usr/include/sys/types.h" 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/endian.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1987, 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)endian.h 8.1 (Berkeley) 6/10/93 * $FreeBSD$ */ #ifndef _MACHINE_ENDIAN_H_ #define _MACHINE_ENDIAN_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/machine/endian.h" 3 4 # 39 "/usr/include/machine/endian.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/machine/endian.h" 3 4 # 40 "/usr/include/machine/endian.h" 3 4 /* * Define the order of 32-bit words in 64-bit words. */ #ifdef __LITTLE_ENDIAN__ #define _QUAD_HIGHWORD 1 #define _QUAD_LOWWORD 0 #else # 48 "/usr/include/machine/endian.h" 3 4 #define _QUAD_HIGHWORD 0 #define _QUAD_LOWWORD 1 #endif # 51 "/usr/include/machine/endian.h" 3 4 /* * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__ * and __LITTLE_ENDIAN__ (resp). */ #ifdef _BIG_ENDIAN #undef _BIG_ENDIAN #endif # 59 "/usr/include/machine/endian.h" 3 4 #ifdef _LITTLE_ENDIAN #undef _LITTLE_ENDIAN #endif # 62 "/usr/include/machine/endian.h" 3 4 /* * Definitions for byte order, according to byte significance from low * address to high. */ #define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ #define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ #define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ #ifdef __LITTLE_ENDIAN__ #define _BYTE_ORDER _LITTLE_ENDIAN #else # 74 "/usr/include/machine/endian.h" 3 4 #define _BYTE_ORDER _BIG_ENDIAN #endif # 76 "/usr/include/machine/endian.h" 3 4 /* * Deprecated variants that don't have enough underscores to be useful in more * strict namespaces. */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 82 "/usr/include/machine/endian.h" 3 4 #define LITTLE_ENDIAN _LITTLE_ENDIAN #define BIG_ENDIAN _BIG_ENDIAN #define PDP_ENDIAN _PDP_ENDIAN #define BYTE_ORDER _BYTE_ORDER #endif # 87 "/usr/include/machine/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 89 "/usr/include/machine/endian.h" 3 4 #define __is_constant(x) __builtin_constant_p(x) #else # 91 "/usr/include/machine/endian.h" 3 4 #define __is_constant(x) 0 #endif # 93 "/usr/include/machine/endian.h" 3 4 #define __bswap16_const(x) ((((__uint16_t)(x) >> 8) & 0xff) | \ (((__uint16_t)(x) << 8) & 0xff00)) #define __bswap32_const(x) ((((__uint32_t)(x) >> 24) & 0xff) | \ (((__uint32_t)(x) >> 8) & 0xff00) | \ (((__uint32_t)(x)<< 8) & 0xff0000) | \ (((__uint32_t)(x) << 24) & 0xff000000)) #define __bswap64_const(x) ((((__uint64_t)(x) >> 56) & 0xff) | \ (((__uint64_t)(x) >> 40) & 0xff00) | \ (((__uint64_t)(x) >> 24) & 0xff0000) | \ (((__uint64_t)(x) >> 8) & 0xff000000) | \ (((__uint64_t)(x) << 8) & ((__uint64_t)0xff << 32)) | \ (((__uint64_t)(x) << 24) & ((__uint64_t)0xff << 40)) | \ (((__uint64_t)(x) << 40) & ((__uint64_t)0xff << 48)) | \ (((__uint64_t)(x) << 56) & ((__uint64_t)0xff << 56))) static __inline __uint16_t __bswap16_var(__uint16_t _x) { return ((_x >> 8) | ((_x << 8) & 0xff00)); } static __inline __uint32_t __bswap32_var(__uint32_t _x) { return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) | ((_x << 24) & 0xff000000)); } static __inline __uint64_t __bswap64_var(__uint64_t _x) { return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | ((_x << 24) & ((__uint64_t)0xff << 40)) | ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } #define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ __bswap16_var(x))) #define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ __bswap32_var(x)) #define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ __bswap64_var(x)) #ifdef __LITTLE_ENDIAN__ #define __htonl(x) (__bswap32((__uint32_t)(x))) #define __htons(x) (__bswap16((__uint16_t)(x))) #define __ntohl(x) (__bswap32((__uint32_t)(x))) #define __ntohs(x) (__bswap16((__uint16_t)(x))) #else # 147 "/usr/include/machine/endian.h" 3 4 #define __htonl(x) ((__uint32_t)(x)) #define __htons(x) ((__uint16_t)(x)) #define __ntohl(x) ((__uint32_t)(x)) #define __ntohs(x) ((__uint16_t)(x)) #endif # 152 "/usr/include/machine/endian.h" 3 4 #endif /* !_MACHINE_ENDIAN_H_ */ # 154 "/usr/include/machine/endian.h" 3 4 # 47 "/usr/include/sys/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/sys/types.h" 3 4 # 48 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/_pthreadtypes.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu * Copyright (c) 1995-1998 by John Birrell * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Chris Provenzano. * 4. The name of Chris Provenzano may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS__PTHREADTYPES_H_ #define _SYS__PTHREADTYPES_H_ /* * Forward structure definitions. * * These are mostly opaque to the user. */ struct pthread; struct pthread_attr; struct pthread_cond; struct pthread_cond_attr; struct pthread_mutex; struct pthread_mutex_attr; struct pthread_once; struct pthread_rwlock; struct pthread_rwlockattr; struct pthread_barrier; struct pthread_barrier_attr; struct pthread_spinlock; /* * Primitive system data type definitions required by P1003.1c. * * Note that P1003.1c specifies that there are no defined comparison * or assignment operators for the types pthread_attr_t, pthread_cond_t, * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. */ #ifndef _PTHREAD_T_DECLARED typedef struct pthread *pthread_t; #define _PTHREAD_T_DECLARED #endif # 70 "/usr/include/sys/_pthreadtypes.h" 3 4 typedef struct pthread_attr *pthread_attr_t; typedef struct pthread_mutex *pthread_mutex_t; typedef struct pthread_mutex_attr *pthread_mutexattr_t; typedef struct pthread_cond *pthread_cond_t; typedef struct pthread_cond_attr *pthread_condattr_t; typedef int pthread_key_t; typedef struct pthread_once pthread_once_t; typedef struct pthread_rwlock *pthread_rwlock_t; typedef struct pthread_rwlockattr *pthread_rwlockattr_t; typedef struct pthread_barrier *pthread_barrier_t; typedef struct pthread_barrierattr *pthread_barrierattr_t; typedef struct pthread_spinlock *pthread_spinlock_t; /* * Additional type definitions: * * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for * use in header symbols. */ typedef void *pthread_addr_t; typedef void *(*pthread_startroutine_t)(void *); /* * Once definitions. */ struct pthread_once { int state; pthread_mutex_t mutex; }; #endif /* ! _SYS__PTHREADTYPES_H_ */ # 101 "/usr/include/sys/_pthreadtypes.h" 3 4 # 50 "/usr/include/sys/types.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/include/sys/types.h" 3 4 typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; #ifndef _KERNEL typedef unsigned short ushort; /* Sys V compatibility */ typedef unsigned int uint; /* Sys V compatibility */ #endif # 60 "/usr/include/sys/types.h" 3 4 #endif # 61 "/usr/include/sys/types.h" 3 4 /* * XXX POSIX sized integrals that should appear only in . */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 65 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/_stdint.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 David E. O'Brien * Copyright (c) 2001 Mike Barcroft * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS__STDINT_H_ #define _SYS__STDINT_H_ #ifndef _INT8_T_DECLARED typedef __int8_t int8_t; #define _INT8_T_DECLARED #endif # 39 "/usr/include/sys/_stdint.h" 3 4 #ifndef _INT16_T_DECLARED typedef __int16_t int16_t; #define _INT16_T_DECLARED #endif # 44 "/usr/include/sys/_stdint.h" 3 4 #ifndef _INT32_T_DECLARED typedef __int32_t int32_t; #define _INT32_T_DECLARED #endif # 49 "/usr/include/sys/_stdint.h" 3 4 #ifndef _INT64_T_DECLARED typedef __int64_t int64_t; #define _INT64_T_DECLARED #endif # 54 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT8_T_DECLARED typedef __uint8_t uint8_t; #define _UINT8_T_DECLARED #endif # 59 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT16_T_DECLARED typedef __uint16_t uint16_t; #define _UINT16_T_DECLARED #endif # 64 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT32_T_DECLARED typedef __uint32_t uint32_t; #define _UINT32_T_DECLARED #endif # 69 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT64_T_DECLARED typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif # 74 "/usr/include/sys/_stdint.h" 3 4 #ifndef _INTPTR_T_DECLARED typedef __intptr_t intptr_t; #define _INTPTR_T_DECLARED #endif # 79 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINTPTR_T_DECLARED typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif # 83 "/usr/include/sys/_stdint.h" 3 4 #ifndef _INTMAX_T_DECLARED typedef __intmax_t intmax_t; #define _INTMAX_T_DECLARED #endif # 87 "/usr/include/sys/_stdint.h" 3 4 #ifndef _UINTMAX_T_DECLARED typedef __uintmax_t uintmax_t; #define _UINTMAX_T_DECLARED #endif # 91 "/usr/include/sys/_stdint.h" 3 4 #endif /* !_SYS__STDINT_H_ */ # 93 "/usr/include/sys/_stdint.h" 3 4 # 66 "/usr/include/sys/types.h" 2 3 4 typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef __uint64_t u_quad_t; /* quads (deprecated) */ typedef __int64_t quad_t; typedef quad_t * qaddr_t; typedef char * caddr_t; /* core address */ typedef const char * c_caddr_t; /* core address, pointer to const */ #ifndef _BLKSIZE_T_DECLARED typedef __blksize_t blksize_t; #define _BLKSIZE_T_DECLARED #endif # 83 "/usr/include/sys/types.h" 3 4 typedef __cpuwhich_t cpuwhich_t; typedef __cpulevel_t cpulevel_t; typedef __cpusetid_t cpusetid_t; #ifndef _BLKCNT_T_DECLARED typedef __blkcnt_t blkcnt_t; #define _BLKCNT_T_DECLARED #endif # 92 "/usr/include/sys/types.h" 3 4 #ifndef _CLOCK_T_DECLARED typedef __clock_t clock_t; #define _CLOCK_T_DECLARED #endif # 97 "/usr/include/sys/types.h" 3 4 #ifndef _CLOCKID_T_DECLARED typedef __clockid_t clockid_t; #define _CLOCKID_T_DECLARED #endif # 102 "/usr/include/sys/types.h" 3 4 typedef __critical_t critical_t; /* Critical section value */ typedef __daddr_t daddr_t; /* disk address */ #ifndef _DEV_T_DECLARED typedef __dev_t dev_t; /* device number or struct cdev */ #define _DEV_T_DECLARED #endif # 110 "/usr/include/sys/types.h" 3 4 #ifndef _FFLAGS_T_DECLARED typedef __fflags_t fflags_t; /* file flags */ #define _FFLAGS_T_DECLARED #endif # 115 "/usr/include/sys/types.h" 3 4 typedef __fixpt_t fixpt_t; /* fixed point number */ #ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; #define _FSBLKCNT_T_DECLARED #endif # 123 "/usr/include/sys/types.h" 3 4 #ifndef _GID_T_DECLARED typedef __gid_t gid_t; /* group id */ #define _GID_T_DECLARED #endif # 128 "/usr/include/sys/types.h" 3 4 #ifndef _IN_ADDR_T_DECLARED typedef __uint32_t in_addr_t; /* base type for internet address */ #define _IN_ADDR_T_DECLARED #endif # 133 "/usr/include/sys/types.h" 3 4 #ifndef _IN_PORT_T_DECLARED typedef __uint16_t in_port_t; #define _IN_PORT_T_DECLARED #endif # 138 "/usr/include/sys/types.h" 3 4 #ifndef _ID_T_DECLARED typedef __id_t id_t; /* can hold a uid_t or pid_t */ #define _ID_T_DECLARED #endif # 143 "/usr/include/sys/types.h" 3 4 #ifndef _INO_T_DECLARED typedef __ino_t ino_t; /* inode number */ #define _INO_T_DECLARED #endif # 148 "/usr/include/sys/types.h" 3 4 #ifndef _KEY_T_DECLARED typedef __key_t key_t; /* IPC key (for Sys V IPC) */ #define _KEY_T_DECLARED #endif # 153 "/usr/include/sys/types.h" 3 4 #ifndef _LWPID_T_DECLARED typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ #define _LWPID_T_DECLARED #endif # 158 "/usr/include/sys/types.h" 3 4 #ifndef _MODE_T_DECLARED typedef __mode_t mode_t; /* permissions */ #define _MODE_T_DECLARED #endif # 163 "/usr/include/sys/types.h" 3 4 #ifndef _ACCMODE_T_DECLARED typedef __accmode_t accmode_t; /* access permissions */ #define _ACCMODE_T_DECLARED #endif # 168 "/usr/include/sys/types.h" 3 4 #ifndef _NLINK_T_DECLARED typedef __nlink_t nlink_t; /* link count */ #define _NLINK_T_DECLARED #endif # 173 "/usr/include/sys/types.h" 3 4 #ifndef _OFF_T_DECLARED typedef __off_t off_t; /* file offset */ #define _OFF_T_DECLARED #endif # 178 "/usr/include/sys/types.h" 3 4 #ifndef _OFF64_T_DECLARED typedef __off64_t off64_t; /* file offset (alias) */ #define _OFF64_T_DECLARED #endif # 183 "/usr/include/sys/types.h" 3 4 #ifndef _PID_T_DECLARED typedef __pid_t pid_t; /* process id */ #define _PID_T_DECLARED #endif # 188 "/usr/include/sys/types.h" 3 4 typedef __register_t register_t; #ifndef _RLIM_T_DECLARED typedef __rlim_t rlim_t; /* resource limit */ #define _RLIM_T_DECLARED #endif # 195 "/usr/include/sys/types.h" 3 4 typedef __int64_t sbintime_t; typedef __segsz_t segsz_t; /* segment size (in pages) */ #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 204 "/usr/include/sys/types.h" 3 4 #ifndef _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif # 209 "/usr/include/sys/types.h" 3 4 #ifndef _SUSECONDS_T_DECLARED typedef __suseconds_t suseconds_t; /* microseconds (signed) */ #define _SUSECONDS_T_DECLARED #endif # 214 "/usr/include/sys/types.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 219 "/usr/include/sys/types.h" 3 4 #ifndef _TIMER_T_DECLARED typedef __timer_t timer_t; #define _TIMER_T_DECLARED #endif # 224 "/usr/include/sys/types.h" 3 4 #ifndef _MQD_T_DECLARED typedef __mqd_t mqd_t; #define _MQD_T_DECLARED #endif # 229 "/usr/include/sys/types.h" 3 4 typedef __u_register_t u_register_t; #ifndef _UID_T_DECLARED typedef __uid_t uid_t; /* user id */ #define _UID_T_DECLARED #endif # 236 "/usr/include/sys/types.h" 3 4 #ifndef _USECONDS_T_DECLARED typedef __useconds_t useconds_t; /* microseconds (unsigned) */ #define _USECONDS_T_DECLARED #endif # 241 "/usr/include/sys/types.h" 3 4 #ifndef _CAP_IOCTL_T_DECLARED #define _CAP_IOCTL_T_DECLARED typedef unsigned long cap_ioctl_t; #endif # 246 "/usr/include/sys/types.h" 3 4 #ifndef _CAP_RIGHTS_T_DECLARED #define _CAP_RIGHTS_T_DECLARED struct cap_rights; typedef struct cap_rights cap_rights_t; #endif # 253 "/usr/include/sys/types.h" 3 4 /* * Types suitable for exporting physical addresses, virtual addresses * (pointers), and memory object sizes from the kernel independent of native * word size. These should be used in place of vm_paddr_t, (u)intptr_t, and * size_t in structs which contain such types that are shared with userspace. */ typedef __uint64_t kpaddr_t; typedef __uint64_t kvaddr_t; typedef __uint64_t ksize_t; typedef __int64_t kssize_t; typedef __vm_offset_t vm_offset_t; typedef __uint64_t vm_ooffset_t; typedef __vm_paddr_t vm_paddr_t; typedef __uint64_t vm_pindex_t; typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; #ifdef _KERNEL typedef int boolean_t; typedef struct device *device_t; typedef __intfptr_t intfptr_t; /* * XXX this is fixed width for historical reasons. It should have had type * __int_fast32_t. Fixed-width types should not be used unless binary * compatibility is essential. Least-width types should be used even less * since they provide smaller benefits. * * XXX should be MD. * * XXX this is bogus in -current, but still used for spl*(). */ typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ typedef __uintfptr_t uintfptr_t; typedef __uint64_t uoff_t; typedef char vm_memattr_t; /* memory attribute codes */ typedef struct vm_page *vm_page_t; #if 0 /* disabled by -frewrite-includes */ #if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 296 "/usr/include/sys/types.h" 3 4 #define __bool_true_false_are_defined 1 #define false 0 #define true 1 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 300 "/usr/include/sys/types.h" 3 4 typedef int _Bool; #endif # 302 "/usr/include/sys/types.h" 3 4 typedef _Bool bool; #endif /* !__bool_true_false_are_defined && !__cplusplus */ # 304 "/usr/include/sys/types.h" 3 4 #define offsetof(type, field) __offsetof(type, field) #endif /* !_KERNEL */ # 308 "/usr/include/sys/types.h" 3 4 /* * The following are all things that really shouldn't exist in this header, * since its purpose is to provide typedefs, not miscellaneous doodads. */ #ifdef __POPCNT__ #define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) #define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) #define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) #define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) #define __bitcount(x) __builtin_popcount((unsigned int)(x)) #else # 321 "/usr/include/sys/types.h" 3 4 /* * Population count algorithm using SWAR approach * - "SIMD Within A Register". */ static __inline __uint16_t __bitcount16(__uint16_t _x) { _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f; _x = (_x + (_x >> 8)) & 0x00ff; return (_x); } static __inline __uint32_t __bitcount32(__uint32_t _x) { _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f0f0f; _x = (_x + (_x >> 8)); _x = (_x + (_x >> 16)) & 0x000000ff; return (_x); } #ifdef __LP64__ static __inline __uint64_t __bitcount64(__uint64_t _x) { _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; _x = (_x + (_x >> 8)); _x = (_x + (_x >> 16)); _x = (_x + (_x >> 32)) & 0x000000ff; return (_x); } #define __bitcountl(x) __bitcount64((unsigned long)(x)) #else # 364 "/usr/include/sys/types.h" 3 4 static __inline __uint64_t __bitcount64(__uint64_t _x) { return (__bitcount32(_x >> 32) + __bitcount32(_x)); } #define __bitcountl(x) __bitcount32((unsigned long)(x)) #endif # 373 "/usr/include/sys/types.h" 3 4 #define __bitcount(x) __bitcount32((unsigned int)(x)) #endif # 375 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 377 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 378 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS_SELECT_H_ #define _SYS_SELECT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/select.h" 3 4 # 38 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/select.h" 3 4 # 39 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/sys/_sigset.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1989, 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)signal.h 8.4 (Berkeley) 5/4/95 * $FreeBSD$ */ #ifndef _SYS__SIGSET_H_ #define _SYS__SIGSET_H_ /* * sigset_t macros. */ #define _SIG_WORDS 4 #define _SIG_MAXSIG 128 #define _SIG_IDX(sig) ((sig) - 1) #define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) #define _SIG_BIT(sig) (1U << (_SIG_IDX(sig) & 31)) #define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) typedef struct __sigset { __uint32_t __bits[_SIG_WORDS]; } __sigset_t; #if 0 /* disabled by -frewrite-includes */ #if defined(_KERNEL) && defined(COMPAT_43) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/include/sys/_sigset.h" 3 4 typedef unsigned int osigset_t; #endif # 60 "/usr/include/sys/_sigset.h" 3 4 #endif /* !_SYS__SIGSET_H_ */ # 62 "/usr/include/sys/_sigset.h" 3 4 # 41 "/usr/include/sys/select.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/sys/_timeval.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS__TIMEVAL_H_ #define _SYS__TIMEVAL_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/sys/_timeval.h" 3 4 # 35 "/usr/include/sys/_timeval.h" 3 4 #ifndef _SUSECONDS_T_DECLARED typedef __suseconds_t suseconds_t; #define _SUSECONDS_T_DECLARED #endif # 40 "/usr/include/sys/_timeval.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 45 "/usr/include/sys/_timeval.h" 3 4 /* * Structure returned by gettimeofday(2) system call, and used in other calls. */ struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* and microseconds */ }; #endif /* !_SYS__TIMEVAL_H_ */ # 55 "/usr/include/sys/_timeval.h" 3 4 # 42 "/usr/include/sys/select.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/sys/timespec.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp * $FreeBSD$ */ #ifndef _SYS_TIMESPEC_H_ #define _SYS_TIMESPEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/timespec.h" 3 4 # 40 "/usr/include/sys/timespec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/timespec.h" 3 4 # 1 "/usr/include/sys/_timespec.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp * $FreeBSD$ */ #ifndef _SYS__TIMESPEC_H_ #define _SYS__TIMESPEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/_timespec.h" 3 4 # 40 "/usr/include/sys/_timespec.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 45 "/usr/include/sys/_timespec.h" 3 4 struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; #endif /* !_SYS__TIMESPEC_H_ */ # 52 "/usr/include/sys/_timespec.h" 3 4 # 41 "/usr/include/sys/timespec.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 43 "/usr/include/sys/timespec.h" 3 4 #define TIMEVAL_TO_TIMESPEC(tv, ts) \ do { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } while (0) #define TIMESPEC_TO_TIMEVAL(tv, ts) \ do { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } while (0) #endif /* __BSD_VISIBLE */ # 55 "/usr/include/sys/timespec.h" 3 4 /* * Structure defined by POSIX.1b to be like a itimerval, but with * timespecs. Used in the timer_*() system calls. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; #endif /* _SYS_TIMESPEC_H_ */ # 66 "/usr/include/sys/timespec.h" 3 4 # 43 "/usr/include/sys/select.h" 2 3 4 typedef unsigned long __fd_mask; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/include/sys/select.h" 3 4 typedef __fd_mask fd_mask; #endif # 48 "/usr/include/sys/select.h" 3 4 #ifndef _SIGSET_T_DECLARED #define _SIGSET_T_DECLARED typedef __sigset_t sigset_t; #endif # 53 "/usr/include/sys/select.h" 3 4 /* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). * FD_SETSIZE may be defined by the user, but the default here should * be enough for most uses. */ #ifndef FD_SETSIZE #define FD_SETSIZE 1024 #endif # 63 "/usr/include/sys/select.h" 3 4 #define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/usr/include/sys/select.h" 3 4 #define NFDBITS _NFDBITS #endif # 68 "/usr/include/sys/select.h" 3 4 #ifndef _howmany #define _howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif # 72 "/usr/include/sys/select.h" 3 4 typedef struct fd_set { __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; } fd_set; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 77 "/usr/include/sys/select.h" 3 4 #define fds_bits __fds_bits #endif # 79 "/usr/include/sys/select.h" 3 4 #define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) #define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/sys/select.h" 3 4 #define FD_COPY(f, t) (void)(*(t) = *(f)) #endif # 85 "/usr/include/sys/select.h" 3 4 #define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) #define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) #define FD_ZERO(p) do { \ fd_set *_p; \ __size_t _n; \ \ _p = (p); \ _n = _howmany(FD_SETSIZE, _NFDBITS); \ while (_n > 0) \ _p->__fds_bits[--_n] = 0; \ } while (0) #ifndef _KERNEL __BEGIN_DECLS int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, const struct timespec *__restrict, const sigset_t *__restrict); #ifndef _SELECT_DECLARED #define _SELECT_DECLARED /* XXX missing restrict type-qualifier */ int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); #endif # 107 "/usr/include/sys/select.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 109 "/usr/include/sys/select.h" 3 4 #endif /* _SYS_SELECT_H_ */ # 111 "/usr/include/sys/select.h" 3 4 # 379 "/usr/include/sys/types.h" 2 3 4 /* * The major and minor numbers are encoded in dev_t as MMMmmmMm (where * letters correspond to bytes). The encoding of the lower 4 bytes is * constrained by compatibility with 16-bit and 32-bit dev_t's. The * encoding of of the upper 4 bytes is the least unnatural one consistent * with this and other constraints. Also, the decoding of the m bytes by * minor() is unnatural to maximize compatibility subject to not discarding * bits. The upper m byte is shifted into the position of the lower M byte * instead of shifting 3 upper m bytes to close the gap. Compatibility for * minor() is achieved iff the upper m byte is 0. */ #define major(d) __major(d) static __inline int __major(dev_t _d) { return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); } #define minor(d) __minor(d) static __inline int __minor(dev_t _d) { return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); } #define makedev(M, m) __makedev((M), (m)) static __inline dev_t __makedev(int _Major, int _Minor) { return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); } /* * These declarations belong elsewhere, but are repeated here and in * to give broken programs a better chance of working with * 64-bit off_t's. */ #ifndef _KERNEL __BEGIN_DECLS #ifndef _FTRUNCATE_DECLARED #define _FTRUNCATE_DECLARED int ftruncate(int, off_t); #endif # 422 "/usr/include/sys/types.h" 3 4 #ifndef _LSEEK_DECLARED #define _LSEEK_DECLARED off_t lseek(int, off_t, int); #endif # 426 "/usr/include/sys/types.h" 3 4 #ifndef _MMAP_DECLARED #define _MMAP_DECLARED void * mmap(void *, size_t, int, int, int, off_t); #endif # 430 "/usr/include/sys/types.h" 3 4 #ifndef _TRUNCATE_DECLARED #define _TRUNCATE_DECLARED int truncate(const char *, off_t); #endif # 434 "/usr/include/sys/types.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 436 "/usr/include/sys/types.h" 3 4 #endif /* __BSD_VISIBLE */ # 438 "/usr/include/sys/types.h" 3 4 #endif /* !_SYS_TYPES_H_ */ # 440 "/usr/include/sys/types.h" 3 4 # 43 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "../../../dist/public/nss/secport.h" # 1 "/usr/include/ctype.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ctype.h 8.4 (Berkeley) 1/21/94 * $FreeBSD$ */ #ifndef _CTYPE_H_ #define _CTYPE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/ctype.h" 3 4 # 47 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/ctype.h" 3 4 # 48 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <_ctype.h> #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/_ctype.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * From @(#)ctype.h 8.4 (Berkeley) 1/21/94 * From FreeBSD: src/include/ctype.h,v 1.27 2004/06/23 07:11:39 tjr Exp * $FreeBSD$ */ #ifndef __CTYPE_H_ #define __CTYPE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/_ctype.h" 3 4 # 48 "/usr/include/_ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/_ctype.h" 3 4 # 49 "/usr/include/_ctype.h" 3 4 #define _CTYPE_A 0x00000100L /* Alpha */ #define _CTYPE_C 0x00000200L /* Control */ #define _CTYPE_D 0x00000400L /* Digit */ #define _CTYPE_G 0x00000800L /* Graph */ #define _CTYPE_L 0x00001000L /* Lower */ #define _CTYPE_P 0x00002000L /* Punct */ #define _CTYPE_S 0x00004000L /* Space */ #define _CTYPE_U 0x00008000L /* Upper */ #define _CTYPE_X 0x00010000L /* X digit */ #define _CTYPE_B 0x00020000L /* Blank */ #define _CTYPE_R 0x00040000L /* Print */ #define _CTYPE_I 0x00080000L /* Ideogram */ #define _CTYPE_T 0x00100000L /* Special */ #define _CTYPE_Q 0x00200000L /* Phonogram */ #define _CTYPE_N 0x00400000L /* Number (superset of digit) */ #define _CTYPE_SW0 0x20000000L /* 0 width character */ #define _CTYPE_SW1 0x40000000L /* 1 width character */ #define _CTYPE_SW2 0x80000000L /* 2 width character */ #define _CTYPE_SW3 0xc0000000L /* 3 width character */ #define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ #define _CTYPE_SWS 30 /* Bits to shift to get width */ /* See comments in about __ct_rune_t. */ __BEGIN_DECLS unsigned long ___runetype(__ct_rune_t) __pure; __ct_rune_t ___tolower(__ct_rune_t) __pure; __ct_rune_t ___toupper(__ct_rune_t) __pure; __END_DECLS /* * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us * to generate code for extern versions of all our inline functions. */ #ifdef _EXTERNALIZE_CTYPE_INLINES_ #define _USE_CTYPE_INLINE_ #define static #define __inline #endif # 88 "/usr/include/_ctype.h" 3 4 extern int __mb_sb_limit; /* * Use inline functions if we are allowed to and the compiler supports them. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_DONT_USE_CTYPE_INLINE_) && \ (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 96 "/usr/include/_ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 97 "/usr/include/_ctype.h" 3 4 # 1 "/usr/include/runetype.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Paul Borman at Krystal Technologies. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)runetype.h 8.1 (Berkeley) 6/2/93 * $FreeBSD$ */ #ifndef _RUNETYPE_H_ #define _RUNETYPE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/runetype.h" 3 4 # 42 "/usr/include/runetype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/runetype.h" 3 4 # 43 "/usr/include/runetype.h" 3 4 #define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ #define _CRMASK (~(_CACHED_RUNES - 1)) /* * The lower 8 bits of runetype[] contain the digit value of the rune. */ typedef struct { __rune_t __min; /* First rune of the range */ __rune_t __max; /* Last rune (inclusive) of the range */ __rune_t __map; /* What first maps to in maps */ unsigned long *__types; /* Array of types in range */ } _RuneEntry; typedef struct { int __nranges; /* Number of ranges stored */ _RuneEntry *__ranges; /* Pointer to the ranges */ } _RuneRange; typedef struct { char __magic[8]; /* Magic saying what version we are */ char __encoding[32]; /* ASCII name of this encoding */ __rune_t (*__sgetrune)(const char *, __size_t, char const **); int (*__sputrune)(__rune_t, char *, __size_t, char **); __rune_t __invalid_rune; unsigned long __runetype[_CACHED_RUNES]; __rune_t __maplower[_CACHED_RUNES]; __rune_t __mapupper[_CACHED_RUNES]; /* * The following are to deal with Runes larger than _CACHED_RUNES - 1. * Their data is actually contiguous with this structure so as to make * it easier to read/write from/to disk. */ _RuneRange __runetype_ext; _RuneRange __maplower_ext; _RuneRange __mapupper_ext; void *__variable; /* Data which depends on the encoding */ int __variable_len; /* how long that data is */ } _RuneLocale; #define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ __BEGIN_DECLS extern const _RuneLocale _DefaultRuneLocale; extern const _RuneLocale *_CurrentRuneLocale; #if 0 /* disabled by -frewrite-includes */ #if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/runetype.h" 3 4 extern const _RuneLocale *__getCurrentRuneLocale(void); #else # 94 "/usr/include/runetype.h" 3 4 extern _Thread_local const _RuneLocale *_ThreadRuneLocale; static __inline const _RuneLocale *__getCurrentRuneLocale(void) { if (_ThreadRuneLocale) return _ThreadRuneLocale; return _CurrentRuneLocale; } #endif /* __NO_TLS || __RUNETYPE_INTERNAL */ # 103 "/usr/include/runetype.h" 3 4 #define _CurrentRuneLocale (__getCurrentRuneLocale()) __END_DECLS #endif /* !_RUNETYPE_H_ */ # 107 "/usr/include/runetype.h" 3 4 # 98 "/usr/include/_ctype.h" 2 3 4 static __inline int __maskrune(__ct_rune_t _c, unsigned long _f) { return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) : _CurrentRuneLocale->__runetype[_c]) & _f; } static __inline int __sbmaskrune(__ct_rune_t _c, unsigned long _f) { return (_c < 0 || _c >= __mb_sb_limit) ? 0 : _CurrentRuneLocale->__runetype[_c] & _f; } static __inline int __istype(__ct_rune_t _c, unsigned long _f) { return (!!__maskrune(_c, _f)); } static __inline int __sbistype(__ct_rune_t _c, unsigned long _f) { return (!!__sbmaskrune(_c, _f)); } static __inline int __isctype(__ct_rune_t _c, unsigned long _f) { return (_c < 0 || _c >= 128) ? 0 : !!(_DefaultRuneLocale.__runetype[_c] & _f); } static __inline __ct_rune_t __toupper(__ct_rune_t _c) { return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) : _CurrentRuneLocale->__mapupper[_c]; } static __inline __ct_rune_t __sbtoupper(__ct_rune_t _c) { return (_c < 0 || _c >= __mb_sb_limit) ? _c : _CurrentRuneLocale->__mapupper[_c]; } static __inline __ct_rune_t __tolower(__ct_rune_t _c) { return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) : _CurrentRuneLocale->__maplower[_c]; } static __inline __ct_rune_t __sbtolower(__ct_rune_t _c) { return (_c < 0 || _c >= __mb_sb_limit) ? _c : _CurrentRuneLocale->__maplower[_c]; } static __inline int __wcwidth(__ct_rune_t _c) { unsigned int _x; if (_c == 0) return (0); _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R); if ((_x & _CTYPE_SWM) != 0) return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); return ((_x & _CTYPE_R) != 0 ? 1 : -1); } #else /* not using inlines */ # 174 "/usr/include/_ctype.h" 3 4 __BEGIN_DECLS int __maskrune(__ct_rune_t, unsigned long); int __sbmaskrune(__ct_rune_t, unsigned long); int __istype(__ct_rune_t, unsigned long); int __sbistype(__ct_rune_t, unsigned long); int __isctype(__ct_rune_t, unsigned long); __ct_rune_t __toupper(__ct_rune_t); __ct_rune_t __sbtoupper(__ct_rune_t); __ct_rune_t __tolower(__ct_rune_t); __ct_rune_t __sbtolower(__ct_rune_t); int __wcwidth(__ct_rune_t); __END_DECLS #endif /* using inlines */ # 188 "/usr/include/_ctype.h" 3 4 #endif /* !__CTYPE_H_ */ # 190 "/usr/include/_ctype.h" 3 4 # 49 "/usr/include/ctype.h" 2 3 4 __BEGIN_DECLS int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/usr/include/ctype.h" 3 4 int isascii(int); int toascii(int); #endif # 69 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 1999 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 71 "/usr/include/ctype.h" 3 4 int isblank(int); #endif # 73 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/ctype.h" 3 4 int digittoint(int); int ishexnumber(int); int isideogram(int); int isnumber(int); int isphonogram(int); int isrune(int); int isspecial(int); #endif # 83 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 85 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 85 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/xlocale/_ctype.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 The FreeBSD Foundation * All rights reserved. * * This software was developed by David Chisnall under sponsorship from * the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #if 0 /* disabled by -frewrite-includes */ #if (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 37 "/usr/include/xlocale/_ctype.h" 3 4 #ifdef _XLOCALE_WCTYPES #define _XLOCALE_WCTYPE_H #else # 41 "/usr/include/xlocale/_ctype.h" 3 4 #define _XLOCALE_CTYPE_H #endif # 43 "/usr/include/xlocale/_ctype.h" 3 4 #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 48 "/usr/include/xlocale/_ctype.h" 3 4 #ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED #define _XLOCALE_RUN_FUNCTIONS_DEFINED 1 unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure; __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure; __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure; _RuneLocale *__runes_for_locale(locale_t, int*); #endif # 56 "/usr/include/xlocale/_ctype.h" 3 4 #ifndef _XLOCALE_INLINE #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 59 "/usr/include/xlocale/_ctype.h" 3 4 /* GNU89 inline has nonstandard semantics. */ #define _XLOCALE_INLINE extern __inline #else # 62 "/usr/include/xlocale/_ctype.h" 3 4 /* Hack to work around people who define inline away */ #ifdef inline #define _XLOCALE_INLINE static __inline #else # 66 "/usr/include/xlocale/_ctype.h" 3 4 /* Define with C++ / C99 compatible semantics */ #define _XLOCALE_INLINE inline #endif # 69 "/usr/include/xlocale/_ctype.h" 3 4 #endif # 70 "/usr/include/xlocale/_ctype.h" 3 4 #endif /* _XLOCALE_INLINE */ # 71 "/usr/include/xlocale/_ctype.h" 3 4 #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; _RuneLocale *runes = __runes_for_locale(__loc, &__limit); return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : runes->__runetype[__c]) & __f; } _XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(fname, cat) \ _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\ _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ { return __istype_l(__c, cat, __l); } #else # 98 "/usr/include/xlocale/_ctype.h" 3 4 _XLOCALE_INLINE int __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; _RuneLocale *runes = __runes_for_locale(__loc, &__limit); return (__c < 0 || __c >= __limit) ? 0 : runes->__runetype[__c] & __f; } _XLOCALE_INLINE int __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__sbmaskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(__fname, __cat) \ _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ { return __sbistype_l(__c, __cat, __l); } #endif # 123 "/usr/include/xlocale/_ctype.h" 3 4 XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N) XLOCALE_ISCTYPE(alpha, _CTYPE_A) XLOCALE_ISCTYPE(blank, _CTYPE_B) XLOCALE_ISCTYPE(cntrl, _CTYPE_C) XLOCALE_ISCTYPE(digit, _CTYPE_D) XLOCALE_ISCTYPE(graph, _CTYPE_G) XLOCALE_ISCTYPE(hexnumber, _CTYPE_X) XLOCALE_ISCTYPE(ideogram, _CTYPE_I) XLOCALE_ISCTYPE(lower, _CTYPE_L) XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N) XLOCALE_ISCTYPE(phonogram, _CTYPE_Q) XLOCALE_ISCTYPE(print, _CTYPE_R) XLOCALE_ISCTYPE(punct, _CTYPE_P) XLOCALE_ISCTYPE(rune, 0xFFFFFF00L) XLOCALE_ISCTYPE(space, _CTYPE_S) XLOCALE_ISCTYPE(special, _CTYPE_T) XLOCALE_ISCTYPE(upper, _CTYPE_U) XLOCALE_ISCTYPE(xdigit, _CTYPE_X) #undef XLOCALE_ISCTYPE #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int towlower_l(int, locale_t); _XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t); _XLOCALE_INLINE int towupper_l(int, locale_t); _XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { int __limit; _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : __runes->__maplower[__c]; } _XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { int __limit; _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : __runes->__mapupper[__c]; } _XLOCALE_INLINE int __wcwidth_l(__ct_rune_t _c, locale_t __l) { unsigned int _x; if (_c == 0) return (0); _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l); if ((_x & _CTYPE_SWM) != 0) return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); return ((_x & _CTYPE_R) != 0 ? 1 : -1); } int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l); wctype_t wctype_l(const char *property, locale_t __l); wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l); wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l); wctrans_t wctrans_l(const char *__charclass, locale_t __l); #undef _XLOCALE_WCTYPES #else # 182 "/usr/include/xlocale/_ctype.h" 3 4 _XLOCALE_INLINE int digittoint_l(int, locale_t); _XLOCALE_INLINE int tolower_l(int, locale_t); _XLOCALE_INLINE int toupper_l(int, locale_t); _XLOCALE_INLINE int digittoint_l(int __c, locale_t __l) { return __sbmaskrune_l((__c), 0xFF, __l); } _XLOCALE_INLINE int tolower_l(int __c, locale_t __l) { int __limit; _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= __limit) ? __c : __runes->__maplower[__c]; } _XLOCALE_INLINE int toupper_l(int __c, locale_t __l) { int __limit; _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= __limit) ? __c : __runes->__mapupper[__c]; } #endif # 204 "/usr/include/xlocale/_ctype.h" 3 4 #endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */ # 206 "/usr/include/xlocale/_ctype.h" 3 4 # 86 "/usr/include/ctype.h" 2 3 4 #endif # 87 "/usr/include/ctype.h" 3 4 __END_DECLS #ifndef __cplusplus #define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D|_CTYPE_N) #define isalpha(c) __sbistype((c), _CTYPE_A) #define iscntrl(c) __sbistype((c), _CTYPE_C) #define isdigit(c) __sbistype((c), _CTYPE_D) #define isgraph(c) __sbistype((c), _CTYPE_G) #define islower(c) __sbistype((c), _CTYPE_L) #define isprint(c) __sbistype((c), _CTYPE_R) #define ispunct(c) __sbistype((c), _CTYPE_P) #define isspace(c) __sbistype((c), _CTYPE_S) #define isupper(c) __sbistype((c), _CTYPE_U) #define isxdigit(c) __sbistype((c), _CTYPE_X) #define tolower(c) __sbtolower(c) #define toupper(c) __sbtoupper(c) #endif /* !__cplusplus */ # 104 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 106 "/usr/include/ctype.h" 3 4 /* * POSIX.1-2001 specifies _tolower() and _toupper() to be macros equivalent to * tolower() and toupper() respectively, minus extra checking to ensure that * the argument is a lower or uppercase letter respectively. We've chosen to * implement these macros with the same error checking as tolower() and * toupper() since this doesn't violate the specification itself, only its * intent. We purposely leave _tolower() and _toupper() undocumented to * discourage their use. * * XXX isascii() and toascii() should similarly be undocumented. */ #define _tolower(c) __sbtolower(c) #define _toupper(c) __sbtoupper(c) #define isascii(c) (((c) & ~0x7F) == 0) #define toascii(c) ((c) & 0x7F) #endif # 122 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 1999 && !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 124 "/usr/include/ctype.h" 3 4 #define isblank(c) __sbistype((c), _CTYPE_B) #endif # 126 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 128 "/usr/include/ctype.h" 3 4 #define digittoint(c) __sbmaskrune((c), 0xFF) #define ishexnumber(c) __sbistype((c), _CTYPE_X) #define isideogram(c) __sbistype((c), _CTYPE_I) #define isnumber(c) __sbistype((c), _CTYPE_D|_CTYPE_N) #define isphonogram(c) __sbistype((c), _CTYPE_Q) #define isrune(c) __sbistype((c), 0xFFFFFF00L) #define isspecial(c) __sbistype((c), _CTYPE_T) #endif # 136 "/usr/include/ctype.h" 3 4 #endif /* !_CTYPE_H_ */ # 138 "/usr/include/ctype.h" 3 4 # 45 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "../../../dist/public/nss/secport.h" # 1 "/usr/include/string.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)string.h 8.1 (Berkeley) 6/2/93 * $FreeBSD$ */ #ifndef _STRING_H_ #define _STRING_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/string.h" 3 4 # 39 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/string.h" 3 4 # 40 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/string.h" 3 4 # 41 "/usr/include/string.h" 3 4 /* * Prototype functions which were historically defined in , but * are required by POSIX to be prototyped in . */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 47 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/string.h" 3 4 # 1 "/usr/include/strings.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _STRINGS_H_ #define _STRINGS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/strings.h" 3 4 # 35 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/strings.h" 3 4 # 36 "/usr/include/strings.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 41 "/usr/include/strings.h" 3 4 __BEGIN_DECLS #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/include/strings.h" 3 4 int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ void bcopy(const void *, void *, size_t); /* LEGACY */ void bzero(void *, size_t); /* LEGACY */ #endif # 48 "/usr/include/strings.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 49 "/usr/include/strings.h" 3 4 void explicit_bzero(void *, size_t); #endif # 51 "/usr/include/strings.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/include/strings.h" 3 4 int ffs(int) __pure2; #endif # 54 "/usr/include/strings.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 55 "/usr/include/strings.h" 3 4 int ffsl(long) __pure2; int ffsll(long long) __pure2; int fls(int) __pure2; int flsl(long) __pure2; int flsll(long long) __pure2; #endif # 61 "/usr/include/strings.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/include/strings.h" 3 4 char *index(const char *, int) __pure; /* LEGACY */ char *rindex(const char *, int) __pure; /* LEGACY */ #endif # 65 "/usr/include/strings.h" 3 4 int strcasecmp(const char *, const char *) __pure; int strncasecmp(const char *, const char *, size_t) __pure; #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 69 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 69 "/usr/include/strings.h" 3 4 # 1 "/usr/include/xlocale/_strings.h" 1 3 4 /*- * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 33 "/usr/include/xlocale/_strings.h" 3 4 /* * This file is included from both strings.h and xlocale.h. We need to expose * the declarations unconditionally if we are included from xlocale.h, but only * if we are in POSIX2008 mode if included from string.h. */ #ifndef _XLOCALE_STRINGS1_H #define _XLOCALE_STRINGS1_H /* * POSIX2008 functions */ int strcasecmp_l(const char *, const char *, locale_t); int strncasecmp_l(const char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRINGS1_H */ # 49 "/usr/include/xlocale/_strings.h" 3 4 # 70 "/usr/include/strings.h" 2 3 4 #endif # 71 "/usr/include/strings.h" 3 4 __END_DECLS #endif /* _STRINGS_H_ */ # 74 "/usr/include/strings.h" 3 4 # 48 "/usr/include/string.h" 2 3 4 #endif # 49 "/usr/include/string.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 54 "/usr/include/string.h" 3 4 __BEGIN_DECLS #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE >= 600 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/include/string.h" 3 4 void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif # 59 "/usr/include/string.h" 3 4 void *memchr(const void *, int, size_t) __pure; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/include/string.h" 3 4 void *memrchr(const void *, int, size_t) __pure; #endif # 63 "/usr/include/string.h" 3 4 int memcmp(const void *, const void *, size_t) __pure; void *memcpy(void * __restrict, const void * __restrict, size_t); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/usr/include/string.h" 3 4 void *memmem(const void *, size_t, const void *, size_t) __pure; #endif # 68 "/usr/include/string.h" 3 4 void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 71 "/usr/include/string.h" 3 4 char *stpcpy(char * __restrict, const char * __restrict); char *stpncpy(char * __restrict, const char * __restrict, size_t); #endif # 74 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/string.h" 3 4 char *strcasestr(const char *, const char *) __pure; #endif # 77 "/usr/include/string.h" 3 4 char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 80 "/usr/include/string.h" 3 4 char *strchrnul(const char*, int) __pure; #endif # 82 "/usr/include/string.h" 3 4 int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *) __pure; #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 87 "/usr/include/string.h" 3 4 char *strdup(const char *) __malloc_like; #endif # 89 "/usr/include/string.h" 3 4 char *strerror(int); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 91 "/usr/include/string.h" 3 4 int strerror_r(int, char *, size_t); #endif # 93 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 94 "/usr/include/string.h" 3 4 size_t strlcat(char * __restrict, const char * __restrict, size_t); size_t strlcpy(char * __restrict, const char * __restrict, size_t); #endif # 97 "/usr/include/string.h" 3 4 size_t strlen(const char *) __pure; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 99 "/usr/include/string.h" 3 4 void strmode(int, char *); #endif # 101 "/usr/include/string.h" 3 4 char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 105 "/usr/include/string.h" 3 4 char *strndup(const char *, size_t) __malloc_like; size_t strnlen(const char *, size_t) __pure; #endif # 108 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 109 "/usr/include/string.h" 3 4 char *strnstr(const char *, const char *, size_t) __pure; #endif # 111 "/usr/include/string.h" 3 4 char *strpbrk(const char *, const char *) __pure; char *strrchr(const char *, int) __pure; #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 114 "/usr/include/string.h" 3 4 char *strsep(char **, const char *); #endif # 116 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 117 "/usr/include/string.h" 3 4 char *strsignal(int); #endif # 119 "/usr/include/string.h" 3 4 size_t strspn(const char *, const char *) __pure; char *strstr(const char *, const char *) __pure; char *strtok(char * __restrict, const char * __restrict); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 123 "/usr/include/string.h" 3 4 char *strtok_r(char *, const char *, char **); #endif # 125 "/usr/include/string.h" 3 4 size_t strxfrm(char * __restrict, const char * __restrict, size_t); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 127 "/usr/include/string.h" 3 4 #ifndef _SWAB_DECLARED #define _SWAB_DECLARED #ifndef _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif /* _SIZE_T_DECLARED */ # 135 "/usr/include/string.h" 3 4 void swab(const void * __restrict, void * __restrict, ssize_t); #endif /* _SWAB_DECLARED */ # 138 "/usr/include/string.h" 3 4 int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ # 142 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 144 "/usr/include/string.h" 3 4 # 1 "/usr/include/xlocale/_string.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 35 "/usr/include/xlocale/_string.h" 3 4 /* * This file is included from both string.h and xlocale.h. We need to expose * the declarations unconditionally if we are included from xlocale.h, but only * if we are in POSIX2008 mode if included from string.h. */ #ifndef _XLOCALE_STRING1_H #define _XLOCALE_STRING1_H /* * POSIX2008 functions */ int strcoll_l(const char *, const char *, locale_t); size_t strxfrm_l(char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING1_H */ # 51 "/usr/include/xlocale/_string.h" 3 4 /* * xlocale extensions */ #ifdef _XLOCALE_H_ #ifndef _XLOCALE_STRING2_H #define _XLOCALE_STRING2_H char *strcasestr_l(const char *, const char *, locale_t); #endif /* _XLOCALE_STRING2_H */ # 61 "/usr/include/xlocale/_string.h" 3 4 #endif /* _XLOCALE_H_ */ # 62 "/usr/include/xlocale/_string.h" 3 4 # 145 "/usr/include/string.h" 2 3 4 #endif # 146 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __EXT1_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 148 "/usr/include/string.h" 3 4 #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif # 153 "/usr/include/string.h" 3 4 #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; #endif # 158 "/usr/include/string.h" 3 4 /* ISO/IEC 9899:2011 K.3.7.4.1.1 */ errno_t memset_s(void *, rsize_t, int, rsize_t); #endif /* __EXT1_VISIBLE */ # 162 "/usr/include/string.h" 3 4 __END_DECLS #endif /* _STRING_H_ */ # 165 "/usr/include/string.h" 3 4 # 46 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "../../../dist/public/nss/secport.h" # 47 "../../../dist/public/nss/secport.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "../../../dist/public/nss/secport.h" # 1 "/usr/include/stdlib.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 * $FreeBSD$ */ #ifndef _STDLIB_H_ #define _STDLIB_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/stdlib.h" 3 4 # 39 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/stdlib.h" 3 4 # 40 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/stdlib.h" 3 4 # 41 "/usr/include/stdlib.h" 3 4 __NULLABILITY_PRAGMA_PUSH #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 45 "/usr/include/stdlib.h" 3 4 #ifndef _RUNE_T_DECLARED typedef __rune_t rune_t; #define _RUNE_T_DECLARED #endif # 49 "/usr/include/stdlib.h" 3 4 #endif # 50 "/usr/include/stdlib.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 55 "/usr/include/stdlib.h" 3 4 #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif # 61 "/usr/include/stdlib.h" 3 4 #endif # 62 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; /* quotient */ int rem; /* remainder */ } div_t; typedef struct { long quot; long rem; } ldiv_t; #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 /* * I.e., INT_MAX; rand(3) returns a signed integer but must produce output in * the range [0, RAND_MAX], so half of the possible output range is unused. */ #define RAND_MAX 0x7fffffff __BEGIN_DECLS #ifdef _XLOCALE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 84 "/usr/include/stdlib.h" 3 4 # 85 "/usr/include/stdlib.h" 3 4 #endif # 86 "/usr/include/stdlib.h" 3 4 extern int __mb_cur_max; extern int ___mb_cur_max(void); #define MB_CUR_MAX ((size_t)___mb_cur_max()) _Noreturn void abort(void); int abs(int) __pure2; int atexit(void (* _Nonnull)(void)); double atof(const char *); int atoi(const char *); long atol(const char *); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void * _Nonnull, const void *)); void *calloc(size_t, size_t) __malloc_like __result_use_check __alloc_size2(1, 2); div_t div(int, int) __pure2; _Noreturn void exit(int); void free(void *); char *getenv(const char *); long labs(long) __pure2; ldiv_t ldiv(long, long) __pure2; void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); void qsort(void *, size_t, size_t, int (* _Nonnull)(const void *, const void *)); int rand(void); void *realloc(void *, size_t) __result_use_check __alloc_size(2); void srand(unsigned); double strtod(const char * __restrict, char ** __restrict); float strtof(const char * __restrict, char ** __restrict); long strtol(const char * __restrict, char ** __restrict, int); long double strtold(const char * __restrict, char ** __restrict); unsigned long strtoul(const char * __restrict, char ** __restrict, int); int system(const char *); int wctomb(char *, wchar_t); size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); /* * Functions added in C99 which we make conditionally available in the * BSD^C89 namespace if the compiler supports `long long'. * The #if test is more complicated than it ought to be because * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' * is not supported in the compilation environment (which therefore means * that it can't really be ISO C99). * * (The only other extension made by C99 in thie header is _Exit().) */ #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 137 "/usr/include/stdlib.h" 3 4 #ifdef __LONG_LONG_SUPPORTED /* LONGLONG */ typedef struct { long long quot; long long rem; } lldiv_t; /* LONGLONG */ long long atoll(const char *); /* LONGLONG */ long long llabs(long long) __pure2; /* LONGLONG */ lldiv_t lldiv(long long, long long) __pure2; /* LONGLONG */ long long strtoll(const char * __restrict, char ** __restrict, int); /* LONGLONG */ unsigned long long strtoull(const char * __restrict, char ** __restrict, int); #endif /* __LONG_LONG_SUPPORTED */ # 159 "/usr/include/stdlib.h" 3 4 _Noreturn void _Exit(int); #endif /* __ISO_C_VISIBLE >= 1999 */ # 162 "/usr/include/stdlib.h" 3 4 /* * If we're in a mode greater than C99, expose C11 functions. */ #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 167 "/usr/include/stdlib.h" 3 4 void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) __alloc_size(2); int at_quick_exit(void (*)(void)); _Noreturn void quick_exit(int); #endif /* __ISO_C_VISIBLE >= 2011 */ # 173 "/usr/include/stdlib.h" 3 4 /* * Extensions made by POSIX relative to C. */ #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 177 "/usr/include/stdlib.h" 3 4 char *realpath(const char * __restrict, char * __restrict); #endif # 179 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199506 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 180 "/usr/include/stdlib.h" 3 4 int rand_r(unsigned *); /* (TSF) */ #endif # 182 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 183 "/usr/include/stdlib.h" 3 4 int posix_memalign(void **, size_t, size_t); /* (ADV) */ int setenv(const char *, const char *, int); int unsetenv(const char *); #endif # 187 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 189 "/usr/include/stdlib.h" 3 4 int getsubopt(char **, char *const *, char **); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); #define _MKDTEMP_DECLARED #endif # 194 "/usr/include/stdlib.h" 3 4 #ifndef _MKSTEMP_DECLARED int mkstemp(char *); #define _MKSTEMP_DECLARED #endif # 198 "/usr/include/stdlib.h" 3 4 #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ # 199 "/usr/include/stdlib.h" 3 4 /* * The only changes to the XSI namespace in revision 6 were the deletion * of the ttyslot() and valloc() functions, which FreeBSD never declared * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which * FreeBSD also does not have, and mktemp(), are to be deleted. */ #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 207 "/usr/include/stdlib.h" 3 4 /* XXX XSI requires pollution from here. We'd rather not. */ long a64l(const char *); double drand48(void); /* char *ecvt(double, int, int * __restrict, int * __restrict); */ double erand48(unsigned short[3]); /* char *fcvt(double, int, int * __restrict, int * __restrict); */ /* char *gcvt(double, int, int * __restrict, int * __restrict); */ int grantpt(int); char *initstate(unsigned int, char *, size_t); long jrand48(unsigned short[3]); char *l64a(long); void lcong48(unsigned short[7]); long lrand48(void); #if 0 /* disabled by -frewrite-includes */ #if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 221 "/usr/include/stdlib.h" 3 4 char *mktemp(char *); #define _MKTEMP_DECLARED #endif # 224 "/usr/include/stdlib.h" 3 4 long mrand48(void); long nrand48(unsigned short[3]); int posix_openpt(int); char *ptsname(int); int putenv(char *); long random(void); unsigned short *seed48(unsigned short[3]); char *setstate(/* const */ char *); void srand48(long); void srandom(unsigned int); int unlockpt(int); #endif /* __XSI_VISIBLE */ # 237 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 239 "/usr/include/stdlib.h" 3 4 extern const char *malloc_conf; extern void (*malloc_message)(void *, const char *); /* * The alloca() function can't be implemented in C, and on some * platforms it can't be implemented at all as a callable function. * The GNU C compiler provides a built-in alloca() which we can use. * On platforms where alloca() is not in libc, programs which use it * will fail to link when compiled with non-GNU compilers. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC__ >= 2 || defined(__INTEL_COMPILER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 250 "/usr/include/stdlib.h" 3 4 #undef alloca /* some GNU bits try to get cute and define this on their own */ #define alloca(sz) __builtin_alloca(sz) #endif # 253 "/usr/include/stdlib.h" 3 4 void abort2(const char *, int, void **) __dead2; __uint32_t arc4random(void); void arc4random_buf(void *, size_t); __uint32_t arc4random_uniform(__uint32_t); #ifdef __BLOCKS__ int atexit_b(void (^ _Nonnull)(void)); void *bsearch_b(const void *, const void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); #endif # 266 "/usr/include/stdlib.h" 3 4 char *getbsize(int *, long *); /* getcap(3) functions */ char *cgetcap(char *, const char *, int); int cgetclose(void); int cgetent(char **, char **, const char *); int cgetfirst(char **, char **); int cgetmatch(const char *, const char *); int cgetnext(char **, char **); int cgetnum(char *, const char *, long *); int cgetset(const char *); int cgetstr(char *, const char *, char **); int cgetustr(char *, const char *, char **); int daemon(int, int); int daemonfd(int, int); char *devname(__dev_t, __mode_t); char *devname_r(__dev_t, __mode_t, char *, int); char *fdevname(int); char *fdevname_r(int, char *, int); int getloadavg(double [], int); const char * getprogname(void); int heapsort(void *, size_t, size_t, int (* _Nonnull)(const void *, const void *)); #ifdef __BLOCKS__ int heapsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); void qsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); #endif # 297 "/usr/include/stdlib.h" 3 4 int l64a_r(long, char *, int); int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); #ifdef __BLOCKS__ int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); #endif # 302 "/usr/include/stdlib.h" 3 4 int mkostemp(char *, int); int mkostemps(char *, int, int); int mkostempsat(int, char *, int, int); void qsort_r(void *, size_t, size_t, void *, int (*)(void *, const void *, const void *)); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size2(2, 3); void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); int sradixsort(const unsigned char **, int, const unsigned char *, unsigned); void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); /* Deprecated interfaces, to be removed. */ __int64_t strtoq(const char *, char **, int); __uint64_t strtouq(const char *, char **, int); extern char *suboptarg; /* getsubopt(3) external variable */ #endif /* __BSD_VISIBLE */ # 328 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __EXT1_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 330 "/usr/include/stdlib.h" 3 4 #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif # 335 "/usr/include/stdlib.h" 3 4 #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; #endif # 340 "/usr/include/stdlib.h" 3 4 /* K.3.6 */ typedef void (*constraint_handler_t)(const char * __restrict, void * __restrict, errno_t); /* K.3.6.1.1 */ constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); /* K.3.6.1.2 */ _Noreturn void abort_handler_s(const char * __restrict, void * __restrict, errno_t); /* K3.6.1.3 */ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); /* K.3.6.3.2 */ errno_t qsort_s(void *, rsize_t, rsize_t, int (*)(const void *, const void *, void *), void *); #endif /* __EXT1_VISIBLE */ # 355 "/usr/include/stdlib.h" 3 4 __END_DECLS __NULLABILITY_PRAGMA_POP #endif /* !_STDLIB_H_ */ # 360 "/usr/include/stdlib.h" 3 4 # 48 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "../../../dist/public/nss/secport.h" # 1 "/usr/include/stdint.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2001 Mike Barcroft * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS_STDINT_H_ #define _SYS_STDINT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/stdint.h" 3 4 # 35 "/usr/include/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/stdint.h" 3 4 # 36 "/usr/include/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/machine/_stdint.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 2001, 2002 Mike Barcroft * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE__STDINT_H_ #define _MACHINE__STDINT_H_ #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/include/machine/_stdint.h" 3 4 #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) #define UINT8_C(c) (c) #define UINT16_C(c) (c) #define UINT32_C(c) (c ## U) #ifdef __LP64__ #define INT64_C(c) (c ## L) #define UINT64_C(c) (c ## UL) #else # 59 "/usr/include/machine/_stdint.h" 3 4 #define INT64_C(c) (c ## LL) #define UINT64_C(c) (c ## ULL) #endif # 62 "/usr/include/machine/_stdint.h" 3 4 #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) #endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ # 67 "/usr/include/machine/_stdint.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 69 "/usr/include/machine/_stdint.h" 3 4 #ifndef __INT64_C #ifdef __LP64__ #define __INT64_C(c) (c ## L) #define __UINT64_C(c) (c ## UL) #else # 75 "/usr/include/machine/_stdint.h" 3 4 #define __INT64_C(c) (c ## LL) #define __UINT64_C(c) (c ## ULL) #endif # 78 "/usr/include/machine/_stdint.h" 3 4 #endif # 79 "/usr/include/machine/_stdint.h" 3 4 /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types */ /* Minimum values of exact-width signed integer types. */ #define INT8_MIN (-0x7f-1) #define INT16_MIN (-0x7fff-1) #define INT32_MIN (-0x7fffffff-1) #define INT64_MIN (-__INT64_C(0x7fffffffffffffff)-1) /* Maximum values of exact-width signed integer types. */ #define INT8_MAX 0x7f #define INT16_MAX 0x7fff #define INT32_MAX 0x7fffffff #define INT64_MAX __INT64_C(0x7fffffffffffffff) /* Maximum values of exact-width unsigned integer types. */ #define UINT8_MAX 0xff #define UINT16_MAX 0xffff #define UINT32_MAX 0xffffffff #define UINT64_MAX __UINT64_C(0xffffffffffffffff) /* * ISO/IEC 9899:1999 * 7.18.2.2 Limits of minimum-width integer types */ /* Minimum values of minimum-width signed integer types. */ #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST64_MIN INT64_MIN /* Maximum values of minimum-width signed integer types. */ #define INT_LEAST8_MAX INT8_MAX #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MAX INT32_MAX #define INT_LEAST64_MAX INT64_MAX /* Maximum values of minimum-width unsigned integer types. */ #define UINT_LEAST8_MAX UINT8_MAX #define UINT_LEAST16_MAX UINT16_MAX #define UINT_LEAST32_MAX UINT32_MAX #define UINT_LEAST64_MAX UINT64_MAX /* * ISO/IEC 9899:1999 * 7.18.2.3 Limits of fastest minimum-width integer types */ /* Minimum values of fastest minimum-width signed integer types. */ #define INT_FAST8_MIN INT32_MIN #define INT_FAST16_MIN INT32_MIN #define INT_FAST32_MIN INT32_MIN #define INT_FAST64_MIN INT64_MIN /* Maximum values of fastest minimum-width signed integer types. */ #define INT_FAST8_MAX INT32_MAX #define INT_FAST16_MAX INT32_MAX #define INT_FAST32_MAX INT32_MAX #define INT_FAST64_MAX INT64_MAX /* Maximum values of fastest minimum-width unsigned integer types. */ #define UINT_FAST8_MAX UINT32_MAX #define UINT_FAST16_MAX UINT32_MAX #define UINT_FAST32_MAX UINT32_MAX #define UINT_FAST64_MAX UINT64_MAX /* * ISO/IEC 9899:1999 * 7.18.2.4 Limits of integer types capable of holding object pointers */ #ifdef __LP64__ #define INTPTR_MIN INT64_MIN #define INTPTR_MAX INT64_MAX #define UINTPTR_MAX UINT64_MAX #else # 155 "/usr/include/machine/_stdint.h" 3 4 #define INTPTR_MIN INT32_MIN #define INTPTR_MAX INT32_MAX #define UINTPTR_MAX UINT32_MAX #endif # 159 "/usr/include/machine/_stdint.h" 3 4 /* * ISO/IEC 9899:1999 * 7.18.2.5 Limits of greatest-width integer types */ #define INTMAX_MIN INT64_MIN #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX /* * ISO/IEC 9899:1999 * 7.18.3 Limits of other integer types */ #ifdef __LP64__ /* Limits of ptrdiff_t. */ #define PTRDIFF_MIN INT64_MIN #define PTRDIFF_MAX INT64_MAX /* Limits of sig_atomic_t. */ #define SIG_ATOMIC_MIN INT64_MIN #define SIG_ATOMIC_MAX INT64_MAX /* Limit of size_t. */ #define SIZE_MAX UINT64_MAX #else # 184 "/usr/include/machine/_stdint.h" 3 4 /* Limits of ptrdiff_t. */ #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX /* Limits of sig_atomic_t. */ #define SIG_ATOMIC_MIN INT32_MIN #define SIG_ATOMIC_MAX INT32_MAX /* Limit of size_t. */ #define SIZE_MAX UINT32_MAX #endif # 195 "/usr/include/machine/_stdint.h" 3 4 /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX #endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ # 201 "/usr/include/machine/_stdint.h" 3 4 #endif /* !_MACHINE__STDINT_H_ */ # 203 "/usr/include/machine/_stdint.h" 3 4 # 38 "/usr/include/stdint.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/stdint.h" 3 4 # 39 "/usr/include/stdint.h" 3 4 typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; typedef __int_fast8_t int_fast8_t; typedef __int_fast16_t int_fast16_t; typedef __int_fast32_t int_fast32_t; typedef __int_fast64_t int_fast64_t; typedef __uint_fast8_t uint_fast8_t; typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; /* GNU and Darwin define this and people seem to think it's portable */ #if 0 /* disabled by -frewrite-includes */ #if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/include/stdint.h" 3 4 #define __WORDSIZE 64 #else # 64 "/usr/include/stdint.h" 3 4 #define __WORDSIZE 32 #endif # 66 "/usr/include/stdint.h" 3 4 /* Limits of wchar_t. */ #define WCHAR_MIN __WCHAR_MIN #define WCHAR_MAX __WCHAR_MAX #if 0 /* disabled by -frewrite-includes */ #if __EXT1_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 72 "/usr/include/stdint.h" 3 4 /* ISO/IEC 9899:2011 K.3.4.4 */ #ifndef RSIZE_MAX #define RSIZE_MAX (SIZE_MAX >> 1) #endif # 76 "/usr/include/stdint.h" 3 4 #endif /* __EXT1_VISIBLE */ # 77 "/usr/include/stdint.h" 3 4 #endif /* !_SYS_STDINT_H_ */ # 79 "/usr/include/stdint.h" 3 4 # 49 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 49 "../../../dist/public/nss/secport.h" # 50 "../../../dist/public/nss/secport.h" #if 0 /* expanded by -frewrite-includes */ #include "prlog.h" /* for PR_ASSERT */ #endif /* expanded by -frewrite-includes */ # 50 "../../../dist/public/nss/secport.h" # 1 "/usr/local/include/nspr/prlog.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef prlog_h___ #define prlog_h___ #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 9 "/usr/local/include/nspr/prlog.h" # 10 "/usr/local/include/nspr/prlog.h" PR_BEGIN_EXTERN_C /* ** prlog.h -- Declare interfaces to NSPR's Logging service ** ** NSPR provides a logging service that is used by NSPR itself and is ** available to client programs. ** ** To use the service from a client program, you should create a ** PRLogModuleInfo structure by calling PR_NewLogModule(). After ** creating the LogModule, you can write to the log using the PR_LOG() ** macro. ** ** Initialization of the log service is handled by NSPR initialization. ** ** At execution time, you must enable the log service. To enable the ** log service, set the environment variable: NSPR_LOG_MODULES ** variable. ** ** NSPR_LOG_MODULES variable has the form: ** ** :[, :]* ** ** Where: ** is the name passed to PR_NewLogModule(). ** is a numeric constant, e.g. 5. This value is the maximum ** value of a log event, enumerated by PRLogModuleLevel, that you want ** written to the log. ** ** For example: to record all events of greater value than or equal to ** PR_LOG_ERROR for a LogModule names "gizmo", say: ** ** set NSPR_LOG_MODULES=gizmo:2 ** ** Note that you must specify the numeric value of PR_LOG_ERROR. ** ** Special LogModule names are provided for controlling NSPR's log ** service at execution time. These controls should be set in the ** NSPR_LOG_MODULES environment variable at execution time to affect ** NSPR's log service for your application. ** ** The special LogModule "all" enables all LogModules. To enable all ** LogModule calls to PR_LOG(), say: ** ** set NSPR_LOG_MODULES=all:5 ** ** The special LogModule name "sync" tells the NSPR log service to do ** unbuffered logging. ** ** The special LogModule name "bufsize:" tells NSPR to set the ** log buffer to . ** ** The environment variable NSPR_LOG_FILE specifies the log file to use ** unless the default of "stderr" is acceptable. For MS Windows ** systems, NSPR_LOG_FILE can be set to a special value: "WinDebug" ** (case sensitive). This value causes PR_LOG() output to be written ** using the Windows API OutputDebugString(). OutputDebugString() ** writes to the debugger window; some people find this helpful. ** ** ** To put log messages in your programs, use the PR_LOG macro: ** ** PR_LOG(, , (, *)); ** ** Where is the address of a PRLogModuleInfo structure, and ** is one of the levels defined by the enumeration: ** PRLogModuleLevel. is a printf() style of argument list. That ** is: (fmtstring, ...). ** ** Example: ** ** main() { ** PRIntn one = 1; ** PRLogModuleInfo * myLm = PR_NewLogModule("gizmo"); ** PR_LOG( myLm, PR_LOG_ALWAYS, ("Log this! %d\n", one)); ** return; ** } ** ** Note the use of printf() style arguments as the third agrument(s) to ** PR_LOG(). ** ** After compiling and linking you application, set the environment: ** ** set NSPR_LOG_MODULES=gizmo:5 ** set NSPR_LOG_FILE=logfile.txt ** ** When you execute your application, the string "Log this! 1" will be ** written to the file "logfile.txt". ** ** Note to NSPR engineers: a number of PRLogModuleInfo structures are ** defined and initialized in prinit.c. See this module for ideas on ** what to log where. ** */ typedef enum PRLogModuleLevel { PR_LOG_NONE = 0, /* nothing */ PR_LOG_ALWAYS = 1, /* always printed */ PR_LOG_ERROR = 2, /* error messages */ PR_LOG_WARNING = 3, /* warning messages */ PR_LOG_DEBUG = 4, /* debug messages */ PR_LOG_NOTICE = PR_LOG_DEBUG, /* notice messages */ PR_LOG_WARN = PR_LOG_WARNING, /* warning messages */ PR_LOG_MIN = PR_LOG_DEBUG, /* minimal debugging messages */ PR_LOG_MAX = PR_LOG_DEBUG /* maximal debugging messages */ } PRLogModuleLevel; /* ** One of these structures is created for each module that uses logging. ** "name" is the name of the module ** "level" is the debugging level selected for that module */ typedef struct PRLogModuleInfo { const char *name; PRLogModuleLevel level; struct PRLogModuleInfo *next; } PRLogModuleInfo; /* ** Create a new log module. */ NSPR_API(PRLogModuleInfo*) PR_NewLogModule(const char *name); /* ** Set the file to use for logging. Returns PR_FALSE if the file cannot ** be created */ NSPR_API(PRBool) PR_SetLogFile(const char *name); /* ** Set the size of the logging buffer. If "buffer_size" is zero then the ** logging becomes "synchronous" (or unbuffered). */ NSPR_API(void) PR_SetLogBuffering(PRIntn buffer_size); /* ** Print a string to the log. "fmt" is a PR_snprintf format type. All ** messages printed to the log are preceeded by the name of the thread ** and a time stamp. Also, the routine provides a missing newline if one ** is not provided. */ NSPR_API(void) PR_LogPrint(const char *fmt, ...); /* ** Flush the log to its file. */ NSPR_API(void) PR_LogFlush(void); NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln) PR_PRETEND_NORETURN; #if 0 /* disabled by -frewrite-includes */ #if defined(DEBUG) || defined(FORCE_PR_LOG) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 164 "/usr/local/include/nspr/prlog.h" #define PR_LOGGING 1 #define PR_LOG_TEST(_module,_level) \ ((_module)->level >= (_level)) /* ** Log something. ** "module" is the address of a PRLogModuleInfo structure ** "level" is the desired logging level ** "args" is a variable length list of arguments to print, in the following ** format: ("printf style format string", ...) */ #define PR_LOG(_module,_level,_args) \ PR_BEGIN_MACRO \ if (PR_LOG_TEST(_module,_level)) { \ PR_LogPrint _args; \ } \ PR_END_MACRO #else /* defined(DEBUG) || defined(FORCE_PR_LOG) */ # 184 "/usr/local/include/nspr/prlog.h" #undef PR_LOGGING #define PR_LOG_TEST(module,level) 0 #define PR_LOG(module,level,args) #endif /* defined(DEBUG) || defined(FORCE_PR_LOG) */ # 190 "/usr/local/include/nspr/prlog.h" #ifndef NO_NSPR_10_SUPPORT #ifdef PR_LOGGING #define PR_LOG_BEGIN PR_LOG #define PR_LOG_END PR_LOG #define PR_LOG_DEFINE PR_NewLogModule #else # 198 "/usr/local/include/nspr/prlog.h" #define PR_LOG_BEGIN(module,level,args) #define PR_LOG_END(module,level,args) #define PR_LOG_DEFINE(_name) NULL #endif /* PR_LOGGING */ # 202 "/usr/local/include/nspr/prlog.h" #endif /* NO_NSPR_10_SUPPORT */ # 204 "/usr/local/include/nspr/prlog.h" #if 0 /* disabled by -frewrite-includes */ #if defined(DEBUG) || defined(FORCE_PR_ASSERT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 206 "/usr/local/include/nspr/prlog.h" #define PR_ASSERT(_expr) \ ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__)) #define PR_ASSERT_ARG(_expr) PR_ASSERT(_expr) #define PR_NOT_REACHED(_reasonStr) \ PR_Assert(_reasonStr,__FILE__,__LINE__) #else # 216 "/usr/local/include/nspr/prlog.h" #define PR_ASSERT(expr) ((void) 0) /* PR_ASSERT_ARG avoids compiler warning: unused variable */ #define PR_ASSERT_ARG(expr) ((void)(0 && (expr))) #define PR_NOT_REACHED(reasonStr) #endif /* defined(DEBUG) || defined(FORCE_PR_ASSERT) */ # 223 "/usr/local/include/nspr/prlog.h" PR_END_EXTERN_C #endif /* prlog_h___ */ # 227 "/usr/local/include/nspr/prlog.h" # 51 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "plarena.h" #endif /* expanded by -frewrite-includes */ # 51 "../../../dist/public/nss/secport.h" # 1 "/usr/local/include/nspr/plarena.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef plarena_h___ #define plarena_h___ /* * Lifetime-based fast allocation, inspired by much prior art, including * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" * David R. Hanson, Software -- Practice and Experience, Vol. 20(1). * * Also supports LIFO allocation (PL_ARENA_MARK/PL_ARENA_RELEASE). */ #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 15 "/usr/local/include/nspr/plarena.h" # 16 "/usr/local/include/nspr/plarena.h" PR_BEGIN_EXTERN_C typedef struct PLArena PLArena; struct PLArena { PLArena *next; /* next arena for this lifetime */ PRUword base; /* aligned base address, follows this header */ PRUword limit; /* one beyond last byte in arena */ PRUword avail; /* points to next available byte */ }; #ifdef PL_ARENAMETER typedef struct PLArenaStats PLArenaStats; struct PLArenaStats { PLArenaStats *next; /* next in arenaStats list */ char *name; /* name for debugging */ PRUint32 narenas; /* number of arenas in pool */ PRUint32 nallocs; /* number of PL_ARENA_ALLOCATE() calls */ PRUint32 nreclaims; /* number of reclaims from freeArenas */ PRUint32 nmallocs; /* number of malloc() calls */ PRUint32 ndeallocs; /* number of lifetime deallocations */ PRUint32 ngrows; /* number of PL_ARENA_GROW() calls */ PRUint32 ninplace; /* number of in-place growths */ PRUint32 nreleases; /* number of PL_ARENA_RELEASE() calls */ PRUint32 nfastrels; /* number of "fast path" releases */ PRUint32 nbytes; /* total bytes allocated */ PRUint32 maxalloc; /* maximum allocation size in bytes */ PRFloat64 variance; /* size variance accumulator */ }; #endif # 48 "/usr/local/include/nspr/plarena.h" typedef struct PLArenaPool PLArenaPool; struct PLArenaPool { PLArena first; /* first arena in pool list */ PLArena *current; /* arena from which to allocate space */ PRUint32 arenasize; /* net exact size of a new arena */ PRUword mask; /* alignment mask (power-of-2 - 1) */ #ifdef PL_ARENAMETER PLArenaStats stats; #endif # 59 "/usr/local/include/nspr/plarena.h" }; /* * WARNING: The PL_MAKE_MEM_ macros are for internal use by NSPR. Do NOT use * them in your code. * * NOTE: Valgrind support to be added. * * The PL_MAKE_MEM_ macros are modeled after the MOZ_MAKE_MEM_ macros in * Mozilla's mfbt/MemoryChecking.h. Only AddressSanitizer is supported now. * * Provides a common interface to the ASan (AddressSanitizer) and Valgrind * functions used to mark memory in certain ways. In detail, the following * three macros are provided: * * PL_MAKE_MEM_NOACCESS - Mark memory as unsafe to access (e.g. freed) * PL_MAKE_MEM_UNDEFINED - Mark memory as accessible, with content undefined * PL_MAKE_MEM_DEFINED - Mark memory as accessible, with content defined * * With Valgrind in use, these directly map to the three respective Valgrind * macros. With ASan in use, the NOACCESS macro maps to poisoning the memory, * while the UNDEFINED/DEFINED macros unpoison memory. * * With no memory checker available, all macros expand to the empty statement. */ /* WARNING: PL_SANITIZE_ADDRESS is for internal use by this header. Do NOT * define or test this macro in your code. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__has_feature) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 89 "/usr/local/include/nspr/plarena.h" #if 0 /* disabled by -frewrite-includes */ #if __has_feature(address_sanitizer) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 90 "/usr/local/include/nspr/plarena.h" #define PL_SANITIZE_ADDRESS 1 #endif # 92 "/usr/local/include/nspr/plarena.h" #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__SANITIZE_ADDRESS__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 93 "/usr/local/include/nspr/plarena.h" #define PL_SANITIZE_ADDRESS 1 #endif # 95 "/usr/local/include/nspr/plarena.h" #if 0 /* disabled by -frewrite-includes */ #if defined(PL_SANITIZE_ADDRESS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 97 "/usr/local/include/nspr/plarena.h" #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 99 "/usr/local/include/nspr/plarena.h" /* We can't use dllimport due to DLL linkage mismatch with * sanitizer/asan_interface.h. */ #define PL_ASAN_VISIBILITY(type_) type_ #else # 104 "/usr/local/include/nspr/plarena.h" #define PL_ASAN_VISIBILITY(type_) PR_IMPORT(type_) #endif # 106 "/usr/local/include/nspr/plarena.h" /* These definitions are usually provided through the * sanitizer/asan_interface.h header installed by ASan. * See https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */ PL_ASAN_VISIBILITY(void) __asan_poison_memory_region( void const volatile *addr, size_t size); PL_ASAN_VISIBILITY(void) __asan_unpoison_memory_region( void const volatile *addr, size_t size); #define PL_MAKE_MEM_NOACCESS(addr, size) \ __asan_poison_memory_region((addr), (size)) #define PL_MAKE_MEM_UNDEFINED(addr, size) \ __asan_unpoison_memory_region((addr), (size)) #define PL_MAKE_MEM_DEFINED(addr, size) \ __asan_unpoison_memory_region((addr), (size)) #else # 127 "/usr/local/include/nspr/plarena.h" #define PL_MAKE_MEM_NOACCESS(addr, size) #define PL_MAKE_MEM_UNDEFINED(addr, size) #define PL_MAKE_MEM_DEFINED(addr, size) #endif # 133 "/usr/local/include/nspr/plarena.h" /* * If the including .c file uses only one power-of-2 alignment, it may define * PL_ARENA_CONST_ALIGN_MASK to the alignment mask and save a few instructions * per ALLOCATE and GROW. */ #ifdef PL_ARENA_CONST_ALIGN_MASK #define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + PL_ARENA_CONST_ALIGN_MASK) \ & ~PL_ARENA_CONST_ALIGN_MASK) #define PL_INIT_ARENA_POOL(pool, name, size) \ PL_InitArenaPool(pool, name, size, PL_ARENA_CONST_ALIGN_MASK + 1) #else # 146 "/usr/local/include/nspr/plarena.h" #define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask) #endif # 148 "/usr/local/include/nspr/plarena.h" #define PL_ARENA_ALLOCATE(p, pool, nb) \ PR_BEGIN_MACRO \ PLArena *_a = (pool)->current; \ PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \ PRUword _p = _a->avail; \ if (_nb < (PRUint32)nb) { \ _p = 0; \ } else if (_nb > (_a->limit - _a->avail)) { \ _p = (PRUword)PL_ArenaAllocate(pool, _nb); \ } else { \ _a->avail += _nb; \ } \ p = (void *)_p; \ if (p) { \ PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \ PL_ArenaCountAllocation(pool, (PRUint32)nb); \ } \ PR_END_MACRO #define PL_ARENA_GROW(p, pool, size, incr) \ PR_BEGIN_MACRO \ PLArena *_a = (pool)->current; \ PRUint32 _incr = PL_ARENA_ALIGN(pool, (PRUint32)incr); \ if (_incr < (PRUint32)incr) { \ p = NULL; \ } else if (_a->avail == (PRUword)(p) + PL_ARENA_ALIGN(pool, size) && \ _incr <= (_a->limit - _a->avail)) { \ PL_MAKE_MEM_UNDEFINED((unsigned char *)(p) + size, (PRUint32)incr); \ _a->avail += _incr; \ PL_ArenaCountInplaceGrowth(pool, size, (PRUint32)incr); \ } else { \ p = PL_ArenaGrow(pool, p, size, (PRUint32)incr); \ } \ if (p) {\ PL_ArenaCountGrowth(pool, size, (PRUint32)incr); \ } \ PR_END_MACRO #define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail) #define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q)) #define PL_CLEAR_UNUSED_PATTERN(a, pattern) \ PR_BEGIN_MACRO \ PR_ASSERT((a)->avail <= (a)->limit); \ PL_MAKE_MEM_UNDEFINED((void*)(a)->avail, (a)->limit - (a)->avail); \ memset((void*)(a)->avail, (pattern), (a)->limit - (a)->avail); \ PR_END_MACRO #ifdef DEBUG #define PL_FREE_PATTERN 0xDA #define PL_CLEAR_UNUSED(a) PL_CLEAR_UNUSED_PATTERN((a), PL_FREE_PATTERN) #define PL_CLEAR_ARENA(a) \ PR_BEGIN_MACRO \ PL_MAKE_MEM_UNDEFINED((void*)(a), (a)->limit - (PRUword)(a)); \ memset((void*)(a), PL_FREE_PATTERN, (a)->limit - (PRUword)(a)); \ PR_END_MACRO #else # 205 "/usr/local/include/nspr/plarena.h" #define PL_CLEAR_UNUSED(a) #define PL_CLEAR_ARENA(a) #endif # 208 "/usr/local/include/nspr/plarena.h" #define PL_ARENA_RELEASE(pool, mark) \ PR_BEGIN_MACRO \ char *_m = (char *)(mark); \ PLArena *_a = (pool)->current; \ if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \ _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \ PL_CLEAR_UNUSED(_a); \ PL_MAKE_MEM_NOACCESS((void*)_a->avail, _a->limit - _a->avail); \ PL_ArenaCountRetract(pool, _m); \ } else { \ PL_ArenaRelease(pool, _m); \ } \ PL_ArenaCountRelease(pool, _m); \ PR_END_MACRO #ifdef PL_ARENAMETER #define PL_COUNT_ARENA(pool,op) ((pool)->stats.narenas op) #else # 227 "/usr/local/include/nspr/plarena.h" #define PL_COUNT_ARENA(pool,op) #endif # 229 "/usr/local/include/nspr/plarena.h" #define PL_ARENA_DESTROY(pool, a, pnext) \ PR_BEGIN_MACRO \ PL_COUNT_ARENA(pool,--); \ if ((pool)->current == (a)) (pool)->current = &(pool)->first; \ *(pnext) = (a)->next; \ PL_CLEAR_ARENA(a); \ free(a); \ (a) = 0; \ PR_END_MACRO /* ** Initialize an arena pool with the given name for debugging and metering, ** with a minimum gross size per arena of size bytes. The net size per arena ** is smaller than the gross size by a header of four pointers plus any ** necessary padding for alignment. ** ** Note: choose a gross size that's a power of two to avoid the heap allocator ** rounding the size up. **/ PR_EXTERN(void) PL_InitArenaPool( PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align); /* ** Finish using arenas, freeing all memory associated with them. ** NOTE: this function is now a no-op. If you want to free a single ** PLArenaPoolUse use PL_FreeArenaPool() or PL_FinishArenaPool(). **/ PR_EXTERN(void) PL_ArenaFinish(void); /* ** Free the arenas in pool. The user may continue to allocate from pool ** after calling this function. There is no need to call PL_InitArenaPool() ** again unless PL_FinishArenaPool(pool) has been called. **/ PR_EXTERN(void) PL_FreeArenaPool(PLArenaPool *pool); /* ** Free the arenas in pool and finish using it altogether. **/ PR_EXTERN(void) PL_FinishArenaPool(PLArenaPool *pool); /* ** Compact all of the arenas in a pool so that no space is wasted. ** NOT IMPLEMENTED. Do not use. **/ PR_EXTERN(void) PL_CompactArenaPool(PLArenaPool *pool); /* ** Friend functions used by the PL_ARENA_*() macros. ** ** WARNING: do not call these functions directly. Always use the ** PL_ARENA_*() macros. **/ PR_EXTERN(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb); PR_EXTERN(void *) PL_ArenaGrow( PLArenaPool *pool, void *p, PRUint32 size, PRUint32 incr); PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark); /* ** memset contents of all arenas in pool to pattern */ PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern); /* ** A function like malloc_size() or malloc_usable_size() that measures the ** size of a heap block. */ typedef size_t (*PLMallocSizeFn)(const void *ptr); /* ** Measure all memory used by a PLArenaPool, excluding the PLArenaPool ** structure. */ PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool( const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf); #ifdef PL_ARENAMETER #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 310 "/usr/local/include/nspr/plarena.h" # 311 "/usr/local/include/nspr/plarena.h" PR_EXTERN(void) PL_ArenaCountAllocation(PLArenaPool *pool, PRUint32 nb); PR_EXTERN(void) PL_ArenaCountInplaceGrowth( PLArenaPool *pool, PRUint32 size, PRUint32 incr); PR_EXTERN(void) PL_ArenaCountGrowth( PLArenaPool *pool, PRUint32 size, PRUint32 incr); PR_EXTERN(void) PL_ArenaCountRelease(PLArenaPool *pool, char *mark); PR_EXTERN(void) PL_ArenaCountRetract(PLArenaPool *pool, char *mark); PR_EXTERN(void) PL_DumpArenaStats(FILE *fp); #else /* !PL_ARENAMETER */ # 327 "/usr/local/include/nspr/plarena.h" #define PL_ArenaCountAllocation(ap, nb) /* nothing */ #define PL_ArenaCountInplaceGrowth(ap, size, incr) /* nothing */ #define PL_ArenaCountGrowth(ap, size, incr) /* nothing */ #define PL_ArenaCountRelease(ap, mark) /* nothing */ #define PL_ArenaCountRetract(ap, mark) /* nothing */ #endif /* !PL_ARENAMETER */ # 335 "/usr/local/include/nspr/plarena.h" PR_END_EXTERN_C #endif /* plarena_h___ */ # 339 "/usr/local/include/nspr/plarena.h" # 52 "../../../dist/public/nss/secport.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "plstr.h" #endif /* expanded by -frewrite-includes */ # 52 "../../../dist/public/nss/secport.h" # 1 "/usr/local/include/nspr/plstr.h" 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _plstr_h #define _plstr_h /* * plstr.h * * This header file exports the API to the NSPR portable library or string- * handling functions. * * This API was not designed as an "optimal" or "ideal" string library; it * was based on the good ol' unix string.3 functions, and was written to * * 1) replace the libc functions, for cross-platform consistency, * 2) complete the API on platforms lacking common functions (e.g., * strcase*), and * 3) to implement some obvious "closure" functions that I've seen * people hacking around in our code. * * Point number three largely means that most functions have an "strn" * limited-length version, and all comparison routines have a non-case- * sensitive version available. */ #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 29 "/usr/local/include/nspr/plstr.h" # 30 "/usr/local/include/nspr/plstr.h" PR_BEGIN_EXTERN_C /* * PL_strlen * * Returns the length of the provided string, not including the trailing '\0'. */ PR_EXTERN(PRUint32) PL_strlen(const char *str); /* * PL_strnlen * * Returns the length of the provided string, not including the trailing '\0', * up to the indicated maximum. The string will not be examined beyond the * maximum; if no terminating '\0' is found, the maximum will be returned. */ PR_EXTERN(PRUint32) PL_strnlen(const char *str, PRUint32 max); /* * PL_strcpy * * Copies the source string, up to and including the trailing '\0', into the * destination buffer. It does not (can not) verify that the destination * buffer is large enough. It returns the "dest" argument. */ PR_EXTERN(char *) PL_strcpy(char *dest, const char *src); /* * PL_strncpy * * Copies the source string into the destination buffer, up to and including * the trailing '\0' or up to and including the max'th character, whichever * comes first. It does not (can not) verify that the destination buffer is * large enough. If the source string is longer than the maximum length, * the result will *not* be null-terminated (JLRU). */ PR_EXTERN(char *) PL_strncpy(char *dest, const char *src, PRUint32 max); /* * PL_strncpyz * * Copies the source string into the destination buffer, up to and including * the trailing '\0' or up but not including the max'th character, whichever * comes first. It does not (can not) verify that the destination buffer is * large enough. The destination string is always terminated with a '\0', * unlike the traditional libc implementation. It returns the "dest" argument. * * NOTE: If you call this with a source "abcdefg" and a max of 5, the * destination will end up with "abcd\0" (i.e., its strlen length will be 4)! * * This means you can do this: * * char buffer[ SOME_SIZE ]; * PL_strncpyz(buffer, src, sizeof(buffer)); * * and the result will be properly terminated. */ PR_EXTERN(char *) PL_strncpyz(char *dest, const char *src, PRUint32 max); /* * PL_strdup * * Returns a pointer to a malloc'd extent of memory containing a duplicate * of the argument string. The size of the allocated extent is one greater * than the length of the argument string, because of the terminator. A * null argument, like a zero-length argument, will result in a pointer to * a one-byte extent containing the null value. This routine returns null * upon malloc failure. */ PR_EXTERN(char *) PL_strdup(const char *s); /* * PL_strfree * * Free memory allocated by PL_strdup */ PR_EXTERN(void) PL_strfree(char *s); /* * PL_strndup * * Returns a pointer to a malloc'd extent of memory containing a duplicate * of the argument string, up to the maximum specified. If the argument * string has a length greater than the value of the specified maximum, the * return value will be a pointer to an extent of memory of length one * greater than the maximum specified. A null string, a zero-length string, * or a zero maximum will all result in a pointer to a one-byte extent * containing the null value. This routine returns null upon malloc failure. */ PR_EXTERN(char *) PL_strndup(const char *s, PRUint32 max); /* * PL_strcat * * Appends a copy of the string pointed to by the second argument to the * end of the string pointed to by the first. The destination buffer is * not (can not be) checked for sufficient size. A null destination * argument returns null; otherwise, the first argument is returned. */ PR_EXTERN(char *) PL_strcat(char *dst, const char *src); /* * PL_strncat * * Appends a copy of the string pointed to by the second argument, up to * the maximum size specified, to the end of the string pointed to by the * first. The destination buffer is not (can not be) checked for sufficient * size. A null destination argument returns null; otherwise, the first * argument is returned. If the maximum size limits the copy, then the * result will *not* be null-terminated (JLRU). A null destination * returns null; otherwise, the destination argument is returned. */ PR_EXTERN(char *) PL_strncat(char *dst, const char *src, PRUint32 max); /* * PL_strcatn * * Appends a copy of the string pointed to by the third argument, to the * end of the string pointed to by the first. The second argument specifies * the maximum size of the destination buffer, including the null termination. * If the existing string in dst is longer than the max, no action is taken. * The resulting string will be null-terminated. A null destination returns * null; otherwise, the destination argument is returned. */ PR_EXTERN(char *) PL_strcatn(char *dst, PRUint32 max, const char *src); /* * PL_strcmp * * Returns an integer, the sign of which -- positive, zero, or negative -- * reflects the lexical sorting order of the two strings indicated. The * result is positive if the first string comes after the second. The * NSPR implementation is not i18n. */ PR_EXTERN(PRIntn) PL_strcmp(const char *a, const char *b); /* * PL_strncmp * * Returns an integer, the sign of which -- positive, zero, or negative -- * reflects the lexical sorting order of the two strings indicated, up to * the maximum specified. The result is positive if the first string comes * after the second. The NSPR implementation is not i18n. If the maximum * is zero, only the existance or non-existance (pointer is null) of the * strings is compared. */ PR_EXTERN(PRIntn) PL_strncmp(const char *a, const char *b, PRUint32 max); /* * PL_strcasecmp * * Returns an integer, the sign of which -- positive, zero or negative -- * reflects the case-insensitive lexical sorting order of the two strings * indicated. The result is positive if the first string comes after the * second. The NSPR implementation is not i18n. */ PR_EXTERN(PRIntn) PL_strcasecmp(const char *a, const char *b); /* * PL_strncasecmp * * Returns an integer, the sign of which -- positive, zero or negative -- * reflects the case-insensitive lexical sorting order of the first n characters * of the two strings indicated. The result is positive if the first string comes * after the second. The NSPR implementation is not i18n. */ PR_EXTERN(PRIntn) PL_strncasecmp(const char *a, const char *b, PRUint32 max); /* * PL_strchr * * Returns a pointer to the first instance of the specified character in the * provided string. It returns null if the character is not found, or if the * provided string is null. The character may be the null character. */ PR_EXTERN(char *) PL_strchr(const char *s, char c); /* * PL_strrchr * * Returns a pointer to the last instance of the specified character in the * provided string. It returns null if the character is not found, or if the * provided string is null. The character may be the null character. */ PR_EXTERN(char *) PL_strrchr(const char *s, char c); /* * PL_strnchr * * Returns a pointer to the first instance of the specified character within the * first n characters of the provided string. It returns null if the character * is not found, or if the provided string is null. The character may be the * null character. */ PR_EXTERN(char *) PL_strnchr(const char *s, char c, PRUint32 n); /* * PL_strnrchr * * Returns a pointer to the last instance of the specified character within the * first n characters of the provided string. It returns null if the character is * not found, or if the provided string is null. The character may be the null * character. */ PR_EXTERN(char *) PL_strnrchr(const char *s, char c, PRUint32 n); /* * NOTE: Looking for strcasechr, strcaserchr, strncasechr, or strncaserchr? * Use strpbrk, strprbrk, strnpbrk or strnprbrk. */ /* * PL_strpbrk * * Returns a pointer to the first instance in the first string of any character * (not including the terminating null character) of the second string. It returns * null if either string is null. */ PR_EXTERN(char *) PL_strpbrk(const char *s, const char *list); /* * PL_strprbrk * * Returns a pointer to the last instance in the first string of any character * (not including the terminating null character) of the second string. It returns * null if either string is null. */ PR_EXTERN(char *) PL_strprbrk(const char *s, const char *list); /* * PL_strnpbrk * * Returns a pointer to the first instance (within the first n characters) of any * character (not including the terminating null character) of the second string. * It returns null if either string is null. */ PR_EXTERN(char *) PL_strnpbrk(const char *s, const char *list, PRUint32 n); /* * PL_strnprbrk * * Returns a pointer to the last instance (within the first n characters) of any * character (not including the terminating null character) of the second string. * It returns null if either string is null. */ PR_EXTERN(char *) PL_strnprbrk(const char *s, const char *list, PRUint32 n); /* * PL_strstr * * Returns a pointer to the first instance of the little string within the * big one. It returns null if either string is null. */ PR_EXTERN(char *) PL_strstr(const char *big, const char *little); /* * PL_strrstr * * Returns a pointer to the last instance of the little string within the big one. * It returns null if either string is null. */ PR_EXTERN(char *) PL_strrstr(const char *big, const char *little); /* * PL_strnstr * * Returns a pointer to the first instance of the little string within the first * n characters of the big one. It returns null if either string is null. It * returns null if the length of the little string is greater than n. */ PR_EXTERN(char *) PL_strnstr(const char *big, const char *little, PRUint32 n); /* * PL_strnrstr * * Returns a pointer to the last instance of the little string within the first * n characters of the big one. It returns null if either string is null. It * returns null if the length of the little string is greater than n. */ PR_EXTERN(char *) PL_strnrstr(const char *big, const char *little, PRUint32 max); /* * PL_strcasestr * * Returns a pointer to the first instance of the little string within the big one, * ignoring case. It returns null if either string is null. */ PR_EXTERN(char *) PL_strcasestr(const char *big, const char *little); /* * PL_strcaserstr * * Returns a pointer to the last instance of the little string within the big one, * ignoring case. It returns null if either string is null. */ PR_EXTERN(char *) PL_strcaserstr(const char *big, const char *little); /* * PL_strncasestr * * Returns a pointer to the first instance of the little string within the first * n characters of the big one, ignoring case. It returns null if either string is * null. It returns null if the length of the little string is greater than n. */ PR_EXTERN(char *) PL_strncasestr(const char *big, const char *little, PRUint32 max); /* * PL_strncaserstr * * Returns a pointer to the last instance of the little string within the first * n characters of the big one, ignoring case. It returns null if either string is * null. It returns null if the length of the little string is greater than n. */ PR_EXTERN(char *) PL_strncaserstr(const char *big, const char *little, PRUint32 max); /* * PL_strtok_r * * Splits the string s1 into tokens, separated by one or more characters * from the separator string s2. The argument lasts points to a * user-supplied char * pointer in which PL_strtok_r stores information * for it to continue scanning the same string. * * In the first call to PL_strtok_r, s1 points to a string and the value * of *lasts is ignored. PL_strtok_r returns a pointer to the first * token, writes '\0' into the character following the first token, and * updates *lasts. * * In subsequent calls, s1 is null and lasts must stay unchanged from the * previous call. The separator string s2 may be different from call to * call. PL_strtok_r returns a pointer to the next token in s1. When no * token remains in s1, PL_strtok_r returns null. */ PR_EXTERN(char *) PL_strtok_r(char *s1, const char *s2, char **lasts); /* * Things not (yet?) included: strspn/strcspn, strsep. * memchr, memcmp, memcpy, memccpy, index, rindex, bcmp, bcopy, bzero. * Any and all i18n/l10n stuff. */ PR_END_EXTERN_C #endif /* _plstr_h */ # 438 "/usr/local/include/nspr/plstr.h" # 53 "../../../dist/public/nss/secport.h" 2 /* * HACK for NSS 2.8 to allow Admin to compile without source changes. */ #ifndef SEC_BEGIN_PROTOS #if 0 /* expanded by -frewrite-includes */ #include "seccomon.h" #endif /* expanded by -frewrite-includes */ # 58 "../../../dist/public/nss/secport.h" # 59 "../../../dist/public/nss/secport.h" #endif # 60 "../../../dist/public/nss/secport.h" /* * The PORT_*Arena* function signatures mostly involve PLArenaPool* arguments. * But this is misleading! It's not actually safe to use vanilla PLArenaPools * with them. There are two "subclasses" of PLArenaPool that should be used * instead. * * - PORTArenaPool (defined in secport.c): this "subclass" is always * heap-allocated and uses a (heap-allocated) lock to protect all accesses. * Use PORT_NewArena() and PORT_FreeArena() to create and destroy * PORTArenaPools. * * - PORTCheapArenaPool (defined here): this "subclass" can be stack-allocated * and does not use a lock to protect accesses. This makes it cheaper but * less general. It is best used for arena pools that (a) are hot, (b) have * lifetimes bounded within a single function, and (c) don't need locking. * Use PORT_InitCheapArena() and PORT_DestroyCheapArena() to initialize and * finalize PORTCheapArenaPools. * * All the other PORT_Arena* functions will operate safely with either * subclass. */ typedef struct PORTCheapArenaPool_str { PLArenaPool arena; PRUint32 magic; /* This is used to distinguish the two subclasses. */ } PORTCheapArenaPool; SEC_BEGIN_PROTOS extern void *PORT_Alloc(size_t len); extern void *PORT_Realloc(void *old, size_t len); extern void *PORT_ZAlloc(size_t len); extern void *PORT_ZAllocAligned(size_t bytes, size_t alignment, void **mem); extern void *PORT_ZAllocAlignedOffset(size_t bytes, size_t alignment, size_t offset); extern void PORT_Free(void *ptr); extern void PORT_ZFree(void *ptr, size_t len); extern char *PORT_Strdup(const char *s); extern void PORT_SetError(int value); extern int PORT_GetError(void); /* These functions are for use with PORTArenaPools. */ extern PLArenaPool *PORT_NewArena(unsigned long chunksize); extern void PORT_FreeArena(PLArenaPool *arena, PRBool zero); /* These functions are for use with PORTCheapArenaPools. */ extern void PORT_InitCheapArena(PORTCheapArenaPool *arena, unsigned long chunksize); extern void PORT_DestroyCheapArena(PORTCheapArenaPool *arena); /* These functions work with both kinds of arena pool. */ extern void *PORT_ArenaAlloc(PLArenaPool *arena, size_t size); extern void *PORT_ArenaZAlloc(PLArenaPool *arena, size_t size); extern void *PORT_ArenaGrow(PLArenaPool *arena, void *ptr, size_t oldsize, size_t newsize); extern void *PORT_ArenaMark(PLArenaPool *arena); extern void PORT_ArenaRelease(PLArenaPool *arena, void *mark); extern void PORT_ArenaZRelease(PLArenaPool *arena, void *mark); extern void PORT_ArenaUnmark(PLArenaPool *arena, void *mark); extern char *PORT_ArenaStrdup(PLArenaPool *arena, const char *str); SEC_END_PROTOS #define PORT_Assert PR_ASSERT /* This is a variation of PORT_Assert where the arguments will be always * used either in Debug or not. But, in optimized mode the result will be * ignored. See more details in Bug 1588015. */ #define PORT_AssertArg PR_ASSERT_ARG /* This runs a function that should return SECSuccess. * Intended for NSS internal use only. * The return value is asserted in a debug build, otherwise it is ignored. * This is no substitute for proper error handling. It is OK only if you * have ensured that the function cannot fail by other means such as checking * prerequisites. In that case this can be used as a safeguard against * unexpected changes in a function. */ #ifdef DEBUG #define PORT_CheckSuccess(f) PR_ASSERT((f) == SECSuccess) #else # 140 "../../../dist/public/nss/secport.h" #define PORT_CheckSuccess(f) (f) #endif # 142 "../../../dist/public/nss/secport.h" #define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type)) #define PORT_ZNewAligned(type, alignment, mem) \ (type *)PORT_ZAllocAlignedOffset(sizeof(type), alignment, offsetof(type, mem)) #define PORT_New(type) (type *)PORT_Alloc(sizeof(type)) #define PORT_ArenaNew(poolp, type) \ (type *)PORT_ArenaAlloc(poolp, sizeof(type)) #define PORT_ArenaZNew(poolp, type) \ (type *)PORT_ArenaZAlloc(poolp, sizeof(type)) #define PORT_NewArray(type, num) \ (type *)PORT_Alloc(sizeof(type) * (num)) #define PORT_ZNewArray(type, num) \ (type *)PORT_ZAlloc(sizeof(type) * (num)) #define PORT_ArenaNewArray(poolp, type, num) \ (type *)PORT_ArenaAlloc(poolp, sizeof(type) * (num)) #define PORT_ArenaZNewArray(poolp, type, num) \ (type *)PORT_ArenaZAlloc(poolp, sizeof(type) * (num)) /* Please, keep these defines sorted alphabetically. Thanks! */ #define PORT_Atoi(buff) (int)strtol(buff, NULL, 10) /* Returns a UTF-8 encoded constant error string for err. * Returns NULL if initialization of the error tables fails * due to insufficient memory. * * This string must not be modified by the application. */ #define PORT_ErrorToString(err) PR_ErrorToString((err), PR_LANGUAGE_I_DEFAULT) #define PORT_ErrorToName PR_ErrorToName #define PORT_Memcmp memcmp #define PORT_Memcpy memcpy #ifndef SUNOS4 #define PORT_Memmove memmove #else /*SUNOS4*/ # 178 "../../../dist/public/nss/secport.h" #define PORT_Memmove(s, ct, n) bcopy((ct), (s), (n)) #endif /*SUNOS4*/ # 180 "../../../dist/public/nss/secport.h" #define PORT_Memset memset #define PORT_Strcasecmp PL_strcasecmp #define PORT_Strcat strcat #define PORT_Strchr strchr #define PORT_Strrchr strrchr #define PORT_Strcmp strcmp #define PORT_Strcpy strcpy #define PORT_Strlen(s) strlen(s) #define PORT_Strncasecmp PL_strncasecmp #define PORT_Strncat strncat #define PORT_Strncmp strncmp #define PORT_Strncpy strncpy #define PORT_Strpbrk strpbrk #define PORT_Strstr strstr #define PORT_Strtok strtok #define PORT_Tolower tolower typedef PRBool(PR_CALLBACK *PORTCharConversionWSwapFunc)(PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen, PRBool swapBytes); typedef PRBool(PR_CALLBACK *PORTCharConversionFunc)(PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); SEC_BEGIN_PROTOS void PORT_SetUCS4_UTF8ConversionFunction(PORTCharConversionFunc convFunc); void PORT_SetUCS2_ASCIIConversionFunction(PORTCharConversionWSwapFunc convFunc); PRBool PORT_UCS4_UTF8Conversion(PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); PRBool PORT_UCS2_ASCIIConversion(PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen, PRBool swapBytes); void PORT_SetUCS2_UTF8ConversionFunction(PORTCharConversionFunc convFunc); PRBool PORT_UCS2_UTF8Conversion(PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); /* One-way conversion from ISO-8859-1 to UTF-8 */ PRBool PORT_ISO88591_UTF8Conversion(const unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); extern PRBool sec_port_ucs4_utf8_conversion_function( PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); extern PRBool sec_port_ucs2_utf8_conversion_function( PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); /* One-way conversion from ISO-8859-1 to UTF-8 */ extern PRBool sec_port_iso88591_utf8_conversion_function( const unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen); extern int NSS_PutEnv(const char *envVarName, const char *envValue); extern int NSS_SecureMemcmp(const void *a, const void *b, size_t n); extern unsigned int NSS_SecureMemcmpZero(const void *mem, size_t n); /* * Load a shared library called "newShLibName" in the same directory as * a shared library that is already loaded, called existingShLibName. * A pointer to a static function in that shared library, * staticShLibFunc, is required. * * existingShLibName: * The file name of the shared library that shall be used as the * "reference library". The loader will attempt to load the requested * library from the same directory as the reference library. * * staticShLibFunc: * Pointer to a static function in the "reference library". * * newShLibName: * The simple file name of the new shared library to be loaded. * * We use PR_GetLibraryFilePathname to get the pathname of the loaded * shared lib that contains this function, and then do a * PR_LoadLibraryWithFlags with an absolute pathname for the shared * library to be loaded. * * On Windows, the "alternate search path" strategy is employed, if available. * On Unix, if existingShLibName is a symbolic link, and no link exists for the * new library, the original link will be resolved, and the new library loaded * from the resolved location. * * If the new shared library is not found in the same location as the reference * library, it will then be loaded from the normal system library path. */ PRLibrary * PORT_LoadLibraryFromOrigin(const char *existingShLibName, PRFuncPtr staticShLibFunc, const char *newShLibName); SEC_END_PROTOS #endif /* _SECPORT_H_ */ # 300 "../../../dist/public/nss/secport.h" # 28 "../../../dist/public/nss/seccomon.h" 2 typedef enum { siBuffer = 0, siClearDataBuffer = 1, siCipherDataBuffer = 2, siDERCertBuffer = 3, siEncodedCertBuffer = 4, siDERNameBuffer = 5, siEncodedNameBuffer = 6, siAsciiNameString = 7, siAsciiString = 8, siDEROID = 9, siUnsignedInteger = 10, siUTCTime = 11, siGeneralizedTime = 12, siVisibleString = 13, siUTF8String = 14, siBMPString = 15 } SECItemType; typedef struct SECItemStr SECItem; struct SECItemStr { SECItemType type; unsigned char *data; unsigned int len; }; typedef struct SECItemArrayStr SECItemArray; struct SECItemArrayStr { SECItem *items; unsigned int len; }; /* ** A status code. Status's are used by procedures that return status ** values. Again the motivation is so that a compiler can generate ** warnings when return values are wrong. Correct testing of status codes: ** ** SECStatus rv; ** rv = some_function (some_argument); ** if (rv != SECSuccess) ** do_an_error_thing(); ** */ typedef enum _SECStatus { SECWouldBlock = -2, SECFailure = -1, SECSuccess = 0 } SECStatus; /* ** A comparison code. Used for procedures that return comparision ** values. Again the motivation is so that a compiler can generate ** warnings when return values are wrong. */ typedef enum _SECComparison { SECLessThan = -1, SECEqual = 0, SECGreaterThan = 1 } SECComparison; #endif /* _SECCOMMON_H_ */ # 92 "../../../dist/public/nss/seccomon.h" # 12 "./blapit.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "prlink.h" #endif /* expanded by -frewrite-includes */ # 12 "./blapit.h" # 13 "./blapit.h" #if 0 /* expanded by -frewrite-includes */ #include "plarena.h" #endif /* expanded by -frewrite-includes */ # 13 "./blapit.h" # 14 "./blapit.h" #if 0 /* expanded by -frewrite-includes */ #include "ecl-exp.h" #endif /* expanded by -frewrite-includes */ # 14 "./blapit.h" # 1 "../../../dist/public/nss/ecl-exp.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __ecl_exp_h_ #define __ecl_exp_h_ /* Curve field type */ typedef enum { ECField_GFp, ECField_GF2m } ECField; /* Hexadecimal encoding of curve parameters */ struct ECCurveParamsStr { char *text; ECField field; unsigned int size; char *irr; char *curvea; char *curveb; char *genx; char *geny; char *order; int cofactor; int security; int pointSize; unsigned int usage; }; typedef struct ECCurveParamsStr ECCurveParams; /* Named curve parameters */ typedef enum { ECCurve_noName = 0, /* NIST prime curves */ ECCurve_NIST_P192, /* not supported */ ECCurve_NIST_P224, /* not supported */ ECCurve_NIST_P256, ECCurve_NIST_P384, ECCurve_NIST_P521, /* NIST binary curves */ ECCurve_NIST_K163, /* not supported */ ECCurve_NIST_B163, /* not supported */ ECCurve_NIST_K233, /* not supported */ ECCurve_NIST_B233, /* not supported */ ECCurve_NIST_K283, /* not supported */ ECCurve_NIST_B283, /* not supported */ ECCurve_NIST_K409, /* not supported */ ECCurve_NIST_B409, /* not supported */ ECCurve_NIST_K571, /* not supported */ ECCurve_NIST_B571, /* not supported */ /* ANSI X9.62 prime curves */ /* ECCurve_X9_62_PRIME_192V1 == ECCurve_NIST_P192 */ ECCurve_X9_62_PRIME_192V2, /* not supported */ ECCurve_X9_62_PRIME_192V3, /* not supported */ ECCurve_X9_62_PRIME_239V1, /* not supported */ ECCurve_X9_62_PRIME_239V2, /* not supported */ ECCurve_X9_62_PRIME_239V3, /* not supported */ /* ECCurve_X9_62_PRIME_256V1 == ECCurve_NIST_P256 */ /* ANSI X9.62 binary curves */ ECCurve_X9_62_CHAR2_PNB163V1, /* not supported */ ECCurve_X9_62_CHAR2_PNB163V2, /* not supported */ ECCurve_X9_62_CHAR2_PNB163V3, /* not supported */ ECCurve_X9_62_CHAR2_PNB176V1, /* not supported */ ECCurve_X9_62_CHAR2_TNB191V1, /* not supported */ ECCurve_X9_62_CHAR2_TNB191V2, /* not supported */ ECCurve_X9_62_CHAR2_TNB191V3, /* not supported */ ECCurve_X9_62_CHAR2_PNB208W1, /* not supported */ ECCurve_X9_62_CHAR2_TNB239V1, /* not supported */ ECCurve_X9_62_CHAR2_TNB239V2, /* not supported */ ECCurve_X9_62_CHAR2_TNB239V3, /* not supported */ ECCurve_X9_62_CHAR2_PNB272W1, /* not supported */ ECCurve_X9_62_CHAR2_PNB304W1, /* not supported */ ECCurve_X9_62_CHAR2_TNB359V1, /* not supported */ ECCurve_X9_62_CHAR2_PNB368W1, /* not supported */ ECCurve_X9_62_CHAR2_TNB431R1, /* not supported */ /* SEC2 prime curves */ ECCurve_SECG_PRIME_112R1, /* not supported */ ECCurve_SECG_PRIME_112R2, /* not supported */ ECCurve_SECG_PRIME_128R1, /* not supported */ ECCurve_SECG_PRIME_128R2, /* not supported */ ECCurve_SECG_PRIME_160K1, /* not supported */ ECCurve_SECG_PRIME_160R1, /* not supported */ ECCurve_SECG_PRIME_160R2, /* not supported */ ECCurve_SECG_PRIME_192K1, /* not supported */ /* ECCurve_SECG_PRIME_192R1 == ECCurve_NIST_P192 */ ECCurve_SECG_PRIME_224K1, /* not supported */ /* ECCurve_SECG_PRIME_224R1 == ECCurve_NIST_P224 */ ECCurve_SECG_PRIME_256K1, /* not supported */ /* ECCurve_SECG_PRIME_256R1 == ECCurve_NIST_P256 */ /* ECCurve_SECG_PRIME_384R1 == ECCurve_NIST_P384 */ /* ECCurve_SECG_PRIME_521R1 == ECCurve_NIST_P521 */ /* SEC2 binary curves */ ECCurve_SECG_CHAR2_113R1, /* not supported */ ECCurve_SECG_CHAR2_113R2, /* not supported */ ECCurve_SECG_CHAR2_131R1, /* not supported */ ECCurve_SECG_CHAR2_131R2, /* not supported */ /* ECCurve_SECG_CHAR2_163K1 == ECCurve_NIST_K163 */ ECCurve_SECG_CHAR2_163R1, /* not supported */ /* ECCurve_SECG_CHAR2_163R2 == ECCurve_NIST_B163 */ ECCurve_SECG_CHAR2_193R1, /* not supported */ ECCurve_SECG_CHAR2_193R2, /* not supported */ /* ECCurve_SECG_CHAR2_233K1 == ECCurve_NIST_K233 */ /* ECCurve_SECG_CHAR2_233R1 == ECCurve_NIST_B233 */ ECCurve_SECG_CHAR2_239K1, /* not supported */ /* ECCurve_SECG_CHAR2_283K1 == ECCurve_NIST_K283 */ /* ECCurve_SECG_CHAR2_283R1 == ECCurve_NIST_B283 */ /* ECCurve_SECG_CHAR2_409K1 == ECCurve_NIST_K409 */ /* ECCurve_SECG_CHAR2_409R1 == ECCurve_NIST_B409 */ /* ECCurve_SECG_CHAR2_571K1 == ECCurve_NIST_K571 */ /* ECCurve_SECG_CHAR2_571R1 == ECCurve_NIST_B571 */ /* WTLS curves */ ECCurve_WTLS_1, /* not supported */ /* there is no WTLS 2 curve */ /* ECCurve_WTLS_3 == ECCurve_NIST_K163 */ /* ECCurve_WTLS_4 == ECCurve_SECG_CHAR2_113R1 */ /* ECCurve_WTLS_5 == ECCurve_X9_62_CHAR2_PNB163V1 */ /* ECCurve_WTLS_6 == ECCurve_SECG_PRIME_112R1 */ /* ECCurve_WTLS_7 == ECCurve_SECG_PRIME_160R1 */ ECCurve_WTLS_8, /* not supported */ ECCurve_WTLS_9, /* not supported */ /* ECCurve_WTLS_10 == ECCurve_NIST_K233 */ /* ECCurve_WTLS_11 == ECCurve_NIST_B233 */ /* ECCurve_WTLS_12 == ECCurve_NIST_P224 */ ECCurve25519, ECCurve_pastLastCurve } ECCurveName; /* Aliased named curves */ #define ECCurve_X9_62_PRIME_192V1 ECCurve_NIST_P192 /* not supported */ #define ECCurve_X9_62_PRIME_256V1 ECCurve_NIST_P256 #define ECCurve_SECG_PRIME_192R1 ECCurve_NIST_P192 /* not supported */ #define ECCurve_SECG_PRIME_224R1 ECCurve_NIST_P224 /* not supported */ #define ECCurve_SECG_PRIME_256R1 ECCurve_NIST_P256 #define ECCurve_SECG_PRIME_384R1 ECCurve_NIST_P384 #define ECCurve_SECG_PRIME_521R1 ECCurve_NIST_P521 #define ECCurve_SECG_CHAR2_163K1 ECCurve_NIST_K163 /* not supported */ #define ECCurve_SECG_CHAR2_163R2 ECCurve_NIST_B163 /* not supported */ #define ECCurve_SECG_CHAR2_233K1 ECCurve_NIST_K233 /* not supported */ #define ECCurve_SECG_CHAR2_233R1 ECCurve_NIST_B233 /* not supported */ #define ECCurve_SECG_CHAR2_283K1 ECCurve_NIST_K283 /* not supported */ #define ECCurve_SECG_CHAR2_283R1 ECCurve_NIST_B283 /* not supported */ #define ECCurve_SECG_CHAR2_409K1 ECCurve_NIST_K409 /* not supported */ #define ECCurve_SECG_CHAR2_409R1 ECCurve_NIST_B409 /* not supported */ #define ECCurve_SECG_CHAR2_571K1 ECCurve_NIST_K571 /* not supported */ #define ECCurve_SECG_CHAR2_571R1 ECCurve_NIST_B571 /* not supported */ #define ECCurve_WTLS_3 ECCurve_NIST_K163 /* not supported */ #define ECCurve_WTLS_4 ECCurve_SECG_CHAR2_113R1 /* not supported */ #define ECCurve_WTLS_5 ECCurve_X9_62_CHAR2_PNB163V1 /* not supported */ #define ECCurve_WTLS_6 ECCurve_SECG_PRIME_112R1 /* not supported */ #define ECCurve_WTLS_7 ECCurve_SECG_PRIME_160R1 /* not supported */ #define ECCurve_WTLS_10 ECCurve_NIST_K233 /* not supported */ #define ECCurve_WTLS_11 ECCurve_NIST_B233 /* not supported */ #define ECCurve_WTLS_12 ECCurve_NIST_P224 /* not supported */ #endif /* __ecl_exp_h_ */ # 168 "../../../dist/public/nss/ecl-exp.h" # 15 "./blapit.h" 2 /* RC2 operation modes */ #define NSS_RC2 0 #define NSS_RC2_CBC 1 /* RC5 operation modes */ #define NSS_RC5 0 #define NSS_RC5_CBC 1 /* DES operation modes */ #define NSS_DES 0 #define NSS_DES_CBC 1 #define NSS_DES_EDE3 2 #define NSS_DES_EDE3_CBC 3 #define DES_KEY_LENGTH 8 /* Bytes */ /* AES operation modes */ #define NSS_AES 0 #define NSS_AES_CBC 1 #define NSS_AES_CTS 2 #define NSS_AES_CTR 3 #define NSS_AES_GCM 4 /* Camellia operation modes */ #define NSS_CAMELLIA 0 #define NSS_CAMELLIA_CBC 1 /* SEED operation modes */ #define NSS_SEED 0 #define NSS_SEED_CBC 1 #define DSA1_SUBPRIME_LEN 20 /* Bytes */ #define DSA1_SIGNATURE_LEN (DSA1_SUBPRIME_LEN * 2) /* Bytes */ #define DSA_MAX_SUBPRIME_LEN 32 /* Bytes */ #define DSA_MAX_SIGNATURE_LEN (DSA_MAX_SUBPRIME_LEN * 2) /* Bytes */ /* * Mark the old defines as deprecated. This will warn code that expected * DSA1 only that they need to change if the are to support DSA2. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) && (__GNUC__ > 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "./blapit.h" /* make GCC warn when we use these #defines */ typedef int __BLAPI_DEPRECATED __attribute__((deprecated)); #define DSA_SUBPRIME_LEN ((__BLAPI_DEPRECATED)DSA1_SUBPRIME_LEN) #define DSA_SIGNATURE_LEN ((__BLAPI_DEPRECATED)DSA1_SIGNATURE_LEN) #define DSA_Q_BITS ((__BLAPI_DEPRECATED)(DSA1_SUBPRIME_LEN * 8)) #else # 63 "./blapit.h" #ifdef _WIN32 /* This magic gets the windows compiler to give us a deprecation * warning */ #pragma deprecated(DSA_SUBPRIME_LEN, DSA_SIGNATURE_LEN, DSA_QBITS) #endif # 68 "./blapit.h" #define DSA_SUBPRIME_LEN DSA1_SUBPRIME_LEN #define DSA_SIGNATURE_LEN DSA1_SIGNATURE_LEN #define DSA_Q_BITS (DSA1_SUBPRIME_LEN * 8) #endif # 72 "./blapit.h" /* XXX We shouldn't have to hard code this limit. For * now, this is the quickest way to support ECDSA signature * processing (ECDSA signature lengths depend on curve * size). This limit is sufficient for curves upto * 576 bits. */ #define MAX_ECKEY_LEN 72 /* Bytes */ #define EC_MAX_KEY_BITS 521 /* in bits */ #define EC_MIN_KEY_BITS 256 /* in bits */ /* EC point compression format */ #define EC_POINT_FORM_COMPRESSED_Y0 0x02 #define EC_POINT_FORM_COMPRESSED_Y1 0x03 #define EC_POINT_FORM_UNCOMPRESSED 0x04 #define EC_POINT_FORM_HYBRID_Y0 0x06 #define EC_POINT_FORM_HYBRID_Y1 0x07 /* * Number of bytes each hash algorithm produces */ #define MD2_LENGTH 16 /* Bytes */ #define MD5_LENGTH 16 /* Bytes */ #define SHA1_LENGTH 20 /* Bytes */ #define SHA256_LENGTH 32 /* bytes */ #define SHA384_LENGTH 48 /* bytes */ #define SHA512_LENGTH 64 /* bytes */ #define BLAKE2B512_LENGTH 64 /* Bytes */ #define HASH_LENGTH_MAX SHA512_LENGTH /* * Input block size for each hash algorithm. */ #define MD2_BLOCK_LENGTH 64 /* bytes */ #define MD5_BLOCK_LENGTH 64 /* bytes */ #define SHA1_BLOCK_LENGTH 64 /* bytes */ #define SHA224_BLOCK_LENGTH 64 /* bytes */ #define SHA256_BLOCK_LENGTH 64 /* bytes */ #define SHA384_BLOCK_LENGTH 128 /* bytes */ #define SHA512_BLOCK_LENGTH 128 /* bytes */ #define BLAKE2B_BLOCK_LENGTH 128 /* Bytes */ #define HASH_BLOCK_LENGTH_MAX SHA512_BLOCK_LENGTH #define AES_KEY_WRAP_IV_BYTES 8 #define AES_KEY_WRAP_BLOCK_SIZE 8 /* bytes */ #define AES_BLOCK_SIZE 16 /* bytes */ #define AES_128_KEY_LENGTH 16 /* bytes */ #define AES_192_KEY_LENGTH 24 /* bytes */ #define AES_256_KEY_LENGTH 32 /* bytes */ #define CAMELLIA_BLOCK_SIZE 16 /* bytes */ #define SEED_BLOCK_SIZE 16 /* bytes */ #define SEED_KEY_LENGTH 16 /* bytes */ #define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048 #define BLAKE2B_KEY_SIZE 64 /* * These values come from the initial key size limits from the PKCS #11 * module. They may be arbitrarily adjusted to any value freebl supports. */ #define RSA_MIN_MODULUS_BITS 128 #define RSA_MAX_MODULUS_BITS 16384 #define RSA_MAX_EXPONENT_BITS 64 #define DH_MIN_P_BITS 128 #define DH_MAX_P_BITS 16384 /* * The FIPS 186-1 algorithm for generating primes P and Q allows only 9 * distinct values for the length of P, and only one value for the * length of Q. * The algorithm uses a variable j to indicate which of the 9 lengths * of P is to be used. * The following table relates j to the lengths of P and Q in bits. * * j bits in P bits in Q * _ _________ _________ * 0 512 160 * 1 576 160 * 2 640 160 * 3 704 160 * 4 768 160 * 5 832 160 * 6 896 160 * 7 960 160 * 8 1024 160 * * The FIPS-186-1 compliant PQG generator takes j as an input parameter. * * FIPS 186-3 algorithm specifies 4 distinct P and Q sizes: * * bits in P bits in Q * _________ _________ * 1024 160 * 2048 224 * 2048 256 * 3072 256 * * The FIPS-186-3 complaiant PQG generator (PQG V2) takes arbitrary p and q * lengths as input and returns an error if they aren't in this list. */ #define DSA1_Q_BITS 160 #define DSA_MAX_P_BITS 3072 #define DSA_MIN_P_BITS 512 #define DSA_MAX_Q_BITS 256 #define DSA_MIN_Q_BITS 160 #if 0 /* disabled by -frewrite-includes */ #if DSA_MAX_Q_BITS != DSA_MAX_SUBPRIME_LEN * 8 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 186 "./blapit.h" #error "Inconsistent declaration of DSA SUBPRIME/Q parameters in blapit.h" #endif # 188 "./blapit.h" /* * function takes desired number of bits in P, * returns index (0..8) or -1 if number of bits is invalid. */ #define PQG_PBITS_TO_INDEX(bits) \ (((bits) < 512 || (bits) > 1024 || (bits) % 64) ? -1 : (int)((bits)-512) / 64) /* * function takes index (0-8) * returns number of bits in P for that index, or -1 if index is invalid. */ #define PQG_INDEX_TO_PBITS(j) (((unsigned)(j) > 8) ? -1 : (512 + 64 * (j))) /*************************************************************************** ** Opaque objects */ struct DESContextStr; struct RC2ContextStr; struct RC4ContextStr; struct RC5ContextStr; struct AESContextStr; struct CamelliaContextStr; struct MD2ContextStr; struct MD5ContextStr; struct SHA1ContextStr; struct SHA256ContextStr; struct SHA512ContextStr; struct AESKeyWrapContextStr; struct SEEDContextStr; struct ChaCha20Poly1305ContextStr; struct Blake2bContextStr; typedef struct DESContextStr DESContext; typedef struct RC2ContextStr RC2Context; typedef struct RC4ContextStr RC4Context; typedef struct RC5ContextStr RC5Context; typedef struct AESContextStr AESContext; typedef struct CamelliaContextStr CamelliaContext; typedef struct MD2ContextStr MD2Context; typedef struct MD5ContextStr MD5Context; typedef struct SHA1ContextStr SHA1Context; typedef struct SHA256ContextStr SHA256Context; /* SHA224Context is really a SHA256ContextStr. This is not a mistake. */ typedef struct SHA256ContextStr SHA224Context; typedef struct SHA512ContextStr SHA512Context; /* SHA384Context is really a SHA512ContextStr. This is not a mistake. */ typedef struct SHA512ContextStr SHA384Context; typedef struct AESKeyWrapContextStr AESKeyWrapContext; typedef struct SEEDContextStr SEEDContext; typedef struct ChaCha20Poly1305ContextStr ChaCha20Poly1305Context; typedef struct Blake2bContextStr BLAKE2BContext; /*************************************************************************** ** RSA Public and Private Key structures */ /* member names from PKCS#1, section 7.1 */ struct RSAPublicKeyStr { PLArenaPool *arena; SECItem modulus; SECItem publicExponent; }; typedef struct RSAPublicKeyStr RSAPublicKey; /* member names from PKCS#1, section 7.2 */ struct RSAPrivateKeyStr { PLArenaPool *arena; SECItem version; SECItem modulus; SECItem publicExponent; SECItem privateExponent; SECItem prime1; SECItem prime2; SECItem exponent1; SECItem exponent2; SECItem coefficient; }; typedef struct RSAPrivateKeyStr RSAPrivateKey; /*************************************************************************** ** DSA Public and Private Key and related structures */ struct PQGParamsStr { PLArenaPool *arena; SECItem prime; /* p */ SECItem subPrime; /* q */ SECItem base; /* g */ /* XXX chrisk: this needs to be expanded to hold j and validationParms (RFC2459 7.3.2) */ }; typedef struct PQGParamsStr PQGParams; struct PQGVerifyStr { PLArenaPool *arena; /* includes this struct, seed, & h. */ unsigned int counter; SECItem seed; SECItem h; }; typedef struct PQGVerifyStr PQGVerify; struct DSAPublicKeyStr { PQGParams params; SECItem publicValue; }; typedef struct DSAPublicKeyStr DSAPublicKey; struct DSAPrivateKeyStr { PQGParams params; SECItem publicValue; SECItem privateValue; }; typedef struct DSAPrivateKeyStr DSAPrivateKey; /*************************************************************************** ** Diffie-Hellman Public and Private Key and related structures ** Structure member names suggested by PKCS#3. */ struct DHParamsStr { PLArenaPool *arena; SECItem prime; /* p */ SECItem base; /* g */ }; typedef struct DHParamsStr DHParams; struct DHPublicKeyStr { PLArenaPool *arena; SECItem prime; SECItem base; SECItem publicValue; }; typedef struct DHPublicKeyStr DHPublicKey; struct DHPrivateKeyStr { PLArenaPool *arena; SECItem prime; SECItem base; SECItem publicValue; SECItem privateValue; }; typedef struct DHPrivateKeyStr DHPrivateKey; /*************************************************************************** ** Data structures used for elliptic curve parameters and ** public and private keys. */ /* ** The ECParams data structures can encode elliptic curve ** parameters for both GFp and GF2m curves. */ typedef enum { ec_params_explicit, ec_params_named } ECParamsType; typedef enum { ec_field_GFp = 1, ec_field_GF2m, ec_field_plain } ECFieldType; struct ECFieldIDStr { int size; /* field size in bits */ ECFieldType type; union { SECItem prime; /* prime p for (GFp) */ SECItem poly; /* irreducible binary polynomial for (GF2m) */ } u; int k1; /* first coefficient of pentanomial or * the only coefficient of trinomial */ int k2; /* two remaining coefficients of pentanomial */ int k3; }; typedef struct ECFieldIDStr ECFieldID; struct ECCurveStr { SECItem a; /* contains octet stream encoding of * field element (X9.62 section 4.3.3) */ SECItem b; SECItem seed; }; typedef struct ECCurveStr ECCurve; struct ECParamsStr { PLArenaPool *arena; ECParamsType type; ECFieldID fieldID; ECCurve curve; SECItem base; SECItem order; int cofactor; SECItem DEREncoding; ECCurveName name; SECItem curveOID; }; typedef struct ECParamsStr ECParams; struct ECPublicKeyStr { ECParams ecParams; SECItem publicValue; /* elliptic curve point encoded as * octet stream. */ }; typedef struct ECPublicKeyStr ECPublicKey; struct ECPrivateKeyStr { ECParams ecParams; SECItem publicValue; /* encoded ec point */ SECItem privateValue; /* private big integer */ SECItem version; /* As per SEC 1, Appendix C, Section C.4 */ }; typedef struct ECPrivateKeyStr ECPrivateKey; typedef void *(*BLapiAllocateFunc)(void); typedef void (*BLapiDestroyContextFunc)(void *cx, PRBool freeit); typedef SECStatus (*BLapiInitContextFunc)(void *cx, const unsigned char *key, unsigned int keylen, const unsigned char *, int, unsigned int, unsigned int); typedef SECStatus (*BLapiEncrypt)(void *cx, unsigned char *output, unsigned int *outputLen, unsigned int maxOutputLen, const unsigned char *input, unsigned int inputLen); #endif /* _BLAPIT_H_ */ # 421 "./blapit.h" # 12 "./blapii.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 12 "./blapii.h" # 1 "mpi/mpi.h" 1 /* * mpi.h * * Arbitrary precision integer arithmetic library * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _H_MPI_ #define _H_MPI_ #if 0 /* expanded by -frewrite-includes */ #include "mpi-config.h" #endif /* expanded by -frewrite-includes */ # 13 "mpi/mpi.h" # 1 "mpi/mpi-config.h" 1 /* Default configuration for MPI library * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef MPI_CONFIG_H_ #define MPI_CONFIG_H_ /* For boolean options, 0 = no 1 = yes Other options are documented individually. */ #ifndef MP_IOFUNC #define MP_IOFUNC 0 /* include mp_print() ? */ #endif # 22 "mpi/mpi-config.h" #ifndef MP_MODARITH #define MP_MODARITH 1 /* include modular arithmetic ? */ #endif # 26 "mpi/mpi-config.h" #ifndef MP_LOGTAB #define MP_LOGTAB 1 /* use table of logs instead of log()? */ #endif # 30 "mpi/mpi-config.h" #ifndef MP_ARGCHK /* 0 = no parameter checks 1 = runtime checks, continue execution and return an error to caller 2 = assertions; dump core on parameter errors */ #ifdef DEBUG #define MP_ARGCHK 2 /* how to check input arguments */ #else # 40 "mpi/mpi-config.h" #define MP_ARGCHK 1 /* how to check input arguments */ #endif # 42 "mpi/mpi-config.h" #endif # 43 "mpi/mpi-config.h" #ifndef MP_DEBUG #define MP_DEBUG 0 /* print diagnostic output? */ #endif # 47 "mpi/mpi-config.h" #ifndef MP_DEFPREC #define MP_DEFPREC 64 /* default precision, in digits */ #endif # 51 "mpi/mpi-config.h" #ifndef MP_SQUARE #define MP_SQUARE 1 /* use separate squaring code? */ #endif # 55 "mpi/mpi-config.h" #endif /* ifndef MPI_CONFIG_H_ */ # 57 "mpi/mpi-config.h" # 14 "mpi/mpi.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "seccomon.h" #endif /* expanded by -frewrite-includes */ # 15 "mpi/mpi.h" # 16 "mpi/mpi.h" SEC_BEGIN_PROTOS #if 0 /* disabled by -frewrite-includes */ #if MP_DEBUG #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "mpi/mpi.h" #undef MP_IOFUNC #define MP_IOFUNC 1 #endif # 22 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if MP_IOFUNC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 24 "mpi/mpi.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "mpi/mpi.h" # 25 "mpi/mpi.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "mpi/mpi.h" # 26 "mpi/mpi.h" #endif # 27 "mpi/mpi.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "mpi/mpi.h" # 1 "/usr/include/limits.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)limits.h 8.2 (Berkeley) 1/4/94 * $FreeBSD$ */ #ifndef _LIMITS_H_ #define _LIMITS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/limits.h" 3 4 # 39 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/include/limits.h" 3 4 #define _POSIX_ARG_MAX 4096 #define _POSIX_LINK_MAX 8 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_NAME_MAX 14 #define _POSIX_PIPE_BUF 512 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/limits.h" 3 4 #define _POSIX_CHILD_MAX 25 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_PATH_MAX 256 #define _POSIX_TZNAME_MAX 6 #else # 57 "/usr/include/limits.h" 3 4 #define _POSIX_CHILD_MAX 6 #define _POSIX_NGROUPS_MAX 0 #define _POSIX_OPEN_MAX 16 #define _POSIX_PATH_MAX 255 #define _POSIX_TZNAME_MAX 3 #endif # 63 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/include/limits.h" 3 4 #define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ #define BC_DIM_MAX 2048 /* max array elements in bc(1) */ #define BC_SCALE_MAX 99 /* max scale value in bc(1) */ #define BC_STRING_MAX 1000 /* max const string length in bc(1) */ #define CHARCLASS_NAME_MAX 14 /* max character class name size */ #define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ #define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ #define LINE_MAX 2048 /* max bytes in an input line */ #define RE_DUP_MAX 255 /* max RE's in interval notation */ #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EQUIV_CLASS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 #endif # 86 "/usr/include/limits.h" 3 4 #endif # 87 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199309 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 89 "/usr/include/limits.h" 3 4 #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_RTSIG_MAX 8 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_TIMER_MAX 32 #define _POSIX_CLOCKRES_MIN 20000000 #endif # 102 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199506 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 104 "/usr/include/limits.h" 3 4 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define _POSIX_THREAD_KEYS_MAX 128 #define _POSIX_THREAD_THREADS_MAX 64 #endif # 108 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 110 "/usr/include/limits.h" 3 4 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_SS_REPL_MAX 4 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_TRACE_EVENT_NAME_MAX 30 #define _POSIX_TRACE_NAME_MAX 8 #define _POSIX_TRACE_SYS_MAX 8 #define _POSIX_TRACE_USER_EVENT_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX #endif # 123 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 125 "/usr/include/limits.h" 3 4 #define NL_ARGMAX 4096 /* max # of position args for printf */ #define NL_MSGMAX 32767 #define NL_SETMAX 255 #define NL_TEXTMAX 2048 #endif # 130 "/usr/include/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 132 "/usr/include/limits.h" 3 4 #define _XOPEN_IOV_MAX 16 #define _XOPEN_NAME_MAX 255 #define _XOPEN_PATH_MAX 1024 #define PASS_MAX 128 /* _PASSWORD_LEN from */ #define NL_LANGMAX 31 /* max LANG name length */ #define NL_NMAX 1 #endif # 140 "/usr/include/limits.h" 3 4 #define MB_LEN_MAX 6 /* 31-bit UTF-8 */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 143 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/limits.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYS_LIMITS_H_ #define _SYS_LIMITS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/limits.h" 3 4 # 38 "/usr/include/sys/limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/limits.h" 3 4 # 1 "/usr/include/machine/_limits.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 * $FreeBSD$ */ #ifndef _MACHINE__LIMITS_H_ #define _MACHINE__LIMITS_H_ /* * According to ANSI (section 2.2.4.2), the values below must be usable by * #if preprocessing directives. Additionally, the expression must have the * same type as would an expression that is an object of the corresponding * type converted according to the integral promotions. The subtraction for * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). */ #define __CHAR_BIT 8 /* number of bits in a char */ #define __SCHAR_MAX 0x7f /* max value for a signed char */ #define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ #define __UCHAR_MAX 0xff /* max value for an unsigned char */ #define __USHRT_MAX 0xffff /* max value for an unsigned short */ #define __SHRT_MAX 0x7fff /* max value for a short */ #define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ #define __UINT_MAX 0xffffffff /* max value for an unsigned int */ #define __INT_MAX 0x7fffffff /* max value for an int */ #define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ #ifdef __LP64__ #define __ULONG_MAX 0xffffffffffffffff #define __LONG_MAX 0x7fffffffffffffff #define __LONG_MIN (-0x7fffffffffffffff - 1) #define __LONG_BIT 64 #else # 68 "/usr/include/machine/_limits.h" 3 4 #define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ #define __LONG_MAX 0x7fffffffL /* max value for a long */ #define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */ #define __LONG_BIT 32 #endif # 73 "/usr/include/machine/_limits.h" 3 4 #define __ULLONG_MAX 0xffffffffffffffffULL #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ #define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ #ifdef __LP64__ #define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ #define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ #else # 82 "/usr/include/machine/_limits.h" 3 4 #define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ #define __SIZE_T_MAX __UINT_MAX /* max value for a size_t */ #endif # 85 "/usr/include/machine/_limits.h" 3 4 #define __OFF_MAX __LLONG_MAX /* max value for an off_t */ #define __OFF_MIN __LLONG_MIN /* min value for an off_t */ /* Quads and long longs are the same size. Ensure they stay in sync. */ #define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ #define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ #define __WORD_BIT 32 /* Minimum signal stack size. */ #define __MINSIGSTKSZ (512 * 4) #endif /* !_MACHINE__LIMITS_H_ */ # 100 "/usr/include/machine/_limits.h" 3 4 # 39 "/usr/include/sys/limits.h" 2 3 4 #define CHAR_BIT __CHAR_BIT /* number of bits in a char */ #define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */ #define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */ #define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */ #ifdef __CHAR_UNSIGNED__ #define CHAR_MAX UCHAR_MAX /* max value for a char */ #define CHAR_MIN 0 /* min value for a char */ #else # 51 "/usr/include/sys/limits.h" 3 4 #define CHAR_MAX SCHAR_MAX #define CHAR_MIN SCHAR_MIN #endif # 54 "/usr/include/sys/limits.h" 3 4 #define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */ #define SHRT_MAX __SHRT_MAX /* max value for a short */ #define SHRT_MIN __SHRT_MIN /* min value for a short */ #define UINT_MAX __UINT_MAX /* max value for an unsigned int */ #define INT_MAX __INT_MAX /* max value for an int */ #define INT_MIN __INT_MIN /* min value for an int */ #define ULONG_MAX __ULONG_MAX /* max for an unsigned long */ #define LONG_MAX __LONG_MAX /* max for a long */ #define LONG_MIN __LONG_MIN /* min for a long */ #ifdef __LONG_LONG_SUPPORTED #define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */ #define LLONG_MAX __LLONG_MAX /* max for a long long */ #define LLONG_MIN __LLONG_MIN /* min for a long long */ #endif # 72 "/usr/include/sys/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE || __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/include/sys/limits.h" 3 4 #define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */ #endif # 76 "/usr/include/sys/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 78 "/usr/include/sys/limits.h" 3 4 #define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */ #define OFF_MAX __OFF_MAX /* max value for an off_t */ #define OFF_MIN __OFF_MIN /* min value for an off_t */ #endif # 83 "/usr/include/sys/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 85 "/usr/include/sys/limits.h" 3 4 #define GID_MAX UINT_MAX /* max value for a gid_t */ #define UID_MAX UINT_MAX /* max value for a uid_t */ #define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */ #define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ #define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */ #endif # 92 "/usr/include/sys/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 94 "/usr/include/sys/limits.h" 3 4 #define LONG_BIT __LONG_BIT #define WORD_BIT __WORD_BIT #endif # 97 "/usr/include/sys/limits.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 99 "/usr/include/sys/limits.h" 3 4 #define MQ_PRIO_MAX 64 #endif # 101 "/usr/include/sys/limits.h" 3 4 #endif /* !_SYS_LIMITS_H_ */ # 103 "/usr/include/sys/limits.h" 3 4 # 144 "/usr/include/limits.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 146 "/usr/include/limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 146 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/syslimits.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 * $FreeBSD$ */ #ifndef _SYS_SYSLIMITS_H_ #define _SYS_SYSLIMITS_H_ #if 0 /* disabled by -frewrite-includes */ #if !defined(_STANDALONE) && !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 39 "/usr/include/sys/syslimits.h" 3 4 #ifndef _SYS_CDEFS_H_ #error this file needs sys/cdefs.h as a prerequisite #endif # 42 "/usr/include/sys/syslimits.h" 3 4 #ifdef __CC_SUPPORTS_WARNING #warning "No user-serviceable parts inside." #endif # 45 "/usr/include/sys/syslimits.h" 3 4 #endif # 46 "/usr/include/sys/syslimits.h" 3 4 /* * Do not add any new variables here. (See the comment at the end of * the file for why.) */ #ifndef __ILP32__ #define ARG_MAX (2 * 256 * 1024) /* max bytes for an exec function */ #else # 54 "/usr/include/sys/syslimits.h" 3 4 #define ARG_MAX (256 * 1024) /* max bytes for KVA-starved archs */ #endif # 56 "/usr/include/sys/syslimits.h" 3 4 #ifndef CHILD_MAX #define CHILD_MAX 40 /* max simultaneous processes */ #endif # 59 "/usr/include/sys/syslimits.h" 3 4 #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ #define NAME_MAX 255 /* max bytes in a file name */ #ifndef NGROUPS_MAX #define NGROUPS_MAX 1023 /* max supplemental group id's */ #endif # 65 "/usr/include/sys/syslimits.h" 3 4 #ifndef OPEN_MAX #define OPEN_MAX 64 /* max open files per process */ #endif # 68 "/usr/include/sys/syslimits.h" 3 4 #define PATH_MAX 1024 /* max bytes in pathname */ #define PIPE_BUF 512 /* max bytes for atomic pipe writes */ #define IOV_MAX 1024 /* max elements in i/o vector */ /* * We leave the following values undefined to force applications to either * assume conservative values or call sysconf() to get the current value. * * HOST_NAME_MAX * * (We should do this for most of the values currently defined here, * but many programs are not prepared to deal with this yet.) */ #endif # 82 "/usr/include/sys/syslimits.h" 3 4 # 147 "/usr/include/limits.h" 2 3 4 #endif # 148 "/usr/include/limits.h" 3 4 #endif /* !_LIMITS_H_ */ # 150 "/usr/include/limits.h" 3 4 # 29 "mpi/mpi.h" 2 #if 0 /* disabled by -frewrite-includes */ #if defined(BSDI) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "mpi/mpi.h" #undef ULLONG_MAX #endif # 33 "mpi/mpi.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "mpi/mpi.h" # 35 "mpi/mpi.h" #define MP_NEG 1 #define MP_ZPOS 0 #define MP_OKAY 0 /* no error, all is well */ #define MP_YES 0 /* yes (boolean result) */ #define MP_NO -1 /* no (boolean result) */ #define MP_MEM -2 /* out of memory */ #define MP_RANGE -3 /* argument out of range */ #define MP_BADARG -4 /* invalid parameter */ #define MP_UNDEF -5 /* answer is undefined */ #define MP_LAST_CODE MP_UNDEF typedef unsigned int mp_sign; typedef unsigned int mp_size; typedef int mp_err; #define MP_32BIT_MAX 4294967295U #if 0 /* disabled by -frewrite-includes */ #if !defined(ULONG_MAX) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 55 "mpi/mpi.h" #error "ULONG_MAX not defined" #if 0 /* disabled by -frewrite-includes */ #if 0 #elif !defined(UINT_MAX) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 57 "mpi/mpi.h" #error "UINT_MAX not defined" #if 0 /* disabled by -frewrite-includes */ #if 0 #elif !defined(USHRT_MAX) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 59 "mpi/mpi.h" #error "USHRT_MAX not defined" #endif # 61 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if defined(ULLONG_MAX) /* C99, Solaris */ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 63 "mpi/mpi.h" #define MP_ULONG_LONG_MAX ULLONG_MAX /* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */ #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(ULONG_LONG_MAX) /* HPUX */ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 66 "mpi/mpi.h" #define MP_ULONG_LONG_MAX ULONG_LONG_MAX #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(ULONGLONG_MAX) /* IRIX, AIX */ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 68 "mpi/mpi.h" #define MP_ULONG_LONG_MAX ULONGLONG_MAX #endif # 70 "mpi/mpi.h" /* We only use unsigned long for mp_digit iff long is more than 32 bits. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(MP_USE_UINT_DIGIT) && ULONG_MAX > MP_32BIT_MAX #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "mpi/mpi.h" typedef unsigned long mp_digit; #define MP_DIGIT_MAX ULONG_MAX #define MP_DIGIT_FMT "%016lX" /* printf() format for 1 digit */ #define MP_HALF_DIGIT_MAX UINT_MAX #undef MP_NO_MP_WORD #define MP_NO_MP_WORD 1 #undef MP_USE_LONG_DIGIT #define MP_USE_LONG_DIGIT 1 #undef MP_USE_LONG_LONG_DIGIT #if 0 /* disabled by -frewrite-includes */ #if 0 #elif !defined(MP_USE_UINT_DIGIT) && defined(MP_ULONG_LONG_MAX) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 84 "mpi/mpi.h" typedef unsigned long long mp_digit; #define MP_DIGIT_MAX MP_ULONG_LONG_MAX #define MP_DIGIT_FMT "%016llX" /* printf() format for 1 digit */ #define MP_HALF_DIGIT_MAX UINT_MAX #undef MP_NO_MP_WORD #define MP_NO_MP_WORD 1 #undef MP_USE_LONG_LONG_DIGIT #define MP_USE_LONG_LONG_DIGIT 1 #undef MP_USE_LONG_DIGIT #else # 95 "mpi/mpi.h" typedef unsigned int mp_digit; #define MP_DIGIT_MAX UINT_MAX #define MP_DIGIT_FMT "%08X" /* printf() format for 1 digit */ #define MP_HALF_DIGIT_MAX USHRT_MAX #undef MP_USE_UINT_DIGIT #define MP_USE_UINT_DIGIT 1 #undef MP_USE_LONG_LONG_DIGIT #undef MP_USE_LONG_DIGIT #endif # 104 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if !defined(MP_NO_MP_WORD) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 106 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if defined(MP_USE_UINT_DIGIT) && \ (defined(MP_ULONG_LONG_MAX) || (ULONG_MAX > UINT_MAX)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if (ULONG_MAX > UINT_MAX) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 110 "mpi/mpi.h" typedef unsigned long mp_word; typedef long mp_sword; #define MP_WORD_MAX ULONG_MAX #else # 115 "mpi/mpi.h" typedef unsigned long long mp_word; typedef long long mp_sword; #define MP_WORD_MAX MP_ULONG_LONG_MAX #endif # 119 "mpi/mpi.h" #else # 121 "mpi/mpi.h" #define MP_NO_MP_WORD 1 #endif # 123 "mpi/mpi.h" #endif /* !defined(MP_NO_MP_WORD) */ # 124 "mpi/mpi.h" #if 0 /* disabled by -frewrite-includes */ #if !defined(MP_WORD_MAX) && defined(MP_DEFINE_SMALL_WORD) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 126 "mpi/mpi.h" typedef unsigned int mp_word; typedef int mp_sword; #define MP_WORD_MAX UINT_MAX #endif # 130 "mpi/mpi.h" #define MP_DIGIT_SIZE sizeof(mp_digit) #define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE) #define MP_WORD_BIT (CHAR_BIT * sizeof(mp_word)) #define MP_RADIX (1 + (mp_word)MP_DIGIT_MAX) #define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2) #define MP_HALF_RADIX (1 + (mp_digit)MP_HALF_DIGIT_MAX) /* MP_HALF_RADIX really ought to be called MP_SQRT_RADIX, but it's named ** MP_HALF_RADIX because it's the radix for MP_HALF_DIGITs, and it's ** consistent with the other _HALF_ names. */ /* Macros for accessing the mp_int internals */ #define MP_SIGN(MP) ((MP)->sign) #define MP_USED(MP) ((MP)->used) #define MP_ALLOC(MP) ((MP)->alloc) #define MP_DIGITS(MP) ((MP)->dp) #define MP_DIGIT(MP, N) (MP)->dp[(N)] /* This defines the maximum I/O base (minimum is 2) */ #define MP_MAX_RADIX 64 typedef struct { mp_sign sign; /* sign of this quantity */ mp_size alloc; /* how many digits allocated */ mp_size used; /* how many digits used */ mp_digit *dp; /* the digits themselves */ } mp_int; /* Default precision */ mp_size mp_get_prec(void); void mp_set_prec(mp_size prec); /* Memory management */ mp_err mp_init(mp_int *mp); mp_err mp_init_size(mp_int *mp, mp_size prec); mp_err mp_init_copy(mp_int *mp, const mp_int *from); mp_err mp_copy(const mp_int *from, mp_int *to); void mp_exch(mp_int *mp1, mp_int *mp2); void mp_clear(mp_int *mp); void mp_zero(mp_int *mp); void mp_set(mp_int *mp, mp_digit d); mp_err mp_set_int(mp_int *mp, long z); #define mp_set_long(mp, z) mp_set_int(mp, z) mp_err mp_set_ulong(mp_int *mp, unsigned long z); /* Single digit arithmetic */ mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b); mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b); mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b); mp_err mp_mul_2(const mp_int *a, mp_int *c); mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r); mp_err mp_div_2(const mp_int *a, mp_int *c); mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c); /* Sign manipulations */ mp_err mp_abs(const mp_int *a, mp_int *b); mp_err mp_neg(const mp_int *a, mp_int *b); /* Full arithmetic */ mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c); mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c); mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int *c); #if 0 /* disabled by -frewrite-includes */ #if MP_SQUARE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 195 "mpi/mpi.h" mp_err mp_sqr(const mp_int *a, mp_int *b); #else # 197 "mpi/mpi.h" #define mp_sqr(a, b) mp_mul(a, a, b) #endif # 199 "mpi/mpi.h" mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r); mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r); mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c); mp_err mp_2expt(mp_int *a, mp_digit k); /* Modular arithmetic */ #if 0 /* disabled by -frewrite-includes */ #if MP_MODARITH #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 206 "mpi/mpi.h" mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c); mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c); mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); #if 0 /* disabled by -frewrite-includes */ #if MP_SQUARE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 212 "mpi/mpi.h" mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c); #else # 214 "mpi/mpi.h" #define mp_sqrmod(a, m, c) mp_mulmod(a, a, m, c) #endif # 216 "mpi/mpi.h" mp_err mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c); #endif /* MP_MODARITH */ # 219 "mpi/mpi.h" /* Comparisons */ int mp_cmp_z(const mp_int *a); int mp_cmp_d(const mp_int *a, mp_digit d); int mp_cmp(const mp_int *a, const mp_int *b); int mp_cmp_mag(const mp_int *a, const mp_int *b); int mp_isodd(const mp_int *a); int mp_iseven(const mp_int *a); /* Number theoretic */ mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c); mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c); mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y); mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c); mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c); /* Input and output */ #if 0 /* disabled by -frewrite-includes */ #if MP_IOFUNC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 237 "mpi/mpi.h" void mp_print(mp_int *mp, FILE *ofp); #endif /* end MP_IOFUNC */ # 239 "mpi/mpi.h" /* Base conversion */ mp_err mp_read_raw(mp_int *mp, char *str, int len); int mp_raw_size(mp_int *mp); mp_err mp_toraw(mp_int *mp, char *str); mp_err mp_read_radix(mp_int *mp, const char *str, int radix); mp_err mp_read_variable_radix(mp_int *a, const char *str, int default_radix); int mp_radix_size(mp_int *mp, int radix); mp_err mp_toradix(mp_int *mp, char *str, int radix); int mp_tovalue(char ch, int r); #define mp_tobinary(M, S) mp_toradix((M), (S), 2) #define mp_tooctal(M, S) mp_toradix((M), (S), 8) #define mp_todecimal(M, S) mp_toradix((M), (S), 10) #define mp_tohex(M, S) mp_toradix((M), (S), 16) /* Error strings */ const char *mp_strerror(mp_err ec); /* Octet string conversion functions */ mp_err mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len); unsigned int mp_unsigned_octet_size(const mp_int *mp); mp_err mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen); mp_err mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen); mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size len); /* Miscellaneous */ mp_size mp_trailing_zeros(const mp_int *mp); void freebl_cpuid(unsigned long op, unsigned long *eax, unsigned long *ebx, unsigned long *ecx, unsigned long *edx); #define MP_CHECKOK(x) \ if (MP_OKAY > (res = (x))) \ goto CLEANUP #define MP_CHECKERR(x) \ if (MP_OKAY > (res = (x))) \ goto CLEANUP #define NEG MP_NEG #define ZPOS MP_ZPOS #define DIGIT_MAX MP_DIGIT_MAX #define DIGIT_BIT MP_DIGIT_BIT #define DIGIT_FMT MP_DIGIT_FMT #define RADIX MP_RADIX #define MAX_RADIX MP_MAX_RADIX #define SIGN(MP) MP_SIGN(MP) #define USED(MP) MP_USED(MP) #define ALLOC(MP) MP_ALLOC(MP) #define DIGITS(MP) MP_DIGITS(MP) #define DIGIT(MP, N) MP_DIGIT(MP, N) /* Functions which return an mp_err value will NULL-check their arguments via * ARGCHK(condition, return), where the caller is responsible for checking the * mp_err return code. For functions that return an integer type, the caller * has no way to tell if the value is an error code or a legitimate value. * Therefore, ARGMPCHK(condition) will trigger an assertion failure on debug * builds, but no-op in optimized builds. */ #if 0 /* disabled by -frewrite-includes */ #if MP_ARGCHK == 1 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 298 "mpi/mpi.h" #define ARGMPCHK(X) /* */ #define ARGCHK(X, Y) \ { \ if (!(X)) { \ return (Y); \ } \ } #if 0 /* disabled by -frewrite-includes */ #if 0 #elif MP_ARGCHK == 2 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 306 "mpi/mpi.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 306 "mpi/mpi.h" # 307 "mpi/mpi.h" #define ARGMPCHK(X) assert(X) #define ARGCHK(X, Y) assert(X) #else # 310 "mpi/mpi.h" #define ARGMPCHK(X) /* */ #define ARGCHK(X, Y) /* */ #endif # 313 "mpi/mpi.h" #ifdef CT_VERIF void mp_taint(mp_int *mp); void mp_untaint(mp_int *mp); #endif # 318 "mpi/mpi.h" SEC_END_PROTOS #endif /* end _H_MPI_ */ # 322 "mpi/mpi.h" # 13 "./blapii.h" 2 /* max block size of supported block ciphers */ #define MAX_BLOCK_SIZE 16 typedef SECStatus (*freeblCipherFunc)(void *cx, unsigned char *output, unsigned int *outputLen, unsigned int maxOutputLen, const unsigned char *input, unsigned int inputLen, unsigned int blocksize); typedef void (*freeblDestroyFunc)(void *cx, PRBool freeit); SEC_BEGIN_PROTOS #ifndef NSS_FIPS_DISABLED SECStatus BL_FIPSEntryOK(PRBool freeblOnly); PRBool BL_POSTRan(PRBool freeblOnly); #endif # 29 "./blapii.h" #if 0 /* disabled by -frewrite-includes */ #if defined(XP_UNIX) && !defined(NO_FORK_CHECK) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "./blapii.h" extern PRBool bl_parentForkedAfterC_Initialize; #define SKIP_AFTER_FORK(x) \ if (!bl_parentForkedAfterC_Initialize) \ x #else # 39 "./blapii.h" #define SKIP_AFTER_FORK(x) x #endif # 43 "./blapii.h" SEC_END_PROTOS #if 0 /* disabled by -frewrite-includes */ #if defined(NSS_X86_OR_X64) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 47 "./blapii.h" #define HAVE_UNALIGNED_ACCESS 1 #endif # 49 "./blapii.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "./blapii.h" #define HAVE_NO_SANITIZE_ATTR __has_attribute(no_sanitize) #else # 53 "./blapii.h" #define HAVE_NO_SANITIZE_ATTR 0 #endif # 55 "./blapii.h" /* Alignment helpers. */ #if 0 /* disabled by -frewrite-includes */ #if defined(_WINDOWS) && defined(NSS_X86_OR_X64) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "./blapii.h" #define pre_align __declspec(align(16)) #define post_align #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(NSS_X86_OR_X64) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 61 "./blapii.h" #define pre_align #define post_align __attribute__((aligned(16))) #else # 64 "./blapii.h" #define pre_align #define post_align #endif # 67 "./blapii.h" #if 0 /* disabled by -frewrite-includes */ #if defined(HAVE_UNALIGNED_ACCESS) && HAVE_NO_SANITIZE_ATTR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "./blapii.h" #define NO_SANITIZE_ALIGNMENT __attribute__((no_sanitize("alignment"))) #else # 71 "./blapii.h" #define NO_SANITIZE_ALIGNMENT #endif # 73 "./blapii.h" #undef HAVE_NO_SANITIZE_ATTR SECStatus RSA_Init(); SECStatus generate_prime(mp_int *prime, int primeLen); /* Freebl state. */ PRBool aesni_support(); PRBool clmul_support(); PRBool avx_support(); PRBool ssse3_support(); PRBool sse4_1_support(); PRBool sse4_2_support(); PRBool arm_neon_support(); PRBool arm_aes_support(); PRBool arm_pmull_support(); PRBool arm_sha1_support(); PRBool arm_sha2_support(); PRBool ppc_crypto_support(); #endif /* _BLAPII_H_ */ # 94 "./blapii.h" # 11 "gcm.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "blapit.h" #endif /* expanded by -frewrite-includes */ # 11 "gcm.c" # 12 "gcm.c" #if 0 /* expanded by -frewrite-includes */ #include "gcm.h" #endif /* expanded by -frewrite-includes */ # 12 "gcm.c" # 1 "./gcm.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef GCM_H #define GCM_H 1 #if 0 /* expanded by -frewrite-includes */ #include "blapii.h" #endif /* expanded by -frewrite-includes */ # 8 "./gcm.h" # 9 "./gcm.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 9 "./gcm.h" # 10 "./gcm.h" #ifdef NSS_X86_OR_X64 /* GCC <= 4.8 doesn't support including emmintrin.h without enabling SSE2 */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__clang__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \ (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 15 "./gcm.h" #pragma GCC push_options #pragma GCC target("sse2") #undef NSS_DISABLE_SSE2 #define NSS_DISABLE_SSE2 1 #endif /* GCC <= 4.8 */ # 20 "./gcm.h" #if 0 /* expanded by -frewrite-includes */ #include /* __m128i */ #endif /* expanded by -frewrite-includes */ # 21 "./gcm.h" # 22 "./gcm.h" #ifdef NSS_DISABLE_SSE2 #undef NSS_DISABLE_SSE2 #pragma GCC pop_options #endif /* NSS_DISABLE_SSE2 */ # 27 "./gcm.h" #endif # 28 "./gcm.h" #ifdef __aarch64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "./gcm.h" # 31 "./gcm.h" #endif # 32 "./gcm.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "./gcm.h" #if 0 /* expanded by -frewrite-includes */ #include "altivec-types.h" #endif /* expanded by -frewrite-includes */ # 34 "./gcm.h" # 1 "./altivec-types.h" 1 /* * altivec-types.h - shorter vector typedefs * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _ALTIVEC_TYPES_H_ #define _ALTIVEC_TYPES_H_ 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "./altivec-types.h" # 1 "/usr/lib/clang/10.0.0/include/altivec.h" 1 3 4 /*===---- altivec.h - Standard header for type generic math ---------------===*\ * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * \*===----------------------------------------------------------------------===*/ #ifndef __ALTIVEC_H #define __ALTIVEC_H #ifndef __ALTIVEC__ #error "AltiVec support not enabled" #endif # 15 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* Constants for mapping CR6 bits to predicate result. */ #define __CR6_EQ 0 #define __CR6_EQ_REV 1 #define __CR6_LT 2 #define __CR6_LT_REV 3 /* Constants for vec_test_data_class */ #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0) #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1) #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \ __VEC_CLASS_FP_SUBNORMAL_N) #define __VEC_CLASS_FP_ZERO_N (1<<2) #define __VEC_CLASS_FP_ZERO_P (1<<3) #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \ __VEC_CLASS_FP_ZERO_N) #define __VEC_CLASS_FP_INFINITY_N (1<<4) #define __VEC_CLASS_FP_INFINITY_P (1<<5) #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \ __VEC_CLASS_FP_INFINITY_N) #define __VEC_CLASS_FP_NAN (1<<6) #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \ __VEC_CLASS_FP_SUBNORMAL | \ __VEC_CLASS_FP_ZERO | \ __VEC_CLASS_FP_INFINITY) #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) #ifdef __POWER9_VECTOR__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 # 46 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #endif # 47 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed char __ATTRS_o_ai vec_perm( vector signed char __a, vector signed char __b, vector unsigned char __c); static __inline__ vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c); static __inline__ vector bool char __ATTRS_o_ai vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c); static __inline__ vector short __ATTRS_o_ai vec_perm(vector signed short __a, vector signed short __b, vector unsigned char __c); static __inline__ vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a, vector unsigned short __b, vector unsigned char __c); static __inline__ vector bool short __ATTRS_o_ai vec_perm( vector bool short __a, vector bool short __b, vector unsigned char __c); static __inline__ vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c); static __inline__ vector int __ATTRS_o_ai vec_perm(vector signed int __a, vector signed int __b, vector unsigned char __c); static __inline__ vector unsigned int __ATTRS_o_ai vec_perm( vector unsigned int __a, vector unsigned int __b, vector unsigned char __c); static __inline__ vector bool int __ATTRS_o_ai vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c); static __inline__ vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b, vector unsigned char __c); #ifdef __VSX__ static __inline__ vector long long __ATTRS_o_ai vec_perm(vector signed long long __a, vector signed long long __b, vector unsigned char __c); static __inline__ vector unsigned long long __ATTRS_o_ai vec_perm(vector unsigned long long __a, vector unsigned long long __b, vector unsigned char __c); static __inline__ vector bool long long __ATTRS_o_ai vec_perm(vector bool long long __a, vector bool long long __b, vector unsigned char __c); static __inline__ vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b, vector unsigned char __c); #endif # 104 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b); /* vec_abs */ #define __builtin_altivec_abs_v16qi vec_abs #define __builtin_altivec_abs_v8hi vec_abs #define __builtin_altivec_abs_v4si vec_abs static __inline__ vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) { return __builtin_altivec_vmaxsb(__a, -__a); } static __inline__ vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) { return __builtin_altivec_vmaxsh(__a, -__a); } static __inline__ vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) { return __builtin_altivec_vmaxsw(__a, -__a); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 130 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed long long __ATTRS_o_ai vec_abs(vector signed long long __a) { return __builtin_altivec_vmaxsd(__a, -__a); } #endif # 135 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_abs(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvabssp(__a); #else # 140 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF); return (vector float)__res; #endif # 144 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_abs(vector double __a) { return __builtin_vsx_xvabsdp(__a); } #endif # 151 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_abss */ #define __builtin_altivec_abss_v16qi vec_abss #define __builtin_altivec_abss_v8hi vec_abss #define __builtin_altivec_abss_v4si vec_abss static __inline__ vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) { return __builtin_altivec_vmaxsb( __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a)); } static __inline__ vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) { return __builtin_altivec_vmaxsh( __a, __builtin_altivec_vsubshs((vector signed short)(0), __a)); } static __inline__ vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) { return __builtin_altivec_vmaxsw( __a, __builtin_altivec_vsubsws((vector signed int)(0), __a)); } /* vec_absd */ #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER9_VECTOR__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 177 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_absd(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vabsdub(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_absd(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vabsduh(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_absd(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vabsduw(__a, __b); } #endif /* End __POWER9_VECTOR__ */ # 194 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_add */ static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b) { return __a + __b; } static __inline__ vector signed char __ATTRS_o_ai vec_add(vector bool char __a, vector signed char __b) { return (vector signed char)__a + __b; } static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector bool char __b) { return __a + (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a, vector unsigned char __b) { return __a + __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a + __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a, vector bool char __b) { return __a + (vector unsigned char)__b; } static __inline__ vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) { return __a + __b; } static __inline__ vector short __ATTRS_o_ai vec_add(vector bool short __a, vector short __b) { return (vector short)__a + __b; } static __inline__ vector short __ATTRS_o_ai vec_add(vector short __a, vector bool short __b) { return __a + (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a, vector unsigned short __b) { return __a + __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a + __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a, vector bool short __b) { return __a + (vector unsigned short)__b; } static __inline__ vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) { return __a + __b; } static __inline__ vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) { return (vector int)__a + __b; } static __inline__ vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) { return __a + (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a, vector unsigned int __b) { return __a + __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a + __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a, vector bool int __b) { return __a + (vector unsigned int)__b; } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 288 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed long long __ATTRS_o_ai vec_add(vector signed long long __a, vector signed long long __b) { return __a + __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_add(vector unsigned long long __a, vector unsigned long long __b) { return __a + __b; } static __inline__ vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a, vector signed __int128 __b) { return __a + __b; } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a + __b; } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 308 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) { return __a + __b; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_add(vector double __a, vector double __b) { return __a + __b; } #endif // __VSX__ # 320 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_adde */ #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 324 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_adde(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vaddeuqm(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_adde(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vaddeuqm(__a, __b, __c); } #endif # 336 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed int __ATTRS_o_ai vec_adde(vector signed int __a, vector signed int __b, vector signed int __c) { vector signed int __mask = {1, 1, 1, 1}; vector signed int __carry = __c & __mask; return vec_add(vec_add(__a, __b), __carry); } static __inline__ vector unsigned int __ATTRS_o_ai vec_adde(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { vector unsigned int __mask = {1, 1, 1, 1}; vector unsigned int __carry = __c & __mask; return vec_add(vec_add(__a, __b), __carry); } /* vec_addec */ #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 356 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_addec(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vaddecuq(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_addec(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vaddecuq(__a, __b, __c); } static __inline__ vector signed int __ATTRS_o_ai vec_addec(vector signed int __a, vector signed int __b, vector signed int __c) { signed int __result[4]; for (int i = 0; i < 4; i++) { unsigned int __tempa = (unsigned int) __a[i]; unsigned int __tempb = (unsigned int) __b[i]; unsigned int __tempc = (unsigned int) __c[i]; __tempc = __tempc & 0x00000001; unsigned long long __longa = (unsigned long long) __tempa; unsigned long long __longb = (unsigned long long) __tempb; unsigned long long __longc = (unsigned long long) __tempc; unsigned long long __sum = __longa + __longb + __longc; unsigned long long __res = (__sum >> 32) & 0x01; unsigned long long __tempres = (unsigned int) __res; __result[i] = (signed int) __tempres; } vector signed int ret = { __result[0], __result[1], __result[2], __result[3] }; return ret; } static __inline__ vector unsigned int __ATTRS_o_ai vec_addec(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { unsigned int __result[4]; for (int i = 0; i < 4; i++) { unsigned int __tempc = __c[i] & 1; unsigned long long __longa = (unsigned long long) __a[i]; unsigned long long __longb = (unsigned long long) __b[i]; unsigned long long __longc = (unsigned long long) __tempc; unsigned long long __sum = __longa + __longb + __longc; unsigned long long __res = (__sum >> 32) & 0x01; unsigned long long __tempres = (unsigned int) __res; __result[i] = (signed int) __tempres; } vector unsigned int ret = { __result[0], __result[1], __result[2], __result[3] }; return ret; } #endif # 412 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vaddubm */ #define __builtin_altivec_vaddubm vec_vaddubm static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector signed char __b) { return __a + __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a, vector signed char __b) { return (vector signed char)__a + __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector bool char __b) { return __a + (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a, vector unsigned char __b) { return __a + __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a + __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a, vector bool char __b) { return __a + (vector unsigned char)__b; } /* vec_vadduhm */ #define __builtin_altivec_vadduhm vec_vadduhm static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector short __b) { return __a + __b; } static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a, vector short __b) { return (vector short)__a + __b; } static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector bool short __b) { return __a + (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a, vector unsigned short __b) { return __a + __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhm(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a + __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a, vector bool short __b) { return __a + (vector unsigned short)__b; } /* vec_vadduwm */ #define __builtin_altivec_vadduwm vec_vadduwm static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) { return __a + __b; } static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a, vector int __b) { return (vector int)__a + __b; } static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector bool int __b) { return __a + (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a, vector unsigned int __b) { return __a + __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a + __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a, vector bool int __b) { return __a + (vector unsigned int)__b; } /* vec_vaddfp */ #define __builtin_altivec_vaddfp vec_vaddfp static __inline__ vector float __attribute__((__always_inline__)) vec_vaddfp(vector float __a, vector float __b) { return __a + __b; } /* vec_addc */ static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b) { return (vector signed int)__builtin_altivec_vaddcuw((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vaddcuw(__a, __b); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 538 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_addc(vector signed __int128 __a, vector signed __int128 __b) { return (vector signed __int128)__builtin_altivec_vaddcuq( (vector unsigned __int128)__a, (vector unsigned __int128)__b); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vaddcuq(__a, __b); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 549 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vaddcuw */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vaddcuw(__a, __b); } /* vec_adds */ static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector signed char __b) { return __builtin_altivec_vaddsbs(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector bool char __a, vector signed char __b) { return __builtin_altivec_vaddsbs((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector bool char __b) { return __builtin_altivec_vaddsbs(__a, (vector signed char)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vaddubs(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vaddubs((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b); } static __inline__ vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) { return __builtin_altivec_vaddshs(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_adds(vector bool short __a, vector short __b) { return __builtin_altivec_vaddshs((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_adds(vector short __a, vector bool short __b) { return __builtin_altivec_vaddshs(__a, (vector short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b); } static __inline__ vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) { return __builtin_altivec_vaddsws(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) { return __builtin_altivec_vaddsws((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_adds(vector int __a, vector bool int __b) { return __builtin_altivec_vaddsws(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vadduws(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vadduws((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vadduws(__a, (vector unsigned int)__b); } /* vec_vaddsbs */ static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector signed char __b) { return __builtin_altivec_vaddsbs(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a, vector signed char __b) { return __builtin_altivec_vaddsbs((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector bool char __b) { return __builtin_altivec_vaddsbs(__a, (vector signed char)__b); } /* vec_vaddubs */ static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vaddubs(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vaddubs((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b); } /* vec_vaddshs */ static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b) { return __builtin_altivec_vaddshs(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a, vector short __b) { return __builtin_altivec_vaddshs((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector bool short __b) { return __builtin_altivec_vaddshs(__a, (vector short)__b); } /* vec_vadduhs */ static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vadduhs((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b); } /* vec_vaddsws */ static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) { return __builtin_altivec_vaddsws(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a, vector int __b) { return __builtin_altivec_vaddsws((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector bool int __b) { return __builtin_altivec_vaddsws(__a, (vector int)__b); } /* vec_vadduws */ static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vadduws(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vadduws((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vadduws(__a, (vector unsigned int)__b); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 752 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vadduqm */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) { return __a + __b; } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a + __b; } /* vec_vaddeuqm */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vaddeuqm(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vaddeuqm(__a, __b, __c); } /* vec_vaddcuq */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vaddcuq(__a, __b); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vaddcuq(__a, __b); } /* vec_vaddecuq */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vaddecuq(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vaddecuq(__a, __b, __c); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 804 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_and */ #define __builtin_altivec_vand vec_and static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector signed char __b) { return __a & __b; } static __inline__ vector signed char __ATTRS_o_ai vec_and(vector bool char __a, vector signed char __b) { return (vector signed char)__a & __b; } static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector bool char __b) { return __a & (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a, vector unsigned char __b) { return __a & __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a & __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a, vector bool char __b) { return __a & (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_and(vector bool char __a, vector bool char __b) { return __a & __b; } static __inline__ vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) { return __a & __b; } static __inline__ vector short __ATTRS_o_ai vec_and(vector bool short __a, vector short __b) { return (vector short)__a & __b; } static __inline__ vector short __ATTRS_o_ai vec_and(vector short __a, vector bool short __b) { return __a & (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a, vector unsigned short __b) { return __a & __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a & __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a, vector bool short __b) { return __a & (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_and(vector bool short __a, vector bool short __b) { return __a & __b; } static __inline__ vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) { return __a & __b; } static __inline__ vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) { return (vector int)__a & __b; } static __inline__ vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) { return __a & (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a, vector unsigned int __b) { return __a & __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a & __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a, vector bool int __b) { return __a & (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_and(vector bool int __a, vector bool int __b) { return __a & __b; } static __inline__ vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_and(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_and(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_and(vector bool long long __a, vector double __b) { vector unsigned long long __res = (vector unsigned long long)__a & (vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector double __ATTRS_o_ai vec_and(vector double __a, vector bool long long __b) { vector unsigned long long __res = (vector unsigned long long)__a & (vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector double __ATTRS_o_ai vec_and(vector double __a, vector double __b) { vector unsigned long long __res = (vector unsigned long long)__a & (vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a, vector signed long long __b) { return __a & __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_and(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a & __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a, vector bool long long __b) { return __a & (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_and(vector unsigned long long __a, vector unsigned long long __b) { return __a & __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_and(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a & __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_and(vector unsigned long long __a, vector bool long long __b) { return __a & (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a, vector bool long long __b) { return __a & __b; } #endif # 992 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vand */ static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, vector signed char __b) { return __a & __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector bool char __a, vector signed char __b) { return (vector signed char)__a & __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, vector bool char __b) { return __a & (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a, vector unsigned char __b) { return __a & __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a & __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a, vector bool char __b) { return __a & (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_vand(vector bool char __a, vector bool char __b) { return __a & __b; } static __inline__ vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) { return __a & __b; } static __inline__ vector short __ATTRS_o_ai vec_vand(vector bool short __a, vector short __b) { return (vector short)__a & __b; } static __inline__ vector short __ATTRS_o_ai vec_vand(vector short __a, vector bool short __b) { return __a & (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a, vector unsigned short __b) { return __a & __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a & __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a, vector bool short __b) { return __a & (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_vand(vector bool short __a, vector bool short __b) { return __a & __b; } static __inline__ vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) { return __a & __b; } static __inline__ vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) { return (vector int)__a & __b; } static __inline__ vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) { return __a & (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a, vector unsigned int __b) { return __a & __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a & __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a, vector bool int __b) { return __a & (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_vand(vector bool int __a, vector bool int __b) { return __a & __b; } static __inline__ vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vand(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vand(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_vand(vector signed long long __a, vector signed long long __b) { return __a & __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vand(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a & __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vand(vector signed long long __a, vector bool long long __b) { return __a & (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vand(vector unsigned long long __a, vector unsigned long long __b) { return __a & __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vand(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a & __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vand(vector unsigned long long __a, vector bool long long __b) { return __a & (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a, vector bool long long __b) { return __a & __b; } #endif # 1157 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_andc */ #define __builtin_altivec_vandc vec_andc static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b) { return __a & ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector bool char __a, vector signed char __b) { return (vector signed char)__a & ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector bool char __b) { return __a & ~(vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a, vector unsigned char __b) { return __a & ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a & ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a, vector bool char __b) { return __a & ~(vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_andc(vector bool char __a, vector bool char __b) { return __a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) { return __a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_andc(vector bool short __a, vector short __b) { return (vector short)__a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_andc(vector short __a, vector bool short __b) { return __a & ~(vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a, vector unsigned short __b) { return __a & ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a & ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a, vector bool short __b) { return __a & ~(vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_andc(vector bool short __a, vector bool short __b) { return __a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) { return __a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) { return (vector int)__a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) { return __a & ~(vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a, vector unsigned int __b) { return __a & ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a & ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a, vector bool int __b) { return __a & ~(vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_andc(vector bool int __a, vector bool int __b) { return __a & ~__b; } static __inline__ vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_andc(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_andc(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_andc(vector bool long long __a, vector double __b) { vector unsigned long long __res = (vector unsigned long long)__a & ~(vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector double __ATTRS_o_ai vec_andc(vector double __a, vector bool long long __b) { vector unsigned long long __res = (vector unsigned long long)__a & ~(vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector double __ATTRS_o_ai vec_andc(vector double __a, vector double __b) { vector unsigned long long __res = (vector unsigned long long)__a & ~(vector unsigned long long)__b; return (vector double)__res; } static __inline__ vector signed long long __ATTRS_o_ai vec_andc(vector signed long long __a, vector signed long long __b) { return __a & ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_andc(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a & ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_andc(vector signed long long __a, vector bool long long __b) { return __a & ~(vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_andc(vector unsigned long long __a, vector unsigned long long __b) { return __a & ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_andc(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a & ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_andc(vector unsigned long long __a, vector bool long long __b) { return __a & ~(vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a, vector bool long long __b) { return __a & ~__b; } #endif # 1345 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vandc */ static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, vector signed char __b) { return __a & ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a, vector signed char __b) { return (vector signed char)__a & ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, vector bool char __b) { return __a & ~(vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a, vector unsigned char __b) { return __a & ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a & ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a, vector bool char __b) { return __a & ~(vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a, vector bool char __b) { return __a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) { return __a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_vandc(vector bool short __a, vector short __b) { return (vector short)__a & ~__b; } static __inline__ vector short __ATTRS_o_ai vec_vandc(vector short __a, vector bool short __b) { return __a & ~(vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a, vector unsigned short __b) { return __a & ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a & ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a, vector bool short __b) { return __a & ~(vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a, vector bool short __b) { return __a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) { return __a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) { return (vector int)__a & ~__b; } static __inline__ vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) { return __a & ~(vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a, vector unsigned int __b) { return __a & ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a & ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a, vector bool int __b) { return __a & ~(vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a, vector bool int __b) { return __a & ~__b; } static __inline__ vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vandc(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vandc(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_vandc(vector signed long long __a, vector signed long long __b) { return __a & ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vandc(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a & ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vandc(vector signed long long __a, vector bool long long __b) { return __a & ~(vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vandc(vector unsigned long long __a, vector unsigned long long __b) { return __a & ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vandc(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a & ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vandc(vector unsigned long long __a, vector bool long long __b) { return __a & ~(vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a, vector bool long long __b) { return __a & ~__b; } #endif # 1510 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_avg */ static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b) { return __builtin_altivec_vavgsb(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vavgub(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) { return __builtin_altivec_vavgsh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vavguh(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) { return __builtin_altivec_vavgsw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vavguw(__a, __b); } /* vec_vavgsb */ static __inline__ vector signed char __attribute__((__always_inline__)) vec_vavgsb(vector signed char __a, vector signed char __b) { return __builtin_altivec_vavgsb(__a, __b); } /* vec_vavgub */ static __inline__ vector unsigned char __attribute__((__always_inline__)) vec_vavgub(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vavgub(__a, __b); } /* vec_vavgsh */ static __inline__ vector short __attribute__((__always_inline__)) vec_vavgsh(vector short __a, vector short __b) { return __builtin_altivec_vavgsh(__a, __b); } /* vec_vavguh */ static __inline__ vector unsigned short __attribute__((__always_inline__)) vec_vavguh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vavguh(__a, __b); } /* vec_vavgsw */ static __inline__ vector int __attribute__((__always_inline__)) vec_vavgsw(vector int __a, vector int __b) { return __builtin_altivec_vavgsw(__a, __b); } /* vec_vavguw */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vavguw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vavguw(__a, __b); } /* vec_ceil */ static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvrspip(__a); #else # 1591 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrfip(__a); #endif # 1593 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_ceil(vector double __a) { return __builtin_vsx_xvrdpip(__a); } #endif # 1600 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrfip */ static __inline__ vector float __attribute__((__always_inline__)) vec_vrfip(vector float __a) { return __builtin_altivec_vrfip(__a); } /* vec_cmpb */ static __inline__ vector int __attribute__((__always_inline__)) vec_cmpb(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp(__a, __b); } /* vec_vcmpbfp */ static __inline__ vector int __attribute__((__always_inline__)) vec_vcmpbfp(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp(__a, __b); } /* vec_cmpeq */ static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a, (vector char)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a, (vector char)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector bool char __a, vector bool char __b) { return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a, (vector char)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a, vector short __b) { return (vector bool short)__builtin_altivec_vcmpequh(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a, (vector short)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpeq(vector bool short __a, vector bool short __b) { return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a, (vector short)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpequw(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector bool int __a, vector bool int __b) { return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a, (vector int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpeq(vector signed long long __a, vector signed long long __b) { return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) { return (vector bool long long)__builtin_altivec_vcmpequd( (vector long long)__a, (vector long long)__b); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpeq(vector bool long long __a, vector bool long long __b) { return (vector bool long long)__builtin_altivec_vcmpequd( (vector long long)__a, (vector long long)__b); } #endif # 1695 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a, vector float __b) { #ifdef __VSX__ return (vector bool int)__builtin_vsx_xvcmpeqsp(__a, __b); #else # 1701 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b); #endif # 1703 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpeq(vector double __a, vector double __b) { return (vector bool long long)__builtin_vsx_xvcmpeqdp(__a, __b); } #endif # 1711 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER9_VECTOR__ /* vec_cmpne */ static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector bool char __a, vector bool char __b) { return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a, (vector char)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a, (vector char)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a, (vector char)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpne(vector bool short __a, vector bool short __b) { return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a, (vector short)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpne(vector signed short __a, vector signed short __b) { return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a, (vector short)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpne(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a, (vector short)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpne(vector bool int __a, vector bool int __b) { return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpne(vector signed int __a, vector signed int __b) { return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpne(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a, (vector int)__b); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpne(vector bool long long __a, vector bool long long __b) { return (vector bool long long) ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpne(vector signed long long __a, vector signed long long __b) { return (vector bool long long) ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpne(vector unsigned long long __a, vector unsigned long long __b) { return (vector bool long long) ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpne(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a, (vector int)__b); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpne(vector double __a, vector double __b) { return (vector bool long long) ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b)); } /* vec_cmpnez */ static __inline__ vector bool char __ATTRS_o_ai vec_cmpnez(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpnezb((vector char)__a, (vector char)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpnez(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpnezb((vector char)__a, (vector char)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpnez(vector signed short __a, vector signed short __b) { return (vector bool short)__builtin_altivec_vcmpnezh((vector short)__a, (vector short)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpnez(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpnezh((vector short)__a, (vector short)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpnez(vector signed int __a, vector signed int __b) { return (vector bool int)__builtin_altivec_vcmpnezw((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpnez(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpnezw((vector int)__a, (vector int)__b); } static __inline__ signed int __ATTRS_o_ai vec_cntlz_lsbb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vctzlsbb(__a); #else # 1842 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vclzlsbb(__a); #endif # 1844 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ signed int __ATTRS_o_ai vec_cntlz_lsbb(vector unsigned char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vctzlsbb(__a); #else # 1851 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vclzlsbb(__a); #endif # 1853 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ signed int __ATTRS_o_ai vec_cnttz_lsbb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vclzlsbb(__a); #else # 1860 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vctzlsbb(__a); #endif # 1862 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ signed int __ATTRS_o_ai vec_cnttz_lsbb(vector unsigned char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vclzlsbb(__a); #else # 1869 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vctzlsbb(__a); #endif # 1871 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_parity_lsbb(vector unsigned int __a) { return __builtin_altivec_vprtybw(__a); } static __inline__ vector unsigned int __ATTRS_o_ai vec_parity_lsbb(vector signed int __a) { return __builtin_altivec_vprtybw(__a); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_parity_lsbb(vector unsigned __int128 __a) { return __builtin_altivec_vprtybq(__a); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_parity_lsbb(vector signed __int128 __a) { return __builtin_altivec_vprtybq(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_parity_lsbb(vector unsigned long long __a) { return __builtin_altivec_vprtybd(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_parity_lsbb(vector signed long long __a) { return __builtin_altivec_vprtybd(__a); } #endif # 1904 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_cmpgt */ static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a, vector short __b) { return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } #ifdef __POWER8_VECTOR__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpgt(vector signed long long __a, vector signed long long __b) { return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) { return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b); } #endif # 1948 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a, vector float __b) { #ifdef __VSX__ return (vector bool int)__builtin_vsx_xvcmpgtsp(__a, __b); #else # 1954 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b); #endif # 1956 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpgt(vector double __a, vector double __b) { return (vector bool long long)__builtin_vsx_xvcmpgtdp(__a, __b); } #endif # 1964 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_cmpge */ static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector unsigned char __a, vector unsigned char __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpge(vector signed short __a, vector signed short __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool short __ATTRS_o_ai vec_cmpge(vector unsigned short __a, vector unsigned short __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpge(vector signed int __a, vector signed int __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpge(vector unsigned int __a, vector unsigned int __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool int __ATTRS_o_ai vec_cmpge(vector float __a, vector float __b) { #ifdef __VSX__ return (vector bool int)__builtin_vsx_xvcmpgesp(__a, __b); #else # 2002 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b); #endif # 2004 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpge(vector double __a, vector double __b) { return (vector bool long long)__builtin_vsx_xvcmpgedp(__a, __b); } #endif # 2012 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER8_VECTOR__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmpge(vector signed long long __a, vector signed long long __b) { return ~(vec_cmpgt(__b, __a)); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) { return ~(vec_cmpgt(__b, __a)); } #endif # 2024 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vcmpgefp */ static __inline__ vector bool int __attribute__((__always_inline__)) vec_vcmpgefp(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b); } /* vec_vcmpgtsb */ static __inline__ vector bool char __attribute__((__always_inline__)) vec_vcmpgtsb(vector signed char __a, vector signed char __b) { return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b); } /* vec_vcmpgtub */ static __inline__ vector bool char __attribute__((__always_inline__)) vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b); } /* vec_vcmpgtsh */ static __inline__ vector bool short __attribute__((__always_inline__)) vec_vcmpgtsh(vector short __a, vector short __b) { return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b); } /* vec_vcmpgtuh */ static __inline__ vector bool short __attribute__((__always_inline__)) vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b); } /* vec_vcmpgtsw */ static __inline__ vector bool int __attribute__((__always_inline__)) vec_vcmpgtsw(vector int __a, vector int __b) { return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b); } /* vec_vcmpgtuw */ static __inline__ vector bool int __attribute__((__always_inline__)) vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } /* vec_vcmpgtfp */ static __inline__ vector bool int __attribute__((__always_inline__)) vec_vcmpgtfp(vector float __a, vector float __b) { return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b); } /* vec_cmple */ static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector signed char __a, vector signed char __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector unsigned char __a, vector unsigned char __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool short __ATTRS_o_ai vec_cmple(vector signed short __a, vector signed short __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool short __ATTRS_o_ai vec_cmple(vector unsigned short __a, vector unsigned short __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmple(vector signed int __a, vector signed int __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmple(vector unsigned int __a, vector unsigned int __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmple(vector float __a, vector float __b) { return vec_cmpge(__b, __a); } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmple(vector double __a, vector double __b) { return vec_cmpge(__b, __a); } #endif # 2124 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER8_VECTOR__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmple(vector signed long long __a, vector signed long long __b) { return vec_cmpge(__b, __a); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmple(vector unsigned long long __a, vector unsigned long long __b) { return vec_cmpge(__b, __a); } #endif # 2136 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_cmplt */ static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a, vector unsigned char __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool short __ATTRS_o_ai vec_cmplt(vector short __a, vector short __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a, vector unsigned short __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a, vector unsigned int __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool int __ATTRS_o_ai vec_cmplt(vector float __a, vector float __b) { return vec_cmpgt(__b, __a); } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmplt(vector double __a, vector double __b) { return vec_cmpgt(__b, __a); } #endif # 2180 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER8_VECTOR__ static __inline__ vector bool long long __ATTRS_o_ai vec_cmplt(vector signed long long __a, vector signed long long __b) { return vec_cmpgt(__b, __a); } static __inline__ vector bool long long __ATTRS_o_ai vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) { return vec_cmpgt(__b, __a); } /* vec_popcnt */ static __inline__ vector signed char __ATTRS_o_ai vec_popcnt(vector signed char __a) { return __builtin_altivec_vpopcntb(__a); } static __inline__ vector unsigned char __ATTRS_o_ai vec_popcnt(vector unsigned char __a) { return __builtin_altivec_vpopcntb(__a); } static __inline__ vector signed short __ATTRS_o_ai vec_popcnt(vector signed short __a) { return __builtin_altivec_vpopcnth(__a); } static __inline__ vector unsigned short __ATTRS_o_ai vec_popcnt(vector unsigned short __a) { return __builtin_altivec_vpopcnth(__a); } static __inline__ vector signed int __ATTRS_o_ai vec_popcnt(vector signed int __a) { return __builtin_altivec_vpopcntw(__a); } static __inline__ vector unsigned int __ATTRS_o_ai vec_popcnt(vector unsigned int __a) { return __builtin_altivec_vpopcntw(__a); } static __inline__ vector signed long long __ATTRS_o_ai vec_popcnt(vector signed long long __a) { return __builtin_altivec_vpopcntd(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_popcnt(vector unsigned long long __a) { return __builtin_altivec_vpopcntd(__a); } /* vec_cntlz */ static __inline__ vector signed char __ATTRS_o_ai vec_cntlz(vector signed char __a) { return __builtin_altivec_vclzb(__a); } static __inline__ vector unsigned char __ATTRS_o_ai vec_cntlz(vector unsigned char __a) { return __builtin_altivec_vclzb(__a); } static __inline__ vector signed short __ATTRS_o_ai vec_cntlz(vector signed short __a) { return __builtin_altivec_vclzh(__a); } static __inline__ vector unsigned short __ATTRS_o_ai vec_cntlz(vector unsigned short __a) { return __builtin_altivec_vclzh(__a); } static __inline__ vector signed int __ATTRS_o_ai vec_cntlz(vector signed int __a) { return __builtin_altivec_vclzw(__a); } static __inline__ vector unsigned int __ATTRS_o_ai vec_cntlz(vector unsigned int __a) { return __builtin_altivec_vclzw(__a); } static __inline__ vector signed long long __ATTRS_o_ai vec_cntlz(vector signed long long __a) { return __builtin_altivec_vclzd(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_cntlz(vector unsigned long long __a) { return __builtin_altivec_vclzd(__a); } #endif # 2262 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER9_VECTOR__ /* vec_cnttz */ static __inline__ vector signed char __ATTRS_o_ai vec_cnttz(vector signed char __a) { return __builtin_altivec_vctzb(__a); } static __inline__ vector unsigned char __ATTRS_o_ai vec_cnttz(vector unsigned char __a) { return __builtin_altivec_vctzb(__a); } static __inline__ vector signed short __ATTRS_o_ai vec_cnttz(vector signed short __a) { return __builtin_altivec_vctzh(__a); } static __inline__ vector unsigned short __ATTRS_o_ai vec_cnttz(vector unsigned short __a) { return __builtin_altivec_vctzh(__a); } static __inline__ vector signed int __ATTRS_o_ai vec_cnttz(vector signed int __a) { return __builtin_altivec_vctzw(__a); } static __inline__ vector unsigned int __ATTRS_o_ai vec_cnttz(vector unsigned int __a) { return __builtin_altivec_vctzw(__a); } static __inline__ vector signed long long __ATTRS_o_ai vec_cnttz(vector signed long long __a) { return __builtin_altivec_vctzd(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_cnttz(vector unsigned long long __a) { return __builtin_altivec_vctzd(__a); } /* vec_first_match_index */ static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector signed char __a, vector signed char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2308 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2310 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector unsigned char __a, vector unsigned char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2322 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2324 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector signed short __a, vector signed short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2336 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2338 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector unsigned short __a, vector unsigned short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2350 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2352 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector signed int __a, vector signed int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2364 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2366 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_index(vector unsigned int __a, vector unsigned int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b)); #else # 2378 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b)); #endif # 2380 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } /* vec_first_match_or_eos_index */ static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector signed char __a, vector signed char __b) { /* Compare the result of the comparison of two vectors with either and OR the result. Either the elements are equal or one will equal the comparison result if either is zero. */ vector bool char __tmp1 = vec_cmpeq(__a, __b); vector bool char __tmp2 = __tmp1 | vec_cmpeq((vector signed char)__tmp1, __a) | vec_cmpeq((vector signed char)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2403 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2405 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector unsigned char __a, vector unsigned char __b) { vector bool char __tmp1 = vec_cmpeq(__a, __b); vector bool char __tmp2 = __tmp1 | vec_cmpeq((vector unsigned char)__tmp1, __a) | vec_cmpeq((vector unsigned char)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2423 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2425 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector signed short __a, vector signed short __b) { vector bool short __tmp1 = vec_cmpeq(__a, __b); vector bool short __tmp2 = __tmp1 | vec_cmpeq((vector signed short)__tmp1, __a) | vec_cmpeq((vector signed short)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2442 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2444 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector unsigned short __a, vector unsigned short __b) { vector bool short __tmp1 = vec_cmpeq(__a, __b); vector bool short __tmp2 = __tmp1 | vec_cmpeq((vector unsigned short)__tmp1, __a) | vec_cmpeq((vector unsigned short)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2462 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2464 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector signed int __a, vector signed int __b) { vector bool int __tmp1 = vec_cmpeq(__a, __b); vector bool int __tmp2 = __tmp1 | vec_cmpeq((vector signed int)__tmp1, __a) | vec_cmpeq((vector signed int)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2480 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2482 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } static __inline__ unsigned __ATTRS_o_ai vec_first_match_or_eos_index(vector unsigned int __a, vector unsigned int __b) { vector bool int __tmp1 = vec_cmpeq(__a, __b); vector bool int __tmp2 = __tmp1 | vec_cmpeq((vector unsigned int)__tmp1, __a) | vec_cmpeq((vector unsigned int)__tmp1, __b); vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)__tmp2); #else # 2499 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)__tmp2); #endif # 2501 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } /* vec_first_mismatch_index */ static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector signed char __a, vector signed char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2515 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2517 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector unsigned char __a, vector unsigned char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2529 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2531 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector signed short __a, vector signed short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2543 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2545 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector unsigned short __a, vector unsigned short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2557 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2559 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector signed int __a, vector signed int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2571 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2573 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_index(vector unsigned int __a, vector unsigned int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b)); #else # 2585 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b)); #endif # 2587 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } /* vec_first_mismatch_or_eos_index */ static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector signed char __a, vector signed char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2602 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2604 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector unsigned char __a, vector unsigned char __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2617 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2619 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 3; } return __res[0] >> 3; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector signed short __a, vector signed short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2632 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2634 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector unsigned short __a, vector unsigned short __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2647 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2649 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 4; } return __res[0] >> 4; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector signed int __a, vector signed int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2661 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2663 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } static __inline__ unsigned __ATTRS_o_ai vec_first_mismatch_or_eos_index(vector unsigned int __a, vector unsigned int __b) { vector unsigned long long __res = #ifdef __LITTLE_ENDIAN__ vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b)); #else # 2676 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b)); #endif # 2678 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 if (__res[0] == 64) { return (__res[1] + 64) >> 5; } return __res[0] >> 5; } static __inline__ vector double __ATTRS_o_ai vec_insert_exp(vector double __a, vector unsigned long long __b) { return __builtin_vsx_xviexpdp((vector unsigned long long)__a,__b); } static __inline__ vector double __ATTRS_o_ai vec_insert_exp(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_vsx_xviexpdp(__a,__b); } static __inline__ vector float __ATTRS_o_ai vec_insert_exp(vector float __a, vector unsigned int __b) { return __builtin_vsx_xviexpsp((vector unsigned int)__a,__b); } static __inline__ vector float __ATTRS_o_ai vec_insert_exp(vector unsigned int __a, vector unsigned int __b) { return __builtin_vsx_xviexpsp(__a,__b); } #if 0 /* disabled by -frewrite-includes */ #if defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2705 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed char __ATTRS_o_ai vec_xl_len(signed char *__a, size_t __b) { return (vector signed char)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_xl_len(unsigned char *__a, size_t __b) { return (vector unsigned char)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector signed short __ATTRS_o_ai vec_xl_len(signed short *__a, size_t __b) { return (vector signed short)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_xl_len(unsigned short *__a, size_t __b) { return (vector unsigned short)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector signed int __ATTRS_o_ai vec_xl_len(signed int *__a, size_t __b) { return (vector signed int)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_xl_len(unsigned int *__a, size_t __b) { return (vector unsigned int)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector float __ATTRS_o_ai vec_xl_len(float *__a, size_t __b) { return (vector float)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector signed __int128 __ATTRS_o_ai vec_xl_len(signed __int128 *__a, size_t __b) { return (vector signed __int128)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_xl_len(unsigned __int128 *__a, size_t __b) { return (vector unsigned __int128)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector signed long long __ATTRS_o_ai vec_xl_len(signed long long *__a, size_t __b) { return (vector signed long long)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_xl_len(unsigned long long *__a, size_t __b) { return (vector unsigned long long)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector double __ATTRS_o_ai vec_xl_len(double *__a, size_t __b) { return (vector double)__builtin_vsx_lxvl(__a, (__b << 56)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_xl_len_r(unsigned char *__a, size_t __b) { vector unsigned char __res = (vector unsigned char)__builtin_vsx_lxvll(__a, (__b << 56)); #ifdef __LITTLE_ENDIAN__ vector unsigned char __mask = (vector unsigned char)__builtin_altivec_lvsr(16 - __b, (int *)NULL); __res = (vector unsigned char)__builtin_altivec_vperm_4si( (vector int)__res, (vector int)__res, __mask); #endif # 2774 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __res; } // vec_xst_len static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned char __a, unsigned char *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed char __a, signed char *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed short __a, signed short *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned short __a, unsigned short *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed int __a, signed int *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned int __a, unsigned int *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector float __a, float *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed __int128 __a, signed __int128 *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned __int128 __a, unsigned __int128 *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed long long __a, signed long long *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned long long __a, unsigned long long *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len(vector double __a, double *__b, size_t __c) { return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56)); } static __inline__ void __ATTRS_o_ai vec_xst_len_r(vector unsigned char __a, unsigned char *__b, size_t __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __mask = (vector unsigned char)__builtin_altivec_lvsl(16 - __c, (int *)NULL); vector unsigned char __res = __builtin_altivec_vperm_4si((vector int)__a, (vector int)__a, __mask); return __builtin_vsx_stxvll((vector int)__res, __b, (__c << 56)); #else # 2854 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_stxvll((vector int)__a, __b, (__c << 56)); #endif # 2856 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 2858 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #endif # 2859 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_cpsgn */ #ifdef __VSX__ static __inline__ vector float __ATTRS_o_ai vec_cpsgn(vector float __a, vector float __b) { return __builtin_vsx_xvcpsgnsp(__a, __b); } static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a, vector double __b) { return __builtin_vsx_xvcpsgndp(__a, __b); } #endif # 2873 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_ctf */ #ifdef __VSX__ #define vec_ctf(__a, __b) \ _Generic((__a), vector int \ : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \ vector unsigned int \ : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \ (__b)), \ vector unsigned long long \ : (__builtin_convertvector((vector unsigned long long)(__a), \ vector double) * \ (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ << 52)), \ vector signed long long \ : (__builtin_convertvector((vector signed long long)(__a), \ vector double) * \ (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ << 52))) #else # 2894 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #define vec_ctf(__a, __b) \ _Generic((__a), vector int \ : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \ vector unsigned int \ : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \ (__b))) #endif # 2901 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vcfsx */ #define vec_vcfux __builtin_altivec_vcfux /* vec_vcfux */ #define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b)) /* vec_cts */ #ifdef __VSX__ #define vec_cts(__a, __b) \ _Generic((__a), vector float \ : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \ vector double \ : __extension__({ \ vector double __ret = \ (vector double)(__a) * \ (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \ << 52); \ __builtin_convertvector(__ret, vector signed long long); \ })) #else # 2925 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #define vec_cts __builtin_altivec_vctsxs #endif # 2927 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vctsxs */ #define vec_vctsxs __builtin_altivec_vctsxs /* vec_ctu */ #ifdef __VSX__ #define vec_ctu(__a, __b) \ _Generic((__a), vector float \ : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \ vector double \ : __extension__({ \ vector double __ret = \ (vector double)(__a) * \ (vector double)(vector unsigned long long)((0x3ffULL + __b) \ << 52); \ __builtin_convertvector(__ret, vector unsigned long long); \ })) #else # 2947 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #define vec_ctu __builtin_altivec_vctuxs #endif # 2949 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vctuxs */ #define vec_vctuxs __builtin_altivec_vctuxs /* vec_signed */ static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c); static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a) { return __builtin_convertvector(__a, vector signed int); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_signed(vector double __a) { return __builtin_convertvector(__a, vector signed long long); } static __inline__ vector signed int __attribute__((__always_inline__)) vec_signed2(vector double __a, vector double __b) { return (vector signed int) { __a[0], __a[1], __b[0], __b[1] }; } static __inline__ vector signed int __ATTRS_o_ai vec_signede(vector double __a) { #ifdef __LITTLE_ENDIAN__ vector signed int __ret = __builtin_vsx_xvcvdpsxws(__a); return vec_sld(__ret, __ret, 12); #else # 2981 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvdpsxws(__a); #endif # 2983 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector signed int __ATTRS_o_ai vec_signedo(vector double __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvdpsxws(__a); #else # 2990 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector signed int __ret = __builtin_vsx_xvcvdpsxws(__a); return vec_sld(__ret, __ret, 12); #endif # 2993 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 2995 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_unsigned */ static __inline__ vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int, vector unsigned int, unsigned const int __c); static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a) { return __builtin_convertvector(__a, vector unsigned int); } #ifdef __VSX__ static __inline__ vector unsigned long long __ATTRS_o_ai vec_unsigned(vector double __a) { return __builtin_convertvector(__a, vector unsigned long long); } static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_unsigned2(vector double __a, vector double __b) { return (vector unsigned int) { __a[0], __a[1], __b[0], __b[1] }; } static __inline__ vector unsigned int __ATTRS_o_ai vec_unsignede(vector double __a) { #ifdef __LITTLE_ENDIAN__ vector unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a); return vec_sld(__ret, __ret, 12); #else # 3023 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvdpuxws(__a); #endif # 3025 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_unsignedo(vector double __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvdpuxws(__a); #else # 3032 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a); return vec_sld(__ret, __ret, 12); #endif # 3035 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 3037 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_float */ static __inline__ vector float __ATTRS_o_ai vec_sld(vector float, vector float, unsigned const int __c); static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a) { return __builtin_convertvector(__a, vector float); } static __inline__ vector float __ATTRS_o_ai vec_float(vector unsigned int __a) { return __builtin_convertvector(__a, vector float); } #ifdef __VSX__ static __inline__ vector float __ATTRS_o_ai vec_float2(vector signed long long __a, vector signed long long __b) { return (vector float) { __a[0], __a[1], __b[0], __b[1] }; } static __inline__ vector float __ATTRS_o_ai vec_float2(vector unsigned long long __a, vector unsigned long long __b) { return (vector float) { __a[0], __a[1], __b[0], __b[1] }; } static __inline__ vector float __ATTRS_o_ai vec_float2(vector double __a, vector double __b) { return (vector float) { __a[0], __a[1], __b[0], __b[1] }; } static __inline__ vector float __ATTRS_o_ai vec_floate(vector signed long long __a) { #ifdef __LITTLE_ENDIAN__ vector float __ret = __builtin_vsx_xvcvsxdsp(__a); return vec_sld(__ret, __ret, 12); #else # 3075 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvsxdsp(__a); #endif # 3077 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_floate(vector unsigned long long __a) { #ifdef __LITTLE_ENDIAN__ vector float __ret = __builtin_vsx_xvcvuxdsp(__a); return vec_sld(__ret, __ret, 12); #else # 3085 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvuxdsp(__a); #endif # 3087 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_floate(vector double __a) { #ifdef __LITTLE_ENDIAN__ vector float __ret = __builtin_vsx_xvcvdpsp(__a); return vec_sld(__ret, __ret, 12); #else # 3095 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvdpsp(__a); #endif # 3097 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_floato(vector signed long long __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvsxdsp(__a); #else # 3104 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector float __ret = __builtin_vsx_xvcvsxdsp(__a); return vec_sld(__ret, __ret, 12); #endif # 3107 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_floato(vector unsigned long long __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvuxdsp(__a); #else # 3114 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector float __ret = __builtin_vsx_xvcvuxdsp(__a); return vec_sld(__ret, __ret, 12); #endif # 3117 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_floato(vector double __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvdpsp(__a); #else # 3124 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 vector float __ret = __builtin_vsx_xvcvdpsp(__a); return vec_sld(__ret, __ret, 12); #endif # 3127 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 3129 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_double */ #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_double(vector signed long long __a) { return __builtin_convertvector(__a, vector double); } static __inline__ vector double __ATTRS_o_ai vec_double(vector unsigned long long __a) { return __builtin_convertvector(__a, vector double); } static __inline__ vector double __ATTRS_o_ai vec_doublee(vector signed int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvsxwdp(vec_sld(__a, __a, 4)); #else # 3148 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvsxwdp(__a); #endif # 3150 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_doublee(vector unsigned int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvuxwdp(vec_sld(__a, __a, 4)); #else # 3157 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvuxwdp(__a); #endif # 3159 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_doublee(vector float __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvspdp(vec_sld(__a, __a, 4)); #else # 3166 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvspdp(__a); #endif # 3168 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_doubleh(vector signed int __a) { vector double __ret = {__a[0], __a[1]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doubleh(vector unsigned int __a) { vector double __ret = {__a[0], __a[1]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doubleh(vector float __a) { vector double __ret = {__a[0], __a[1]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doublel(vector signed int __a) { vector double __ret = {__a[2], __a[3]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doublel(vector unsigned int __a) { vector double __ret = {__a[2], __a[3]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doublel(vector float __a) { vector double __ret = {__a[2], __a[3]}; return __ret; } static __inline__ vector double __ATTRS_o_ai vec_doubleo(vector signed int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvsxwdp(__a); #else # 3211 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvsxwdp(vec_sld(__a, __a, 4)); #endif # 3213 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_doubleo(vector unsigned int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvuxwdp(__a); #else # 3220 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvuxwdp(vec_sld(__a, __a, 4)); #endif # 3222 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_doubleo(vector float __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_vsx_xvcvspdp(__a); #else # 3229 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvspdp(vec_sld(__a, __a, 4)); #endif # 3231 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 3233 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_div */ /* Integer vector divides (vectors are scalarized, elements divided and the vectors reassembled). */ static __inline__ vector signed char __ATTRS_o_ai vec_div(vector signed char __a, vector signed char __b) { return __a / __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_div(vector unsigned char __a, vector unsigned char __b) { return __a / __b; } static __inline__ vector signed short __ATTRS_o_ai vec_div(vector signed short __a, vector signed short __b) { return __a / __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_div(vector unsigned short __a, vector unsigned short __b) { return __a / __b; } static __inline__ vector signed int __ATTRS_o_ai vec_div(vector signed int __a, vector signed int __b) { return __a / __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_div(vector unsigned int __a, vector unsigned int __b) { return __a / __b; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_div(vector signed long long __a, vector signed long long __b) { return __a / __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_div(vector unsigned long long __a, vector unsigned long long __b) { return __a / __b; } static __inline__ vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) { return __a / __b; } static __inline__ vector double __ATTRS_o_ai vec_div(vector double __a, vector double __b) { return __a / __b; } #endif # 3290 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_dss */ #define vec_dss __builtin_altivec_dss /* vec_dssall */ static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) { __builtin_altivec_dssall(); } /* vec_dst */ #define vec_dst(__PTR, __CW, __STR) \ __extension__( \ { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dstst */ #define vec_dstst(__PTR, __CW, __STR) \ __extension__( \ { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dststt */ #define vec_dststt(__PTR, __CW, __STR) \ __extension__( \ { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dstt */ #define vec_dstt(__PTR, __CW, __STR) \ __extension__( \ { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) /* vec_eqv */ #ifdef __POWER8_VECTOR__ static __inline__ vector signed char __ATTRS_o_ai vec_eqv(vector signed char __a, vector signed char __b) { return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_eqv(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_eqv(vector bool char __a, vector bool char __b) { return (vector bool char)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector signed short __ATTRS_o_ai vec_eqv(vector signed short __a, vector signed short __b) { return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_eqv(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_eqv(vector bool short __a, vector bool short __b) { return (vector bool short)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector signed int __ATTRS_o_ai vec_eqv(vector signed int __a, vector signed int __b) { return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_eqv(vector unsigned int __a, vector unsigned int __b) { return __builtin_vsx_xxleqv(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_eqv(vector bool int __a, vector bool int __b) { return (vector bool int)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector signed long long __ATTRS_o_ai vec_eqv(vector signed long long __a, vector signed long long __b) { return (vector signed long long)__builtin_vsx_xxleqv( (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_eqv(vector unsigned long long __a, vector unsigned long long __b) { return (vector unsigned long long)__builtin_vsx_xxleqv( (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector bool long long __ATTRS_o_ai vec_eqv(vector bool long long __a, vector bool long long __b) { return (vector bool long long)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector float __ATTRS_o_ai vec_eqv(vector float __a, vector float __b) { return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ vector double __ATTRS_o_ai vec_eqv(vector double __a, vector double __b) { return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b); } #endif # 3407 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_expte */ static __inline__ vector float __attribute__((__always_inline__)) vec_expte(vector float __a) { return __builtin_altivec_vexptefp(__a); } /* vec_vexptefp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vexptefp(vector float __a) { return __builtin_altivec_vexptefp(__a); } /* vec_floor */ static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvrspim(__a); #else # 3428 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrfim(__a); #endif # 3430 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_floor(vector double __a) { return __builtin_vsx_xvrdpim(__a); } #endif # 3437 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrfim */ static __inline__ vector float __attribute__((__always_inline__)) vec_vrfim(vector float __a) { return __builtin_altivec_vrfim(__a); } /* vec_ld */ static __inline__ vector signed char __ATTRS_o_ai vec_ld(int __a, const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_ld(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_ld(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_ld(int __a, const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_ld(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_ld(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_ld(int __a, const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvx(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_ld(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_ld(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_ld(int __a, const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } /* vec_lvx */ static __inline__ vector signed char __ATTRS_o_ai vec_lvx(int __a, const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_lvx(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvx(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvx(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_lvx(int __a, const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvx(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) { return (vector short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvx(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvx(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_lvx(int __a, const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvx(__a, __b); } static __inline__ vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvx(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) { return (vector int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvx(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvx(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_lvx(int __a, const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) { return (vector float)__builtin_altivec_lvx(__a, __b); } /* vec_lde */ static __inline__ vector signed char __ATTRS_o_ai vec_lde(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvebx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lde(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvebx(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) { return (vector short)__builtin_altivec_lvehx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lde(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvehx(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) { return (vector int)__builtin_altivec_lvewx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lde(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvewx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) { return (vector float)__builtin_altivec_lvewx(__a, __b); } /* vec_lvebx */ static __inline__ vector signed char __ATTRS_o_ai vec_lvebx(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvebx(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvebx(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvebx(__a, __b); } /* vec_lvehx */ static __inline__ vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) { return (vector short)__builtin_altivec_lvehx(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvehx(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvehx(__a, __b); } /* vec_lvewx */ static __inline__ vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) { return (vector int)__builtin_altivec_lvewx(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvewx(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvewx(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) { return (vector float)__builtin_altivec_lvewx(__a, __b); } /* vec_ldl */ static __inline__ vector signed char __ATTRS_o_ai vec_ldl(int __a, const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_ldl(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_ldl(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_ldl(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_ldl(int __a, const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_ldl(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_ldl(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_ldl(int __a, const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) { return (vector pixel short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_ldl(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_ldl(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_ldl(int __a, const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } /* vec_lvxl */ static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(int __a, const vector signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(int __a, const signed char *__b) { return (vector signed char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvxl(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvxl(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_lvxl(int __a, const vector bool char *__b) { return (vector bool char)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) { return (vector short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvxl(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvxl(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_lvxl(int __a, const vector bool short *__b) { return (vector bool short)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) { return (vector pixel)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) { return (vector int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvxl(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvxl(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector bool int __ATTRS_o_ai vec_lvxl(int __a, const vector bool int *__b) { return (vector bool int)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) { return (vector float)__builtin_altivec_lvxl(__a, __b); } /* vec_loge */ static __inline__ vector float __attribute__((__always_inline__)) vec_loge(vector float __a) { return __builtin_altivec_vlogefp(__a); } /* vec_vlogefp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vlogefp(vector float __a) { return __builtin_altivec_vlogefp(__a); } /* vec_lvsl */ #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const signed char *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3904 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3909 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3921 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3926 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const short *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3938 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3943 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3955 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const unsigned short *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3960 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const int *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3972 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3977 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 3989 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const unsigned int *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 3994 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsl(int __a, const float *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsl(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4006 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) { return (vector unsigned char)__builtin_altivec_lvsl(__a, __b); } #endif # 4011 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_lvsr */ #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const signed char *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4025 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const signed char *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4030 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4042 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4047 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const short *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4059 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4064 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4076 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const unsigned short *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4081 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const int *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4093 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4098 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4110 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const unsigned int *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4115 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __LITTLE_ENDIAN__ static __inline__ vector unsigned char __ATTRS_o_ai __attribute__((__deprecated__("use assignment for unaligned little endian \ loads/stores"))) vec_lvsr(int __a, const float *__b) { vector unsigned char mask = (vector unsigned char)__builtin_altivec_lvsr(__a, __b); vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; return vec_perm(mask, mask, reverse); } #else # 4127 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) { return (vector unsigned char)__builtin_altivec_lvsr(__a, __b); } #endif # 4132 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_madd */ static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short); static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector unsigned short, vector unsigned short); static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector unsigned short, vector signed short, vector signed short); static __inline__ vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short, vector unsigned short, vector unsigned short); static __inline__ vector signed short __ATTRS_o_ai vec_madd( vector signed short __a, vector signed short __b, vector signed short __c) { return vec_mladd(__a, __b, __c); } static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector unsigned short __b, vector unsigned short __c) { return vec_mladd(__a, __b, __c); } static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector unsigned short __a, vector signed short __b, vector signed short __c) { return vec_mladd(__a, __b, __c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_madd(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return vec_mladd(__a, __b, __c); } static __inline__ vector float __ATTRS_o_ai vec_madd(vector float __a, vector float __b, vector float __c) { #ifdef __VSX__ return __builtin_vsx_xvmaddasp(__a, __b, __c); #else # 4172 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmaddfp(__a, __b, __c); #endif # 4174 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_madd(vector double __a, vector double __b, vector double __c) { return __builtin_vsx_xvmaddadp(__a, __b, __c); } #endif # 4183 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmaddfp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vmaddfp(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vmaddfp(__a, __b, __c); } /* vec_madds */ static __inline__ vector signed short __attribute__((__always_inline__)) vec_madds(vector signed short __a, vector signed short __b, vector signed short __c) { return __builtin_altivec_vmhaddshs(__a, __b, __c); } /* vec_vmhaddshs */ static __inline__ vector signed short __attribute__((__always_inline__)) vec_vmhaddshs(vector signed short __a, vector signed short __b, vector signed short __c) { return __builtin_altivec_vmhaddshs(__a, __b, __c); } /* vec_msub */ #ifdef __VSX__ static __inline__ vector float __ATTRS_o_ai vec_msub(vector float __a, vector float __b, vector float __c) { return __builtin_vsx_xvmsubasp(__a, __b, __c); } static __inline__ vector double __ATTRS_o_ai vec_msub(vector double __a, vector double __b, vector double __c) { return __builtin_vsx_xvmsubadp(__a, __b, __c); } #endif # 4221 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_max */ static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b) { return __builtin_altivec_vmaxsb(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_max(vector bool char __a, vector signed char __b) { return __builtin_altivec_vmaxsb((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector bool char __b) { return __builtin_altivec_vmaxsb(__a, (vector signed char)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vmaxub(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vmaxub((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b); } static __inline__ vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) { return __builtin_altivec_vmaxsh(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_max(vector bool short __a, vector short __b) { return __builtin_altivec_vmaxsh((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_max(vector short __a, vector bool short __b) { return __builtin_altivec_vmaxsh(__a, (vector short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b); } static __inline__ vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) { return __builtin_altivec_vmaxsw(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) { return __builtin_altivec_vmaxsw((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) { return __builtin_altivec_vmaxsw(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vmaxuw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vmaxsd(__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_max(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vmaxsd((vector signed long long)__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_max(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vmaxud(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_max(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_max(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b); } #endif # 4345 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvmaxsp(__a, __b); #else # 4351 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmaxfp(__a, __b); #endif # 4353 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_max(vector double __a, vector double __b) { return __builtin_vsx_xvmaxdp(__a, __b); } #endif # 4361 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmaxsb */ static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b) { return __builtin_altivec_vmaxsb(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a, vector signed char __b) { return __builtin_altivec_vmaxsb((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector bool char __b) { return __builtin_altivec_vmaxsb(__a, (vector signed char)__b); } /* vec_vmaxub */ static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vmaxub(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vmaxub((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b); } /* vec_vmaxsh */ static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b) { return __builtin_altivec_vmaxsh(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a, vector short __b) { return __builtin_altivec_vmaxsh((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector bool short __b) { return __builtin_altivec_vmaxsh(__a, (vector short)__b); } /* vec_vmaxuh */ static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b); } /* vec_vmaxsw */ static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) { return __builtin_altivec_vmaxsw(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) { return __builtin_altivec_vmaxsw((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) { return __builtin_altivec_vmaxsw(__a, (vector int)__b); } /* vec_vmaxuw */ static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vmaxuw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } /* vec_vmaxfp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vmaxfp(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvmaxsp(__a, __b); #else # 4471 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmaxfp(__a, __b); #endif # 4473 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_mergeh */ static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a, vector unsigned char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } static __inline__ vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a, vector bool char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } static __inline__ vector short __ATTRS_o_ai vec_mergeh(vector short __a, vector short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_mergeh(vector unsigned short __a, vector unsigned short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a, vector bool short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a, vector pixel __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector float __ATTRS_o_ai vec_mergeh(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_mergeh(vector signed long long __a, vector signed long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergeh(vector signed long long __a, vector bool long long __b) { return vec_perm(__a, (vector signed long long)__b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergeh(vector bool long long __a, vector signed long long __b) { return vec_perm((vector signed long long)__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergeh(vector unsigned long long __a, vector bool long long __b) { return vec_perm(__a, (vector unsigned long long)__b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergeh(vector bool long long __a, vector unsigned long long __b) { return vec_perm((vector unsigned long long)__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector bool long long __ATTRS_o_ai vec_mergeh(vector bool long long __a, vector bool long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector double __ATTRS_o_ai vec_mergeh(vector double __a, vector double __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector double __ATTRS_o_ai vec_mergeh(vector double __a, vector bool long long __b) { return vec_perm(__a, (vector double)__b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector double __ATTRS_o_ai vec_mergeh(vector bool long long __a, vector double __b) { return vec_perm((vector double)__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17)); } #endif # 4644 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmrghb */ #define __builtin_altivec_vmrghb vec_vmrghb static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a, vector unsigned char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } static __inline__ vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a, vector bool char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17)); } /* vec_vmrghh */ #define __builtin_altivec_vmrghh vec_vmrghh static __inline__ vector short __ATTRS_o_ai vec_vmrghh(vector short __a, vector short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vmrghh(vector unsigned short __a, vector unsigned short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a, vector bool short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } static __inline__ vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a, vector pixel __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13, 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17)); } /* vec_vmrghw */ #define __builtin_altivec_vmrghw vec_vmrghw static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } static __inline__ vector float __ATTRS_o_ai vec_vmrghw(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17)); } /* vec_mergel */ static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a, vector unsigned char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } static __inline__ vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a, vector bool char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } static __inline__ vector short __ATTRS_o_ai vec_mergel(vector short __a, vector short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_mergel(vector unsigned short __a, vector unsigned short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a, vector bool short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a, vector pixel __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector float __ATTRS_o_ai vec_mergel(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_mergel(vector signed long long __a, vector signed long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergel(vector signed long long __a, vector bool long long __b) { return vec_perm(__a, (vector signed long long)__b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergel(vector bool long long __a, vector signed long long __b) { return vec_perm((vector signed long long)__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergel(vector unsigned long long __a, vector unsigned long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergel(vector unsigned long long __a, vector bool long long __b) { return vec_perm(__a, (vector unsigned long long)__b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergel(vector bool long long __a, vector unsigned long long __b) { return vec_perm((vector unsigned long long)__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector bool long long __ATTRS_o_ai vec_mergel(vector bool long long __a, vector bool long long __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector double __ATTRS_o_ai vec_mergel(vector double __a, vector double __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector double __ATTRS_o_ai vec_mergel(vector double __a, vector bool long long __b) { return vec_perm(__a, (vector double)__b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector double __ATTRS_o_ai vec_mergel(vector bool long long __a, vector double __b) { return vec_perm((vector double)__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F)); } #endif # 4907 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmrglb */ #define __builtin_altivec_vmrglb vec_vmrglb static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, vector signed char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a, vector unsigned char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } static __inline__ vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a, vector bool char __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F)); } /* vec_vmrglh */ #define __builtin_altivec_vmrglh vec_vmrglh static __inline__ vector short __ATTRS_o_ai vec_vmrglh(vector short __a, vector short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vmrglh(vector unsigned short __a, vector unsigned short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a, vector bool short __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } static __inline__ vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a, vector pixel __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F)); } /* vec_vmrglw */ #define __builtin_altivec_vmrglw vec_vmrglw static __inline__ vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector float __ATTRS_o_ai vec_vmrglw(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } #ifdef __POWER8_VECTOR__ /* vec_mergee */ static __inline__ vector bool int __ATTRS_o_ai vec_mergee(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B)); } static __inline__ vector signed int __ATTRS_o_ai vec_mergee(vector signed int __a, vector signed int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_mergee(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B)); } static __inline__ vector bool long long __ATTRS_o_ai vec_mergee(vector bool long long __a, vector bool long long __b) { return vec_mergeh(__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergee(vector signed long long __a, vector signed long long __b) { return vec_mergeh(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergee(vector unsigned long long __a, vector unsigned long long __b) { return vec_mergeh(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_mergee(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B)); } static __inline__ vector double __ATTRS_o_ai vec_mergee(vector double __a, vector double __b) { return vec_mergeh(__a, __b); } /* vec_mergeo */ static __inline__ vector bool int __ATTRS_o_ai vec_mergeo(vector bool int __a, vector bool int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector signed int __ATTRS_o_ai vec_mergeo(vector signed int __a, vector signed int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_mergeo(vector unsigned int __a, vector unsigned int __b) { return vec_perm(__a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector bool long long __ATTRS_o_ai vec_mergeo(vector bool long long __a, vector bool long long __b) { return vec_mergel(__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_mergeo(vector signed long long __a, vector signed long long __b) { return vec_mergel(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mergeo(vector unsigned long long __a, vector unsigned long long __b) { return vec_mergel(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_mergeo(vector float __a, vector float __b) { return vec_perm(__a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F)); } static __inline__ vector double __ATTRS_o_ai vec_mergeo(vector double __a, vector double __b) { return vec_mergel(__a, __b); } #endif # 5118 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_mfvscr */ static __inline__ vector unsigned short __attribute__((__always_inline__)) vec_mfvscr(void) { return __builtin_altivec_mfvscr(); } /* vec_min */ static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b) { return __builtin_altivec_vminsb(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_min(vector bool char __a, vector signed char __b) { return __builtin_altivec_vminsb((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector bool char __b) { return __builtin_altivec_vminsb(__a, (vector signed char)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vminub(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vminub((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vminub(__a, (vector unsigned char)__b); } static __inline__ vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) { return __builtin_altivec_vminsh(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_min(vector bool short __a, vector short __b) { return __builtin_altivec_vminsh((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_min(vector short __a, vector bool short __b) { return __builtin_altivec_vminsh(__a, (vector short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vminuh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vminuh((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vminuh(__a, (vector unsigned short)__b); } static __inline__ vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) { return __builtin_altivec_vminsw(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) { return __builtin_altivec_vminsw((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) { return __builtin_altivec_vminsw(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vminuw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vminuw((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vminsd(__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_min(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vminsd((vector signed long long)__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vminsd(__a, (vector signed long long)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_min(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vminud(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_min(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vminud((vector unsigned long long)__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_min(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vminud(__a, (vector unsigned long long)__b); } #endif # 5249 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvminsp(__a, __b); #else # 5255 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vminfp(__a, __b); #endif # 5257 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_min(vector double __a, vector double __b) { return __builtin_vsx_xvmindp(__a, __b); } #endif # 5265 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vminsb */ static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector signed char __b) { return __builtin_altivec_vminsb(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a, vector signed char __b) { return __builtin_altivec_vminsb((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector bool char __b) { return __builtin_altivec_vminsb(__a, (vector signed char)__b); } /* vec_vminub */ static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vminub(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vminub((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vminub(__a, (vector unsigned char)__b); } /* vec_vminsh */ static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b) { return __builtin_altivec_vminsh(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector bool short __a, vector short __b) { return __builtin_altivec_vminsh((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector bool short __b) { return __builtin_altivec_vminsh(__a, (vector short)__b); } /* vec_vminuh */ static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vminuh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vminuh((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vminuh(__a, (vector unsigned short)__b); } /* vec_vminsw */ static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) { return __builtin_altivec_vminsw(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) { return __builtin_altivec_vminsw((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) { return __builtin_altivec_vminsw(__a, (vector int)__b); } /* vec_vminuw */ static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vminuw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vminuw((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } /* vec_vminfp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vminfp(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvminsp(__a, __b); #else # 5375 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vminfp(__a, __b); #endif # 5377 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_mladd */ #define __builtin_altivec_vmladduhm vec_mladd static __inline__ vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b, vector short __c) { return __a * __b + __c; } static __inline__ vector short __ATTRS_o_ai vec_mladd( vector short __a, vector unsigned short __b, vector unsigned short __c) { return __a * (vector short)__b + (vector short)__c; } static __inline__ vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a, vector short __b, vector short __c) { return (vector short)__a * __b + __c; } static __inline__ vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return __a * __b + __c; } /* vec_vmladduhm */ static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c) { return __a * __b + __c; } static __inline__ vector short __ATTRS_o_ai vec_vmladduhm( vector short __a, vector unsigned short __b, vector unsigned short __c) { return __a * (vector short)__b + (vector short)__c; } static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c) { return (vector short)__a * __b + __c; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return __a * __b + __c; } /* vec_mradds */ static __inline__ vector short __attribute__((__always_inline__)) vec_mradds(vector short __a, vector short __b, vector short __c) { return __builtin_altivec_vmhraddshs(__a, __b, __c); } /* vec_vmhraddshs */ static __inline__ vector short __attribute__((__always_inline__)) vec_vmhraddshs(vector short __a, vector short __b, vector short __c) { return __builtin_altivec_vmhraddshs(__a, __b, __c); } /* vec_msum */ static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c) { return __builtin_altivec_vmsummbm(__a, __b, __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c) { return __builtin_altivec_vmsumubm(__a, __b, __c); } static __inline__ vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshm(__a, __b, __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a, vector unsigned short __b, vector unsigned int __c) { return __builtin_altivec_vmsumuhm(__a, __b, __c); } /* vec_vmsummbm */ static __inline__ vector int __attribute__((__always_inline__)) vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) { return __builtin_altivec_vmsummbm(__a, __b, __c); } /* vec_vmsumubm */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vmsumubm(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c) { return __builtin_altivec_vmsumubm(__a, __b, __c); } /* vec_vmsumshm */ static __inline__ vector int __attribute__((__always_inline__)) vec_vmsumshm(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshm(__a, __b, __c); } /* vec_vmsumuhm */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b, vector unsigned int __c) { return __builtin_altivec_vmsumuhm(__a, __b, __c); } /* vec_msums */ static __inline__ vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshs(__a, __b, __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a, vector unsigned short __b, vector unsigned int __c) { return __builtin_altivec_vmsumuhs(__a, __b, __c); } /* vec_vmsumshs */ static __inline__ vector int __attribute__((__always_inline__)) vec_vmsumshs(vector short __a, vector short __b, vector int __c) { return __builtin_altivec_vmsumshs(__a, __b, __c); } /* vec_vmsumuhs */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b, vector unsigned int __c) { return __builtin_altivec_vmsumuhs(__a, __b, __c); } /* vec_mtvscr */ static __inline__ void __ATTRS_o_ai vec_mtvscr(vector signed char __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector bool char __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector short __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector bool short __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector pixel __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector int __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector bool int __a) { __builtin_altivec_mtvscr((vector int)__a); } static __inline__ void __ATTRS_o_ai vec_mtvscr(vector float __a) { __builtin_altivec_mtvscr((vector int)__a); } /* vec_mul */ /* Integer vector multiplication will involve multiplication of the odd/even elements separately, then truncating the results and moving to the result vector. */ static __inline__ vector signed char __ATTRS_o_ai vec_mul(vector signed char __a, vector signed char __b) { return __a * __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_mul(vector unsigned char __a, vector unsigned char __b) { return __a * __b; } static __inline__ vector signed short __ATTRS_o_ai vec_mul(vector signed short __a, vector signed short __b) { return __a * __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_mul(vector unsigned short __a, vector unsigned short __b) { return __a * __b; } static __inline__ vector signed int __ATTRS_o_ai vec_mul(vector signed int __a, vector signed int __b) { return __a * __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_mul(vector unsigned int __a, vector unsigned int __b) { return __a * __b; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_mul(vector signed long long __a, vector signed long long __b) { return __a * __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mul(vector unsigned long long __a, vector unsigned long long __b) { return __a * __b; } #endif # 5622 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_mul(vector float __a, vector float __b) { return __a * __b; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_mul(vector double __a, vector double __b) { return __a * __b; } #endif # 5634 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* The vmulos* and vmules* instructions have a big endian bias, so we must reverse the meaning of "even" and "odd" for little endian. */ /* vec_mule */ static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosb(__a, __b); #else # 5645 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulesb(__a, __b); #endif # 5647 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuloub(__a, __b); #else # 5654 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuleub(__a, __b); #endif # 5656 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosh(__a, __b); #else # 5663 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulesh(__a, __b); #endif # 5665 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouh(__a, __b); #else # 5672 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuleuh(__a, __b); #endif # 5674 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosw(__a, __b); #else # 5682 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulesw(__a, __b); #endif # 5684 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mule(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouw(__a, __b); #else # 5691 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuleuw(__a, __b); #endif # 5693 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 5695 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmulesb */ static __inline__ vector short __attribute__((__always_inline__)) vec_vmulesb(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosb(__a, __b); #else # 5703 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulesb(__a, __b); #endif # 5705 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmuleub */ static __inline__ vector unsigned short __attribute__((__always_inline__)) vec_vmuleub(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuloub(__a, __b); #else # 5714 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuleub(__a, __b); #endif # 5716 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmulesh */ static __inline__ vector int __attribute__((__always_inline__)) vec_vmulesh(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulosh(__a, __b); #else # 5725 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulesh(__a, __b); #endif # 5727 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmuleuh */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulouh(__a, __b); #else # 5736 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuleuh(__a, __b); #endif # 5738 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_mulo */ static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesb(__a, __b); #else # 5747 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulosb(__a, __b); #endif # 5749 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleub(__a, __b); #else # 5756 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuloub(__a, __b); #endif # 5758 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesh(__a, __b); #else # 5765 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulosh(__a, __b); #endif # 5767 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuh(__a, __b); #else # 5774 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulouh(__a, __b); #endif # 5776 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesw(__a, __b); #else # 5784 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulosw(__a, __b); #endif # 5786 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned long long __ATTRS_o_ai vec_mulo(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuw(__a, __b); #else # 5793 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulouw(__a, __b); #endif # 5795 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 5797 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vmulosb */ static __inline__ vector short __attribute__((__always_inline__)) vec_vmulosb(vector signed char __a, vector signed char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesb(__a, __b); #else # 5805 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulosb(__a, __b); #endif # 5807 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmuloub */ static __inline__ vector unsigned short __attribute__((__always_inline__)) vec_vmuloub(vector unsigned char __a, vector unsigned char __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleub(__a, __b); #else # 5816 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmuloub(__a, __b); #endif # 5818 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmulosh */ static __inline__ vector int __attribute__((__always_inline__)) vec_vmulosh(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmulesh(__a, __b); #else # 5827 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulosh(__a, __b); #endif # 5829 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vmulouh */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vmulouh(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vmuleuh(__a, __b); #else # 5838 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vmulouh(__a, __b); #endif # 5840 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_nand */ #ifdef __POWER8_VECTOR__ static __inline__ vector signed char __ATTRS_o_ai vec_nand(vector signed char __a, vector signed char __b) { return ~(__a & __b); } static __inline__ vector signed char __ATTRS_o_ai vec_nand(vector signed char __a, vector bool char __b) { return ~(__a & __b); } static __inline__ vector signed char __ATTRS_o_ai vec_nand(vector bool char __a, vector signed char __b) { return ~(__a & __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a, vector unsigned char __b) { return ~(__a & __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a, vector bool char __b) { return ~(__a & __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_nand(vector bool char __a, vector unsigned char __b) { return ~(__a & __b); } static __inline__ vector bool char __ATTRS_o_ai vec_nand(vector bool char __a, vector bool char __b) { return ~(__a & __b); } static __inline__ vector signed short __ATTRS_o_ai vec_nand(vector signed short __a, vector signed short __b) { return ~(__a & __b); } static __inline__ vector signed short __ATTRS_o_ai vec_nand(vector signed short __a, vector bool short __b) { return ~(__a & __b); } static __inline__ vector signed short __ATTRS_o_ai vec_nand(vector bool short __a, vector signed short __b) { return ~(__a & __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a, vector unsigned short __b) { return ~(__a & __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a, vector bool short __b) { return ~(__a & __b); } static __inline__ vector bool short __ATTRS_o_ai vec_nand(vector bool short __a, vector bool short __b) { return ~(__a & __b); } static __inline__ vector signed int __ATTRS_o_ai vec_nand(vector signed int __a, vector signed int __b) { return ~(__a & __b); } static __inline__ vector signed int __ATTRS_o_ai vec_nand(vector signed int __a, vector bool int __b) { return ~(__a & __b); } static __inline__ vector signed int __ATTRS_o_ai vec_nand(vector bool int __a, vector signed int __b) { return ~(__a & __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a, vector unsigned int __b) { return ~(__a & __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a, vector bool int __b) { return ~(__a & __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_nand(vector bool int __a, vector unsigned int __b) { return ~(__a & __b); } static __inline__ vector bool int __ATTRS_o_ai vec_nand(vector bool int __a, vector bool int __b) { return ~(__a & __b); } static __inline__ vector float __ATTRS_o_ai vec_nand(vector float __a, vector float __b) { return (vector float)(~((vector unsigned int)__a & (vector unsigned int)__b)); } static __inline__ vector signed long long __ATTRS_o_ai vec_nand(vector signed long long __a, vector signed long long __b) { return ~(__a & __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_nand(vector signed long long __a, vector bool long long __b) { return ~(__a & __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_nand(vector bool long long __a, vector signed long long __b) { return ~(__a & __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_nand(vector unsigned long long __a, vector unsigned long long __b) { return ~(__a & __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_nand(vector unsigned long long __a, vector bool long long __b) { return ~(__a & __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_nand(vector bool long long __a, vector unsigned long long __b) { return ~(__a & __b); } static __inline__ vector bool long long __ATTRS_o_ai vec_nand(vector bool long long __a, vector bool long long __b) { return ~(__a & __b); } static __inline__ vector double __ATTRS_o_ai vec_nand(vector double __a, vector double __b) { return (vector double)(~((vector unsigned long long)__a & (vector unsigned long long)__b)); } #endif # 5993 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_nmadd */ #ifdef __VSX__ static __inline__ vector float __ATTRS_o_ai vec_nmadd(vector float __a, vector float __b, vector float __c) { return __builtin_vsx_xvnmaddasp(__a, __b, __c); } static __inline__ vector double __ATTRS_o_ai vec_nmadd(vector double __a, vector double __b, vector double __c) { return __builtin_vsx_xvnmaddadp(__a, __b, __c); } #endif # 6009 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_nmsub */ static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c) { #ifdef __VSX__ return __builtin_vsx_xvnmsubasp(__a, __b, __c); #else # 6018 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vnmsubfp(__a, __b, __c); #endif # 6020 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_nmsub(vector double __a, vector double __b, vector double __c) { return __builtin_vsx_xvnmsubadp(__a, __b, __c); } #endif # 6029 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vnmsubfp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vnmsubfp(vector float __a, vector float __b, vector float __c) { return __builtin_altivec_vnmsubfp(__a, __b, __c); } /* vec_nor */ #define __builtin_altivec_vnor vec_nor static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b) { return ~(__a | __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a, vector unsigned char __b) { return ~(__a | __b); } static __inline__ vector bool char __ATTRS_o_ai vec_nor(vector bool char __a, vector bool char __b) { return ~(__a | __b); } static __inline__ vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) { return ~(__a | __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a, vector unsigned short __b) { return ~(__a | __b); } static __inline__ vector bool short __ATTRS_o_ai vec_nor(vector bool short __a, vector bool short __b) { return ~(__a | __b); } static __inline__ vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) { return ~(__a | __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a, vector unsigned int __b) { return ~(__a | __b); } static __inline__ vector bool int __ATTRS_o_ai vec_nor(vector bool int __a, vector bool int __b) { return ~(__a | __b); } static __inline__ vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) { vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b); return (vector float)__res; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_nor(vector double __a, vector double __b) { vector unsigned long long __res = ~((vector unsigned long long)__a | (vector unsigned long long)__b); return (vector double)__res; } #endif # 6101 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vnor */ static __inline__ vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, vector signed char __b) { return ~(__a | __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a, vector unsigned char __b) { return ~(__a | __b); } static __inline__ vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a, vector bool char __b) { return ~(__a | __b); } static __inline__ vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) { return ~(__a | __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a, vector unsigned short __b) { return ~(__a | __b); } static __inline__ vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a, vector bool short __b) { return ~(__a | __b); } static __inline__ vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) { return ~(__a | __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a, vector unsigned int __b) { return ~(__a | __b); } static __inline__ vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a, vector bool int __b) { return ~(__a | __b); } static __inline__ vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) { vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b); return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_nor(vector signed long long __a, vector signed long long __b) { return ~(__a | __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_nor(vector unsigned long long __a, vector unsigned long long __b) { return ~(__a | __b); } static __inline__ vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a, vector bool long long __b) { return ~(__a | __b); } #endif # 6172 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_or */ #define __builtin_altivec_vor vec_or static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b) { return __a | __b; } static __inline__ vector signed char __ATTRS_o_ai vec_or(vector bool char __a, vector signed char __b) { return (vector signed char)__a | __b; } static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector bool char __b) { return __a | (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a, vector unsigned char __b) { return __a | __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a | __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a, vector bool char __b) { return __a | (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_or(vector bool char __a, vector bool char __b) { return __a | __b; } static __inline__ vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) { return __a | __b; } static __inline__ vector short __ATTRS_o_ai vec_or(vector bool short __a, vector short __b) { return (vector short)__a | __b; } static __inline__ vector short __ATTRS_o_ai vec_or(vector short __a, vector bool short __b) { return __a | (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a, vector unsigned short __b) { return __a | __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a | __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a, vector bool short __b) { return __a | (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_or(vector bool short __a, vector bool short __b) { return __a | __b; } static __inline__ vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) { return __a | __b; } static __inline__ vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) { return (vector int)__a | __b; } static __inline__ vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) { return __a | (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a, vector unsigned int __b) { return __a | __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a | __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a, vector bool int __b) { return __a | (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_or(vector bool int __a, vector bool int __b) { return __a | __b; } static __inline__ vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_or(vector bool long long __a, vector double __b) { return (vector double)((vector unsigned long long)__a | (vector unsigned long long)__b); } static __inline__ vector double __ATTRS_o_ai vec_or(vector double __a, vector bool long long __b) { return (vector double)((vector unsigned long long)__a | (vector unsigned long long)__b); } static __inline__ vector double __ATTRS_o_ai vec_or(vector double __a, vector double __b) { return (vector double)((vector unsigned long long)__a | (vector unsigned long long)__b); } static __inline__ vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a, vector signed long long __b) { return __a | __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_or(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a | __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a, vector bool long long __b) { return __a | (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_or(vector unsigned long long __a, vector unsigned long long __b) { return __a | __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_or(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a | __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_or(vector unsigned long long __a, vector bool long long __b) { return __a | (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a, vector bool long long __b) { return __a | __b; } #endif # 6357 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER8_VECTOR__ static __inline__ vector signed char __ATTRS_o_ai vec_orc(vector signed char __a, vector signed char __b) { return __a | ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_orc(vector signed char __a, vector bool char __b) { return __a | ~__b; } static __inline__ vector signed char __ATTRS_o_ai vec_orc(vector bool char __a, vector signed char __b) { return __a | ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a, vector unsigned char __b) { return __a | ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a, vector bool char __b) { return __a | ~__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_orc(vector bool char __a, vector unsigned char __b) { return __a | ~__b; } static __inline__ vector bool char __ATTRS_o_ai vec_orc(vector bool char __a, vector bool char __b) { return __a | ~__b; } static __inline__ vector signed short __ATTRS_o_ai vec_orc(vector signed short __a, vector signed short __b) { return __a | ~__b; } static __inline__ vector signed short __ATTRS_o_ai vec_orc(vector signed short __a, vector bool short __b) { return __a | ~__b; } static __inline__ vector signed short __ATTRS_o_ai vec_orc(vector bool short __a, vector signed short __b) { return __a | ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a, vector unsigned short __b) { return __a | ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a, vector bool short __b) { return __a | ~__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_orc(vector bool short __a, vector unsigned short __b) { return __a | ~__b; } static __inline__ vector bool short __ATTRS_o_ai vec_orc(vector bool short __a, vector bool short __b) { return __a | ~__b; } static __inline__ vector signed int __ATTRS_o_ai vec_orc(vector signed int __a, vector signed int __b) { return __a | ~__b; } static __inline__ vector signed int __ATTRS_o_ai vec_orc(vector signed int __a, vector bool int __b) { return __a | ~__b; } static __inline__ vector signed int __ATTRS_o_ai vec_orc(vector bool int __a, vector signed int __b) { return __a | ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a, vector unsigned int __b) { return __a | ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a, vector bool int __b) { return __a | ~__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_orc(vector bool int __a, vector unsigned int __b) { return __a | ~__b; } static __inline__ vector bool int __ATTRS_o_ai vec_orc(vector bool int __a, vector bool int __b) { return __a | ~__b; } static __inline__ vector float __ATTRS_o_ai vec_orc(vector bool int __a, vector float __b) { return (vector float)(__a | ~(vector unsigned int)__b); } static __inline__ vector float __ATTRS_o_ai vec_orc(vector float __a, vector bool int __b) { return (vector float)((vector unsigned int)__a | ~__b); } static __inline__ vector signed long long __ATTRS_o_ai vec_orc(vector signed long long __a, vector signed long long __b) { return __a | ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_orc(vector signed long long __a, vector bool long long __b) { return __a | ~__b; } static __inline__ vector signed long long __ATTRS_o_ai vec_orc(vector bool long long __a, vector signed long long __b) { return __a | ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_orc(vector unsigned long long __a, vector unsigned long long __b) { return __a | ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_orc(vector unsigned long long __a, vector bool long long __b) { return __a | ~__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_orc(vector bool long long __a, vector unsigned long long __b) { return __a | ~__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_orc(vector bool long long __a, vector bool long long __b) { return __a | ~__b; } static __inline__ vector double __ATTRS_o_ai vec_orc(vector double __a, vector bool long long __b) { return (vector double)((vector unsigned long long)__a | ~__b); } static __inline__ vector double __ATTRS_o_ai vec_orc(vector bool long long __a, vector double __b) { return (vector double)(__a | ~(vector unsigned long long)__b); } #endif # 6519 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vor */ static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector signed char __b) { return __a | __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector bool char __a, vector signed char __b) { return (vector signed char)__a | __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector bool char __b) { return __a | (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a, vector unsigned char __b) { return __a | __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a | __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a, vector bool char __b) { return __a | (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_vor(vector bool char __a, vector bool char __b) { return __a | __b; } static __inline__ vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) { return __a | __b; } static __inline__ vector short __ATTRS_o_ai vec_vor(vector bool short __a, vector short __b) { return (vector short)__a | __b; } static __inline__ vector short __ATTRS_o_ai vec_vor(vector short __a, vector bool short __b) { return __a | (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a, vector unsigned short __b) { return __a | __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a | __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a, vector bool short __b) { return __a | (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_vor(vector bool short __a, vector bool short __b) { return __a | __b; } static __inline__ vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) { return __a | __b; } static __inline__ vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) { return (vector int)__a | __b; } static __inline__ vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) { return __a | (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a, vector unsigned int __b) { return __a | __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a | __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a, vector bool int __b) { return __a | (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_vor(vector bool int __a, vector bool int __b) { return __a | __b; } static __inline__ vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vor(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vor(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a, vector signed long long __b) { return __a | __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vor(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a | __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a, vector bool long long __b) { return __a | (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vor(vector unsigned long long __a, vector unsigned long long __b) { return __a | __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vor(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a | __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vor(vector unsigned long long __a, vector bool long long __b) { return __a | (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a, vector bool long long __b) { return __a | __b; } #endif # 6684 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_pack */ /* The various vector pack instructions have a big-endian bias, so for little endian we must handle reversed element numbering. */ static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b) { #ifdef __LITTLE_ENDIAN__ return (vector signed char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6698 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6703 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6713 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6718 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool char __ATTRS_o_ai vec_pack(vector bool short __a, vector bool short __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6728 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6733 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return (vector short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6743 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6748 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6758 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6763 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_pack(vector bool int __a, vector bool int __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6773 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6778 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector signed int __ATTRS_o_ai vec_pack(vector signed long long __a, vector signed long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector signed int)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6789 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed int)vec_perm( __a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6794 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_pack(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6803 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)vec_perm( __a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6808 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_pack(vector bool long long __a, vector bool long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6818 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)vec_perm( __a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6823 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_pack(vector double __a, vector double __b) { return (vector float) (__a[0], __a[1], __b[0], __b[1]); } #endif # 6830 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER9_VECTOR__ static __inline__ vector unsigned short __ATTRS_o_ai vec_pack_to_short_fp32(vector float __a, vector float __b) { vector float __resa = __builtin_vsx_xvcvsphp(__a); vector float __resb = __builtin_vsx_xvcvsphp(__b); #ifdef __LITTLE_ENDIAN__ return (vector unsigned short)vec_mergee(__resa, __resb); #else # 6839 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned short)vec_mergeo(__resa, __resb); #endif # 6841 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 6844 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vpkuhum */ #define __builtin_altivec_vpkuhum vec_vpkuhum static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b) { #ifdef __LITTLE_ENDIAN__ return (vector signed char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6856 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6861 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6871 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6876 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a, vector bool short __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool char)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E)); #else # 6886 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool char)vec_perm( __a, __b, (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F)); #endif # 6891 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkuwum */ #define __builtin_altivec_vpkuwum vec_vpkuwum static __inline__ vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return (vector short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6905 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6910 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6920 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6925 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a, vector bool int __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D)); #else # 6935 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)vec_perm( __a, __b, (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F, 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F)); #endif # 6940 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkudum */ #ifdef __POWER8_VECTOR__ #define __builtin_altivec_vpkudum vec_vpkudum static __inline__ vector int __ATTRS_o_ai vec_vpkudum(vector long long __a, vector long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector int)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6955 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector int)vec_perm( __a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6960 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)vec_perm( __a, __b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6970 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)vec_perm( __a, __b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6975 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a, vector bool long long __b) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)vec_perm( (vector long long)__a, (vector long long)__b, (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B)); #else # 6985 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)vec_perm( (vector long long)__a, (vector long long)__b, (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F)); #endif # 6990 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 6992 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_packpx */ static __inline__ vector pixel __attribute__((__always_inline__)) vec_packpx(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector pixel)__builtin_altivec_vpkpx(__b, __a); #else # 7000 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector pixel)__builtin_altivec_vpkpx(__a, __b); #endif # 7002 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkpx */ static __inline__ vector pixel __attribute__((__always_inline__)) vec_vpkpx(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return (vector pixel)__builtin_altivec_vpkpx(__b, __a); #else # 7011 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector pixel)__builtin_altivec_vpkpx(__a, __b); #endif # 7013 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_packs */ static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshss(__b, __a); #else # 7022 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkshss(__a, __b); #endif # 7024 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else # 7031 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuhus(__a, __b); #endif # 7033 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector signed short __ATTRS_o_ai vec_packs(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswss(__b, __a); #else # 7040 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkswss(__a, __b); #endif # 7042 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else # 7049 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuwus(__a, __b); #endif # 7051 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector int __ATTRS_o_ai vec_packs(vector long long __a, vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdss(__b, __a); #else # 7059 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpksdss(__a, __b); #endif # 7061 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_packs(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else # 7068 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkudus(__a, __b); #endif # 7070 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7072 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vpkshss */ static __inline__ vector signed char __attribute__((__always_inline__)) vec_vpkshss(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshss(__b, __a); #else # 7080 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkshss(__a, __b); #endif # 7082 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpksdss */ #ifdef __POWER8_VECTOR__ static __inline__ vector int __ATTRS_o_ai vec_vpksdss(vector long long __a, vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdss(__b, __a); #else # 7092 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpksdss(__a, __b); #endif # 7094 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7096 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vpkuhus */ static __inline__ vector unsigned char __attribute__((__always_inline__)) vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else # 7104 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuhus(__a, __b); #endif # 7106 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkudus */ #ifdef __POWER8_VECTOR__ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else # 7116 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkudus(__a, __b); #endif # 7118 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7120 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vpkswss */ static __inline__ vector signed short __attribute__((__always_inline__)) vec_vpkswss(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswss(__b, __a); #else # 7128 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkswss(__a, __b); #endif # 7130 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkuwus */ static __inline__ vector unsigned short __attribute__((__always_inline__)) vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else # 7139 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuwus(__a, __b); #endif # 7141 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_packsu */ static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshus(__b, __a); #else # 7150 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkshus(__a, __b); #endif # 7152 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else # 7159 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuhus(__a, __b); #endif # 7161 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswus(__b, __a); #else # 7168 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkswus(__a, __b); #endif # 7170 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else # 7177 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuwus(__a, __b); #endif # 7179 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a, vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdus(__b, __a); #else # 7187 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpksdus(__a, __b); #endif # 7189 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_packsu(vector unsigned long long __a, vector unsigned long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkudus(__b, __a); #else # 7196 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkudus(__a, __b); #endif # 7198 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7200 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vpkshus */ static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a, vector short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkshus(__b, __a); #else # 7208 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkshus(__a, __b); #endif # 7210 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkshus(vector unsigned short __a, vector unsigned short __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuhus(__b, __a); #else # 7217 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuhus(__a, __b); #endif # 7219 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpkswus */ static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkswus(__b, __a); #else # 7228 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkswus(__a, __b); #endif # 7230 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a, vector unsigned int __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpkuwus(__b, __a); #else # 7237 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpkuwus(__a, __b); #endif # 7239 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vpksdus */ #ifdef __POWER8_VECTOR__ static __inline__ vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a, vector long long __b) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vpksdus(__b, __a); #else # 7249 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vpksdus(__a, __b); #endif # 7251 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7253 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_perm */ // The vperm instruction is defined architecturally with a big-endian bias. // For little endian, we swap the input operands and invert the permute // control vector. Only the rightmost 5 bits matter, so we could use // a vector of all 31s instead of all 255s to perform the inversion. // However, when the PCV is not a constant, using 255 has an advantage // in that the vec_xor can be recognized as a vec_nor (and for P8 and // later, possibly a vec_nand). static __inline__ vector signed char __ATTRS_o_ai vec_perm( vector signed char __a, vector signed char __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7273 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7276 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector unsigned char)__builtin_altivec_vperm_4si( (vector int)__b, (vector int)__a, __d); #else # 7288 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned char)__builtin_altivec_vperm_4si( (vector int)__a, (vector int)__b, __c); #endif # 7291 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool char __ATTRS_o_ai vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7302 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7305 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector short __ATTRS_o_ai vec_perm(vector signed short __a, vector signed short __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector signed short)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7317 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed short)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7320 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a, vector unsigned short __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector unsigned short)__builtin_altivec_vperm_4si( (vector int)__b, (vector int)__a, __d); #else # 7332 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned short)__builtin_altivec_vperm_4si( (vector int)__a, (vector int)__b, __c); #endif # 7335 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_perm( vector bool short __a, vector bool short __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7346 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7349 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7361 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7364 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_perm(vector signed int __a, vector signed int __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector signed int)__builtin_altivec_vperm_4si(__b, __a, __d); #else # 7375 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed int)__builtin_altivec_vperm_4si(__a, __b, __c); #endif # 7377 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7389 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7392 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7403 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7406 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector float)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7418 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector float)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7421 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector long long __ATTRS_o_ai vec_perm(vector signed long long __a, vector signed long long __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector signed long long)__builtin_altivec_vperm_4si( (vector int)__b, (vector int)__a, __d); #else # 7434 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector signed long long)__builtin_altivec_vperm_4si( (vector int)__a, (vector int)__b, __c); #endif # 7437 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned long long __ATTRS_o_ai vec_perm(vector unsigned long long __a, vector unsigned long long __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector unsigned long long)__builtin_altivec_vperm_4si( (vector int)__b, (vector int)__a, __d); #else # 7449 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned long long)__builtin_altivec_vperm_4si( (vector int)__a, (vector int)__b, __c); #endif # 7452 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool long long __ATTRS_o_ai vec_perm(vector bool long long __a, vector bool long long __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector bool long long)__builtin_altivec_vperm_4si( (vector int)__b, (vector int)__a, __d); #else # 7464 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool long long)__builtin_altivec_vperm_4si( (vector int)__a, (vector int)__b, __c); #endif # 7467 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b, vector unsigned char __c) { #ifdef __LITTLE_ENDIAN__ vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; __d = vec_xor(__c, __d); return (vector double)__builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d); #else # 7478 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector double)__builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c); #endif # 7481 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 7483 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vperm */ static __inline__ vector signed char __ATTRS_o_ai vec_vperm( vector signed char __a, vector signed char __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector bool char __ATTRS_o_ai vec_vperm( vector bool char __a, vector bool char __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a, vector unsigned short __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector bool short __ATTRS_o_ai vec_vperm( vector bool short __a, vector bool short __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } #ifdef __VSX__ static __inline__ vector long long __ATTRS_o_ai vec_vperm( vector long long __a, vector long long __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vperm(vector unsigned long long __a, vector unsigned long long __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } static __inline__ vector double __ATTRS_o_ai vec_vperm(vector double __a, vector double __b, vector unsigned char __c) { return vec_perm(__a, __b, __c); } #endif # 7562 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_re */ static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvresp(__a); #else # 7569 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrefp(__a); #endif # 7571 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_re(vector double __a) { return __builtin_vsx_xvredp(__a); } #endif # 7578 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrefp */ static __inline__ vector float __attribute__((__always_inline__)) vec_vrefp(vector float __a) { return __builtin_altivec_vrefp(__a); } /* vec_rl */ static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_rl(vector short __a, vector unsigned short __b) { return __builtin_altivec_vrlh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) { return __builtin_altivec_vrlw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_rl(vector signed long long __a, vector unsigned long long __b) { return __builtin_altivec_vrld(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_rl(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vrld(__a, __b); } #endif # 7629 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_rlmi */ #ifdef __POWER9_VECTOR__ static __inline__ vector unsigned int __ATTRS_o_ai vec_rlmi(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { return __builtin_altivec_vrlwmi(__a, __c, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_rlmi(vector unsigned long long __a, vector unsigned long long __b, vector unsigned long long __c) { return __builtin_altivec_vrldmi(__a, __c, __b); } /* vec_rlnm */ static __inline__ vector unsigned int __ATTRS_o_ai vec_rlnm(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { vector unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 }; return __builtin_altivec_vrlwnm(__a, ((__c << OneByte) | __b)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_rlnm(vector unsigned long long __a, vector unsigned long long __b, vector unsigned long long __c) { vector unsigned long long OneByte = { 0x8, 0x8 }; return __builtin_altivec_vrldnm(__a, ((__c << OneByte) | __b)); } #endif # 7659 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrlb */ static __inline__ vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b); } /* vec_vrlh */ static __inline__ vector short __ATTRS_o_ai vec_vrlh(vector short __a, vector unsigned short __b) { return __builtin_altivec_vrlh(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b); } /* vec_vrlw */ static __inline__ vector int __ATTRS_o_ai vec_vrlw(vector int __a, vector unsigned int __b) { return __builtin_altivec_vrlw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } /* vec_round */ static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvrspi(__a); #else # 7702 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrfin(__a); #endif # 7704 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_round(vector double __a) { return __builtin_vsx_xvrdpi(__a); } /* vec_rint */ static __inline__ vector float __ATTRS_o_ai vec_rint(vector float __a) { return __builtin_vsx_xvrspic(__a); } static __inline__ vector double __ATTRS_o_ai vec_rint(vector double __a) { return __builtin_vsx_xvrdpic(__a); } /* vec_nearbyint */ static __inline__ vector float __ATTRS_o_ai vec_nearbyint(vector float __a) { return __builtin_vsx_xvrspi(__a); } static __inline__ vector double __ATTRS_o_ai vec_nearbyint(vector double __a) { return __builtin_vsx_xvrdpi(__a); } #endif # 7731 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrfin */ static __inline__ vector float __attribute__((__always_inline__)) vec_vrfin(vector float __a) { return __builtin_altivec_vrfin(__a); } /* vec_sqrt */ #ifdef __VSX__ static __inline__ vector float __ATTRS_o_ai vec_sqrt(vector float __a) { return __builtin_vsx_xvsqrtsp(__a); } static __inline__ vector double __ATTRS_o_ai vec_sqrt(vector double __a) { return __builtin_vsx_xvsqrtdp(__a); } #endif # 7750 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_rsqrte */ static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvrsqrtesp(__a); #else # 7757 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrsqrtefp(__a); #endif # 7759 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_rsqrte(vector double __a) { return __builtin_vsx_xvrsqrtedp(__a); } #endif # 7766 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrsqrtefp */ static __inline__ __vector float __attribute__((__always_inline__)) vec_vrsqrtefp(vector float __a) { return __builtin_altivec_vrsqrtefp(__a); } /* vec_sel */ #define __builtin_altivec_vsel_4si vec_sel static __inline__ vector signed char __ATTRS_o_ai vec_sel( vector signed char __a, vector signed char __b, vector unsigned char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector bool char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sel( vector unsigned char __a, vector unsigned char __b, vector bool char __c) { return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c); } static __inline__ vector bool char __ATTRS_o_ai vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c) { return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c); } static __inline__ vector bool char __ATTRS_o_ai vec_sel(vector bool char __a, vector bool char __b, vector bool char __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b, vector unsigned short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } static __inline__ vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b, vector bool short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c) { return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c); } static __inline__ vector bool short __ATTRS_o_ai vec_sel( vector bool short __a, vector bool short __b, vector unsigned short __c) { return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c); } static __inline__ vector bool short __ATTRS_o_ai vec_sel(vector bool short __a, vector bool short __b, vector bool short __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b, vector unsigned int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } static __inline__ vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b, vector bool int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sel( vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) { return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c); } static __inline__ vector bool int __ATTRS_o_ai vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c) { return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c); } static __inline__ vector bool int __ATTRS_o_ai vec_sel(vector bool int __a, vector bool int __b, vector bool int __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b, vector unsigned int __c) { vector int __res = ((vector int)__a & ~(vector int)__c) | ((vector int)__b & (vector int)__c); return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b, vector bool int __c) { vector int __res = ((vector int)__a & ~(vector int)__c) | ((vector int)__b & (vector int)__c); return (vector float)__res; } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b, vector bool long long __c) { vector long long __res = ((vector long long)__a & ~(vector long long)__c) | ((vector long long)__b & (vector long long)__c); return (vector double)__res; } static __inline__ vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b, vector unsigned long long __c) { vector long long __res = ((vector long long)__a & ~(vector long long)__c) | ((vector long long)__b & (vector long long)__c); return (vector double)__res; } #endif # 7909 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsel */ static __inline__ vector signed char __ATTRS_o_ai vec_vsel( vector signed char __a, vector signed char __b, vector unsigned char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } static __inline__ vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c) { return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsel( vector unsigned char __a, vector unsigned char __b, vector bool char __c) { return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c); } static __inline__ vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c) { return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c); } static __inline__ vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b, vector unsigned short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } static __inline__ vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b, vector bool short __c) { return (__a & ~(vector short)__c) | (__b & (vector short)__c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c) { return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c); } static __inline__ vector bool short __ATTRS_o_ai vec_vsel( vector bool short __a, vector bool short __b, vector unsigned short __c) { return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c); } static __inline__ vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b, vector unsigned int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } static __inline__ vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b, vector bool int __c) { return (__a & ~(vector int)__c) | (__b & (vector int)__c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsel( vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsel( vector unsigned int __a, vector unsigned int __b, vector bool int __c) { return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c); } static __inline__ vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c) { return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c); } static __inline__ vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c) { return (__a & ~__c) | (__b & __c); } static __inline__ vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b, vector unsigned int __c) { vector int __res = ((vector int)__a & ~(vector int)__c) | ((vector int)__b & (vector int)__c); return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b, vector bool int __c) { vector int __res = ((vector int)__a & ~(vector int)__c) | ((vector int)__b & (vector int)__c); return (vector float)__res; } /* vec_sl */ // vec_sl does modulo arithmetic on __b first, so __b is allowed to be more // than the length of __a. static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b) { return __a << (__b % (vector unsigned char)(sizeof(unsigned char) * __CHAR_BIT__)); } static __inline__ vector signed char __ATTRS_o_ai vec_sl(vector signed char __a, vector unsigned char __b) { return (vector signed char)vec_sl((vector unsigned char)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a, vector unsigned short __b) { return __a << (__b % (vector unsigned short)(sizeof(unsigned short) * __CHAR_BIT__)); } static __inline__ vector short __ATTRS_o_ai vec_sl(vector short __a, vector unsigned short __b) { return (vector short)vec_sl((vector unsigned short)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a, vector unsigned int __b) { return __a << (__b % (vector unsigned int)(sizeof(unsigned int) * __CHAR_BIT__)); } static __inline__ vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) { return (vector int)vec_sl((vector unsigned int)__a, __b); } #ifdef __POWER8_VECTOR__ static __inline__ vector unsigned long long __ATTRS_o_ai vec_sl(vector unsigned long long __a, vector unsigned long long __b) { return __a << (__b % (vector unsigned long long)(sizeof(unsigned long long) * __CHAR_BIT__)); } static __inline__ vector long long __ATTRS_o_ai vec_sl(vector long long __a, vector unsigned long long __b) { return (vector long long)vec_sl((vector unsigned long long)__a, __b); } #endif # 8076 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vslb */ #define __builtin_altivec_vslb vec_vslb static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b) { return vec_sl(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a, vector unsigned char __b) { return vec_sl(__a, __b); } /* vec_vslh */ #define __builtin_altivec_vslh vec_vslh static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b) { return vec_sl(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a, vector unsigned short __b) { return vec_sl(__a, __b); } /* vec_vslw */ #define __builtin_altivec_vslw vec_vslw static __inline__ vector int __ATTRS_o_ai vec_vslw(vector int __a, vector unsigned int __b) { return vec_sl(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a, vector unsigned int __b) { return vec_sl(__a, __b); } /* vec_sld */ #define __builtin_altivec_vsldoi_4si vec_sld static __inline__ vector signed char __ATTRS_o_ai vec_sld( vector signed char __a, vector signed char __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8133 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8139 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8152 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8158 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool char __ATTRS_o_ai vec_sld(vector bool char __a, vector bool char __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8170 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8176 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector signed short __ATTRS_o_ai vec_sld( vector signed short __a, vector signed short __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8188 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8194 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8207 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8213 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_sld(vector bool short __a, vector bool short __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8225 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8231 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8244 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8250 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int __a, vector signed int __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8262 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8268 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_sld( vector unsigned int __a, vector unsigned int __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8280 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8286 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_sld(vector bool int __a, vector bool int __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8299 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8305 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8318 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8324 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_sld(vector bool long long __a, vector bool long long __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8338 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8344 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector signed long long __ATTRS_o_ai vec_sld(vector signed long long __a, vector signed long long __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8357 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8363 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sld(vector unsigned long long __a, vector unsigned long long __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8376 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8382 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_sld(vector double __a, vector double __b, unsigned const int __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8395 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8401 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 8403 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_sldw */ static __inline__ vector signed char __ATTRS_o_ai vec_sldw( vector signed char __a, vector signed char __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sldw(vector unsigned char __a, vector unsigned char __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector signed short __ATTRS_o_ai vec_sldw( vector signed short __a, vector signed short __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sldw(vector unsigned short __a, vector unsigned short __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector signed int __ATTRS_o_ai vec_sldw(vector signed int __a, vector signed int __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sldw( vector unsigned int __a, vector unsigned int __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_sldw(vector signed long long __a, vector signed long long __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sldw(vector unsigned long long __a, vector unsigned long long __b, unsigned const int __c) { return vec_sld(__a, __b, ((__c << 2) & 0x0F)); } #endif # 8450 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER9_VECTOR__ /* vec_slv */ static __inline__ vector unsigned char __ATTRS_o_ai vec_slv(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vslv(__a, __b); } /* vec_srv */ static __inline__ vector unsigned char __ATTRS_o_ai vec_srv(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vsrv(__a, __b); } #endif # 8464 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsldoi */ static __inline__ vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8477 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8483 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsldoi( vector unsigned char __a, vector unsigned char __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8495 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8501 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8514 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8520 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsldoi( vector unsigned short __a, vector unsigned short __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8532 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8538 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8551 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8557 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8570 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8576 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsldoi( vector unsigned int __a, vector unsigned int __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8588 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8594 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b, unsigned char __c) { unsigned char __d = __c & 0x0F; #ifdef __LITTLE_ENDIAN__ return vec_perm( __b, __a, (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d, 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d, 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d, 31 - __d)); #else # 8607 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return vec_perm( __a, __b, (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5, __d + 6, __d + 7, __d + 8, __d + 9, __d + 10, __d + 11, __d + 12, __d + 13, __d + 14, __d + 15)); #endif # 8613 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_sll */ static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned short __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned int __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, vector unsigned short __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a, vector unsigned int __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, vector unsigned short __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_sll(vector bool char __a, vector unsigned int __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_sll(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_sll(vector short __a, vector unsigned short __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_sll(vector short __a, vector unsigned int __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a, vector unsigned int __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, vector unsigned char __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_sll(vector bool short __a, vector unsigned int __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_sll(vector pixel __a, vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_sll(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_sll(vector int __a, vector unsigned short __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_sll(vector int __a, vector unsigned int __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, vector unsigned short __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, vector unsigned char __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, vector unsigned short __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_sll(vector bool int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_sll(vector signed long long __a, vector unsigned char __b) { return (vector signed long long)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sll(vector unsigned long long __a, vector unsigned char __b) { return (vector unsigned long long)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } #endif # 8801 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsl */ static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned short __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned int __b) { return (vector signed char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, vector unsigned short __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a, vector unsigned int __b) { return (vector unsigned char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, vector unsigned short __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a, vector unsigned int __b) { return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsl(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsl(vector short __a, vector unsigned short __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsl(vector short __a, vector unsigned int __b) { return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a, vector unsigned int __b) { return (vector unsigned short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, vector unsigned char __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a, vector unsigned int __b) { return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a, vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsl(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsl(vector int __a, vector unsigned short __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsl(vector int __a, vector unsigned int __b) { return (vector int)__builtin_altivec_vsl(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, vector unsigned short __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, vector unsigned char __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, vector unsigned short __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b); } /* vec_slo */ static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b) { return (vector signed char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a, vector signed char __b) { return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_slo(vector short __a, vector signed char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_slo(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a, vector signed char __b) { return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_slo(vector pixel __a, vector signed char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_slo(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_slo(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a, vector signed char __b) { return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_slo(vector float __a, vector signed char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_slo(vector float __a, vector unsigned char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_slo(vector signed long long __a, vector signed char __b) { return (vector signed long long)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector signed long long __ATTRS_o_ai vec_slo(vector signed long long __a, vector unsigned char __b) { return (vector signed long long)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_slo(vector unsigned long long __a, vector signed char __b) { return (vector unsigned long long)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_slo(vector unsigned long long __a, vector unsigned char __b) { return (vector unsigned long long)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } #endif # 9090 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vslo */ static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b) { return (vector signed char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a, vector signed char __b) { return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vslo(vector short __a, vector signed char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vslo(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a, vector signed char __b) { return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a, vector signed char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vslo(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vslo(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vslo(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a, vector signed char __b) { return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_vslo(vector float __a, vector signed char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_vslo(vector float __a, vector unsigned char __b) { return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b); } /* vec_splat */ static __inline__ vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, unsigned const int __b) { return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a, unsigned const int __b) { return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F)); } static __inline__ vector bool char __ATTRS_o_ai vec_splat(vector bool char __a, unsigned const int __b) { return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F)); } static __inline__ vector signed short __ATTRS_o_ai vec_splat(vector signed short __a, unsigned const int __b) { unsigned char b0 = (__b & 0x07) * 2; unsigned char b1 = b0 + 1; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a, unsigned const int __b) { unsigned char b0 = (__b & 0x07) * 2; unsigned char b1 = b0 + 1; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1)); } static __inline__ vector bool short __ATTRS_o_ai vec_splat(vector bool short __a, unsigned const int __b) { unsigned char b0 = (__b & 0x07) * 2; unsigned char b1 = b0 + 1; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1)); } static __inline__ vector pixel __ATTRS_o_ai vec_splat(vector pixel __a, unsigned const int __b) { unsigned char b0 = (__b & 0x07) * 2; unsigned char b1 = b0 + 1; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1, b0, b1)); } static __inline__ vector signed int __ATTRS_o_ai vec_splat(vector signed int __a, unsigned const int __b) { unsigned char b0 = (__b & 0x03) * 4; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a, unsigned const int __b) { unsigned char b0 = (__b & 0x03) * 4; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3)); } static __inline__ vector bool int __ATTRS_o_ai vec_splat(vector bool int __a, unsigned const int __b) { unsigned char b0 = (__b & 0x03) * 4; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3)); } static __inline__ vector float __ATTRS_o_ai vec_splat(vector float __a, unsigned const int __b) { unsigned char b0 = (__b & 0x03) * 4; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3, b0, b1, b2, b3)); } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_splat(vector double __a, unsigned const int __b) { unsigned char b0 = (__b & 0x01) * 8; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1, b2, b3, b4, b5, b6, b7)); } static __inline__ vector bool long long __ATTRS_o_ai vec_splat(vector bool long long __a, unsigned const int __b) { unsigned char b0 = (__b & 0x01) * 8; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1, b2, b3, b4, b5, b6, b7)); } static __inline__ vector signed long long __ATTRS_o_ai vec_splat(vector signed long long __a, unsigned const int __b) { unsigned char b0 = (__b & 0x01) * 8; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1, b2, b3, b4, b5, b6, b7)); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_splat(vector unsigned long long __a, unsigned const int __b) { unsigned char b0 = (__b & 0x01) * 8; unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7; return vec_perm(__a, __a, (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1, b2, b3, b4, b5, b6, b7)); } #endif # 9308 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vspltb */ #define __builtin_altivec_vspltb vec_vspltb static __inline__ vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a, unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } static __inline__ vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a, unsigned char __b) { return vec_perm(__a, __a, (vector unsigned char)(__b)); } /* vec_vsplth */ #define __builtin_altivec_vsplth vec_vsplth static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b) { __b *= 2; unsigned char b1 = __b + 1; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a, unsigned char __b) { __b *= 2; unsigned char b1 = __b + 1; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); } static __inline__ vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a, unsigned char __b) { __b *= 2; unsigned char b1 = __b + 1; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); } static __inline__ vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a, unsigned char __b) { __b *= 2; unsigned char b1 = __b + 1; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1)); } /* vec_vspltw */ #define __builtin_altivec_vspltw vec_vspltw static __inline__ vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) { __b *= 4; unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a, unsigned char __b) { __b *= 4; unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); } static __inline__ vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a, unsigned char __b) { __b *= 4; unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); } static __inline__ vector float __ATTRS_o_ai vec_vspltw(vector float __a, unsigned char __b) { __b *= 4; unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3; return vec_perm(__a, __a, (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3)); } /* vec_splat_s8 */ #define __builtin_altivec_vspltisb vec_splat_s8 // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) { return (vector signed char)(__a); } /* vec_vspltisb */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) { return (vector signed char)(__a); } /* vec_splat_s16 */ #define __builtin_altivec_vspltish vec_splat_s16 // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a) { return (vector short)(__a); } /* vec_vspltish */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a) { return (vector short)(__a); } /* vec_splat_s32 */ #define __builtin_altivec_vspltisw vec_splat_s32 // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a) { return (vector int)(__a); } /* vec_vspltisw */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a) { return (vector int)(__a); } /* vec_splat_u8 */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) { return (vector unsigned char)(__a); } /* vec_splat_u16 */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) { return (vector unsigned short)(__a); } /* vec_splat_u32 */ // FIXME: parameter should be treated as 5-bit signed literal static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) { return (vector unsigned int)(__a); } /* vec_sr */ // vec_sr does modulo arithmetic on __b first, so __b is allowed to be more // than the length of __a. static __inline__ vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b) { return __a >> (__b % (vector unsigned char)(sizeof(unsigned char) * __CHAR_BIT__)); } static __inline__ vector signed char __ATTRS_o_ai vec_sr(vector signed char __a, vector unsigned char __b) { return (vector signed char)vec_sr((vector unsigned char)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a, vector unsigned short __b) { return __a >> (__b % (vector unsigned short)(sizeof(unsigned short) * __CHAR_BIT__)); } static __inline__ vector short __ATTRS_o_ai vec_sr(vector short __a, vector unsigned short __b) { return (vector short)vec_sr((vector unsigned short)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a, vector unsigned int __b) { return __a >> (__b % (vector unsigned int)(sizeof(unsigned int) * __CHAR_BIT__)); } static __inline__ vector int __ATTRS_o_ai vec_sr(vector int __a, vector unsigned int __b) { return (vector int)vec_sr((vector unsigned int)__a, __b); } #ifdef __POWER8_VECTOR__ static __inline__ vector unsigned long long __ATTRS_o_ai vec_sr(vector unsigned long long __a, vector unsigned long long __b) { return __a >> (__b % (vector unsigned long long)(sizeof(unsigned long long) * __CHAR_BIT__)); } static __inline__ vector long long __ATTRS_o_ai vec_sr(vector long long __a, vector unsigned long long __b) { return (vector long long)vec_sr((vector unsigned long long)__a, __b); } #endif # 9531 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsrb */ #define __builtin_altivec_vsrb vec_vsrb static __inline__ vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, vector unsigned char __b) { return vec_sr(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a, vector unsigned char __b) { return vec_sr(__a, __b); } /* vec_vsrh */ #define __builtin_altivec_vsrh vec_vsrh static __inline__ vector short __ATTRS_o_ai vec_vsrh(vector short __a, vector unsigned short __b) { return vec_sr(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a, vector unsigned short __b) { return vec_sr(__a, __b); } /* vec_vsrw */ #define __builtin_altivec_vsrw vec_vsrw static __inline__ vector int __ATTRS_o_ai vec_vsrw(vector int __a, vector unsigned int __b) { return vec_sr(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a, vector unsigned int __b) { return vec_sr(__a, __b); } /* vec_sra */ static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_sra(vector short __a, vector unsigned short __b) { return __builtin_altivec_vsrah(__a, (vector unsigned short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_sra(vector int __a, vector unsigned int __b) { return __builtin_altivec_vsraw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b); } #ifdef __POWER8_VECTOR__ static __inline__ vector signed long long __ATTRS_o_ai vec_sra(vector signed long long __a, vector unsigned long long __b) { return __a >> __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sra(vector unsigned long long __a, vector unsigned long long __b) { return (vector unsigned long long)((vector signed long long)__a >> __b); } #endif # 9617 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsrab */ static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b); } /* vec_vsrah */ static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b) { return __builtin_altivec_vsrah(__a, (vector unsigned short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b); } /* vec_vsraw */ static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b) { return __builtin_altivec_vsraw(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b); } /* vec_srl */ static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned short __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned int __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, vector unsigned short __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a, vector unsigned int __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, vector unsigned short __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_srl(vector bool char __a, vector unsigned int __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_srl(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_srl(vector short __a, vector unsigned short __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_srl(vector short __a, vector unsigned int __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a, vector unsigned int __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, vector unsigned char __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_srl(vector bool short __a, vector unsigned int __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_srl(vector pixel __a, vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_srl(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_srl(vector int __a, vector unsigned short __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_srl(vector int __a, vector unsigned int __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, vector unsigned short __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, vector unsigned char __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, vector unsigned short __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_srl(vector bool int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_srl(vector signed long long __a, vector unsigned char __b) { return (vector signed long long)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_srl(vector unsigned long long __a, vector unsigned char __b) { return (vector unsigned long long)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } #endif # 9840 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsr */ static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned short __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned int __b) { return (vector signed char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, vector unsigned short __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a, vector unsigned int __b) { return (vector unsigned char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, vector unsigned char __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, vector unsigned short __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a, vector unsigned int __b) { return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsr(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsr(vector short __a, vector unsigned short __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsr(vector short __a, vector unsigned int __b) { return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, vector unsigned short __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a, vector unsigned int __b) { return (vector unsigned short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, vector unsigned char __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, vector unsigned short __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a, vector unsigned int __b) { return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, vector unsigned short __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a, vector unsigned int __b) { return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsr(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsr(vector int __a, vector unsigned short __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsr(vector int __a, vector unsigned int __b) { return (vector int)__builtin_altivec_vsr(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, vector unsigned short __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a, vector unsigned int __b) { return (vector unsigned int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, vector unsigned char __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, vector unsigned short __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } static __inline__ vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a, vector unsigned int __b) { return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b); } /* vec_sro */ static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b) { return (vector signed char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a, vector signed char __b) { return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_sro(vector short __a, vector signed char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_sro(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a, vector signed char __b) { return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_sro(vector pixel __a, vector signed char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_sro(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_sro(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a, vector signed char __b) { return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_sro(vector float __a, vector signed char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_sro(vector float __a, vector unsigned char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_sro(vector signed long long __a, vector signed char __b) { return (vector signed long long)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector signed long long __ATTRS_o_ai vec_sro(vector signed long long __a, vector unsigned char __b) { return (vector signed long long)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sro(vector unsigned long long __a, vector signed char __b) { return (vector unsigned long long)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sro(vector unsigned long long __a, vector unsigned char __b) { return (vector unsigned long long)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } #endif # 10129 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsro */ static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector signed char __b) { return (vector signed char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector unsigned char __b) { return (vector signed char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a, vector signed char __b) { return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a, vector unsigned char __b) { return (vector unsigned char)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsro(vector short __a, vector signed char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector short __ATTRS_o_ai vec_vsro(vector short __a, vector unsigned char __b) { return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a, vector signed char __b) { return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a, vector unsigned char __b) { return (vector unsigned short)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a, vector signed char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a, vector unsigned char __b) { return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsro(vector int __a, vector signed char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } static __inline__ vector int __ATTRS_o_ai vec_vsro(vector int __a, vector unsigned char __b) { return (vector int)__builtin_altivec_vsro(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a, vector signed char __b) { return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a, vector unsigned char __b) { return (vector unsigned int)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_vsro(vector float __a, vector signed char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } static __inline__ vector float __ATTRS_o_ai vec_vsro(vector float __a, vector unsigned char __b) { return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b); } /* vec_st */ static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, int __b, vector signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b, vector unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool char __a, int __b, vector bool char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b, vector unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool short __a, int __b, vector bool short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) { __builtin_altivec_stvx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b, vector unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector bool int __a, int __b, vector bool int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } /* vec_stvx */ static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, vector signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b, vector bool char *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, vector bool short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) { __builtin_altivec_stvx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, vector bool int *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) { __builtin_altivec_stvx((vector int)__a, __b, __c); } /* vec_ste */ static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) { __builtin_altivec_stvehx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) { __builtin_altivec_stvewx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } /* vec_stvebx */ static __inline__ void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvebx((vector char)__a, __b, __c); } /* vec_stvehx */ static __inline__ void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) { __builtin_altivec_stvehx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvehx((vector short)__a, __b, __c); } /* vec_stvewx */ static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) { __builtin_altivec_stvewx(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) { __builtin_altivec_stvewx((vector int)__a, __b, __c); } /* vec_stl */ static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool char __a, int __b, vector bool char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, vector bool short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, vector bool int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } /* vec_stvxl */ static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, vector signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, signed char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, unsigned char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b, vector bool char *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, vector short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, vector bool short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, unsigned short *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, vector pixel *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) { __builtin_altivec_stvxl(__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, unsigned int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, vector bool int *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, vector float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) { __builtin_altivec_stvxl((vector int)__a, __b, __c); } /* vec_sub */ static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b) { return __a - __b; } static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector bool char __a, vector signed char __b) { return (vector signed char)__a - __b; } static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector bool char __b) { return __a - (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a, vector unsigned char __b) { return __a - __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a - __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a, vector bool char __b) { return __a - (vector unsigned char)__b; } static __inline__ vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) { return __a - __b; } static __inline__ vector short __ATTRS_o_ai vec_sub(vector bool short __a, vector short __b) { return (vector short)__a - __b; } static __inline__ vector short __ATTRS_o_ai vec_sub(vector short __a, vector bool short __b) { return __a - (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a, vector unsigned short __b) { return __a - __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a - __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a, vector bool short __b) { return __a - (vector unsigned short)__b; } static __inline__ vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) { return __a - __b; } static __inline__ vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) { return (vector int)__a - __b; } static __inline__ vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) { return __a - (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a, vector unsigned int __b) { return __a - __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a - __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a, vector bool int __b) { return __a - (vector unsigned int)__b; } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 10997 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a, vector signed __int128 __b) { return __a - __b; } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a - __b; } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 11007 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_sub(vector signed long long __a, vector signed long long __b) { return __a - __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_sub(vector unsigned long long __a, vector unsigned long long __b) { return __a - __b; } static __inline__ vector double __ATTRS_o_ai vec_sub(vector double __a, vector double __b) { return __a - __b; } #endif # 11024 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) { return __a - __b; } /* vec_vsububm */ #define __builtin_altivec_vsububm vec_vsububm static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, vector signed char __b) { return __a - __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a, vector signed char __b) { return (vector signed char)__a - __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, vector bool char __b) { return __a - (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a, vector unsigned char __b) { return __a - __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a - __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a, vector bool char __b) { return __a - (vector unsigned char)__b; } /* vec_vsubuhm */ #define __builtin_altivec_vsubuhm vec_vsubuhm static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector short __b) { return __a - __b; } static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a, vector short __b) { return (vector short)__a - __b; } static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector bool short __b) { return __a - (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) { return __a - __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a - __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a, vector bool short __b) { return __a - (vector unsigned short)__b; } /* vec_vsubuwm */ #define __builtin_altivec_vsubuwm vec_vsubuwm static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) { return __a - __b; } static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a, vector int __b) { return (vector int)__a - __b; } static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector bool int __b) { return __a - (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a, vector unsigned int __b) { return __a - __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a - __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a, vector bool int __b) { return __a - (vector unsigned int)__b; } /* vec_vsubfp */ #define __builtin_altivec_vsubfp vec_vsubfp static __inline__ vector float __attribute__((__always_inline__)) vec_vsubfp(vector float __a, vector float __b) { return __a - __b; } /* vec_subc */ static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b) { return (vector signed int)__builtin_altivec_vsubcuw((vector unsigned int)__a, (vector unsigned int) __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vsubcuw(__a, __b); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 11155 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } static __inline__ vector signed __int128 __ATTRS_o_ai vec_subc(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 11165 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsubcuw */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vsubcuw(__a, __b); } /* vec_subs */ static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b) { return __builtin_altivec_vsubsbs(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector bool char __a, vector signed char __b) { return __builtin_altivec_vsubsbs((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector bool char __b) { return __builtin_altivec_vsubsbs(__a, (vector signed char)__b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vsububs(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vsububs((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vsububs(__a, (vector unsigned char)__b); } static __inline__ vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) { return __builtin_altivec_vsubshs(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_subs(vector bool short __a, vector short __b) { return __builtin_altivec_vsubshs((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_subs(vector short __a, vector bool short __b) { return __builtin_altivec_vsubshs(__a, (vector short)__b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b); } static __inline__ vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) { return __builtin_altivec_vsubsws(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) { return __builtin_altivec_vsubsws((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) { return __builtin_altivec_vsubsws(__a, (vector int)__b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vsubuws(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vsubuws((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b); } /* vec_vsubsbs */ static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector signed char __b) { return __builtin_altivec_vsubsbs(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a, vector signed char __b) { return __builtin_altivec_vsubsbs((vector signed char)__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector bool char __b) { return __builtin_altivec_vsubsbs(__a, (vector signed char)__b); } /* vec_vsububs */ static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vsububs(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vsububs((vector unsigned char)__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vsububs(__a, (vector unsigned char)__b); } /* vec_vsubshs */ static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector short __b) { return __builtin_altivec_vsubshs(__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a, vector short __b) { return __builtin_altivec_vsubshs((vector short)__a, __b); } static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector bool short __b) { return __builtin_altivec_vsubshs(__a, (vector short)__b); } /* vec_vsubuhs */ static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b); } /* vec_vsubsws */ static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) { return __builtin_altivec_vsubsws(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a, vector int __b) { return __builtin_altivec_vsubsws((vector int)__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector bool int __b) { return __builtin_altivec_vsubsws(__a, (vector int)__b); } /* vec_vsubuws */ static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vsubuws(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vsubuws((vector unsigned int)__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 11368 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsubuqm */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) { return __a - __b; } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __a - __b; } /* vec_vsubeuqm */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } static __inline__ vector signed __int128 __ATTRS_o_ai vec_sube(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_sube(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vsubeuqm(__a, __b, __c); } /* vec_vsubcuq */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) { return __builtin_altivec_vsubcuq(__a, __b); } /* vec_vsubecuq */ static __inline__ vector signed __int128 __ATTRS_o_ai vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } static __inline__ vector signed int __ATTRS_o_ai vec_subec(vector signed int __a, vector signed int __b, vector signed int __c) { return vec_addec(__a, ~__b, __c); } static __inline__ vector unsigned int __ATTRS_o_ai vec_subec(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { return vec_addec(__a, ~__b, __c); } static __inline__ vector signed __int128 __ATTRS_o_ai vec_subec(vector signed __int128 __a, vector signed __int128 __b, vector signed __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_subec(vector unsigned __int128 __a, vector unsigned __int128 __b, vector unsigned __int128 __c) { return __builtin_altivec_vsubecuq(__a, __b, __c); } #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) # 11457 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed int __ATTRS_o_ai vec_sube(vector signed int __a, vector signed int __b, vector signed int __c) { vector signed int __mask = {1, 1, 1, 1}; vector signed int __carry = __c & __mask; return vec_adde(__a, ~__b, __carry); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sube(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { vector unsigned int __mask = {1, 1, 1, 1}; vector unsigned int __carry = __c & __mask; return vec_adde(__a, ~__b, __carry); } /* vec_sum4s */ static __inline__ vector int __ATTRS_o_ai vec_sum4s(vector signed char __a, vector int __b) { return __builtin_altivec_vsum4sbs(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a, vector unsigned int __b) { return __builtin_altivec_vsum4ubs(__a, __b); } static __inline__ vector int __ATTRS_o_ai vec_sum4s(vector signed short __a, vector int __b) { return __builtin_altivec_vsum4shs(__a, __b); } /* vec_vsum4sbs */ static __inline__ vector int __attribute__((__always_inline__)) vec_vsum4sbs(vector signed char __a, vector int __b) { return __builtin_altivec_vsum4sbs(__a, __b); } /* vec_vsum4ubs */ static __inline__ vector unsigned int __attribute__((__always_inline__)) vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) { return __builtin_altivec_vsum4ubs(__a, __b); } /* vec_vsum4shs */ static __inline__ vector int __attribute__((__always_inline__)) vec_vsum4shs(vector signed short __a, vector int __b) { return __builtin_altivec_vsum4shs(__a, __b); } /* vec_sum2s */ /* The vsum2sws instruction has a big-endian bias, so that the second input vector and the result always reference big-endian elements 1 and 3 (little-endian element 0 and 2). For ease of porting the programmer wants elements 1 and 3 in both cases, so for little endian we must perform some permutes. */ static __inline__ vector signed int __attribute__((__always_inline__)) vec_sum2s(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ vector int __c = (vector signed int)vec_perm( __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11)); __c = __builtin_altivec_vsum2sws(__a, __c); return (vector signed int)vec_perm( __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11)); #else # 11530 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vsum2sws(__a, __b); #endif # 11532 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vsum2sws */ static __inline__ vector signed int __attribute__((__always_inline__)) vec_vsum2sws(vector int __a, vector int __b) { #ifdef __LITTLE_ENDIAN__ vector int __c = (vector signed int)vec_perm( __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11)); __c = __builtin_altivec_vsum2sws(__a, __c); return (vector signed int)vec_perm( __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11)); #else # 11547 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vsum2sws(__a, __b); #endif # 11549 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_sums */ /* The vsumsws instruction has a big-endian bias, so that the second input vector and the result always reference big-endian element 3 (little-endian element 0). For ease of porting the programmer wants element 3 in both cases, so for little endian we must perform some permutes. */ static __inline__ vector signed int __attribute__((__always_inline__)) vec_sums(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ __b = (vector signed int)vec_splat(__b, 3); __b = __builtin_altivec_vsumsws(__a, __b); return (vector signed int)(0, 0, 0, __b[0]); #else # 11566 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vsumsws(__a, __b); #endif # 11568 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vsumsws */ static __inline__ vector signed int __attribute__((__always_inline__)) vec_vsumsws(vector signed int __a, vector signed int __b) { #ifdef __LITTLE_ENDIAN__ __b = (vector signed int)vec_splat(__b, 3); __b = __builtin_altivec_vsumsws(__a, __b); return (vector signed int)(0, 0, 0, __b[0]); #else # 11579 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vsumsws(__a, __b); #endif # 11581 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_trunc */ static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvrspiz(__a); #else # 11589 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vrfiz(__a); #endif # 11591 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ vector double __ATTRS_o_ai vec_trunc(vector double __a) { return __builtin_vsx_xvrdpiz(__a); } #endif # 11598 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vrfiz */ static __inline__ vector float __attribute__((__always_inline__)) vec_vrfiz(vector float __a) { return __builtin_altivec_vrfiz(__a); } /* vec_unpackh */ /* The vector unpack instructions all have a big-endian bias, so for little endian we must reverse the meanings of "high" and "low." */ static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsb((vector char)__a); #else # 11616 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsb((vector char)__a); #endif # 11618 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #else # 11625 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #endif # 11627 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_unpackh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsh(__a); #else # 11633 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsh(__a); #endif # 11635 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #else # 11642 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #endif # 11644 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #else # 11651 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #endif # 11653 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector long long __ATTRS_o_ai vec_unpackh(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsw(__a); #else # 11660 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsw(__a); #endif # 11662 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #else # 11669 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #endif # 11671 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_unpackh(vector float __a) { return (vector double)(__a[0], __a[1]); } #endif # 11678 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vupkhsb */ static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsb((vector char)__a); #else # 11686 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsb((vector char)__a); #endif # 11688 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #else # 11695 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #endif # 11697 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vupkhsh */ static __inline__ vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsh(__a); #else # 11705 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsh(__a); #endif # 11707 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #else # 11714 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #endif # 11716 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #else # 11723 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #endif # 11725 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vupkhsw */ #ifdef __POWER8_VECTOR__ static __inline__ vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupklsw(__a); #else # 11734 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupkhsw(__a); #endif # 11736 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #else # 11743 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #endif # 11745 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 11747 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_unpackl */ static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsb((vector char)__a); #else # 11755 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsb((vector char)__a); #endif # 11757 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #else # 11764 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #endif # 11766 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector int __ATTRS_o_ai vec_unpackl(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsh(__a); #else # 11772 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsh(__a); #endif # 11774 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #else # 11781 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #endif # 11783 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #else # 11790 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #endif # 11792 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __POWER8_VECTOR__ static __inline__ vector long long __ATTRS_o_ai vec_unpackl(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsw(__a); #else # 11799 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsw(__a); #endif # 11801 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #else # 11808 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #endif # 11810 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector double __ATTRS_o_ai vec_unpackl(vector float __a) { return (vector double)(__a[2], __a[3]); } #endif # 11817 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vupklsb */ static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsb((vector char)__a); #else # 11825 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsb((vector char)__a); #endif # 11827 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a); #else # 11834 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a); #endif # 11836 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vupklsh */ static __inline__ vector int __ATTRS_o_ai vec_vupklsh(vector short __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsh(__a); #else # 11844 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsh(__a); #endif # 11846 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a); #else # 11853 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a); #endif # 11855 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) { #ifdef __LITTLE_ENDIAN__ return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a); #else # 11862 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a); #endif # 11864 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } /* vec_vupklsw */ #ifdef __POWER8_VECTOR__ static __inline__ vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) { #ifdef __LITTLE_ENDIAN__ return __builtin_altivec_vupkhsw(__a); #else # 11873 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vupklsw(__a); #endif # 11875 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } static __inline__ vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) { #ifdef __LITTLE_ENDIAN__ return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a); #else # 11882 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a); #endif # 11884 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #endif # 11886 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsx_ld */ #ifdef __VSX__ static __inline__ vector bool int __ATTRS_o_ai vec_vsx_ld(int __a, const vector bool int *__b) { return (vector bool int)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed int __ATTRS_o_ai vec_vsx_ld(int __a, const vector signed int *__b) { return (vector signed int)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed int __ATTRS_o_ai vec_vsx_ld(int __a, const signed int *__b) { return (vector signed int)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsx_ld(int __a, const vector unsigned int *__b) { return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai vec_vsx_ld(int __a, const unsigned int *__b) { return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) { return (vector float)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector float __ATTRS_o_ai vec_vsx_ld(int __a, const float *__b) { return (vector float)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed long long __ATTRS_o_ai vec_vsx_ld(int __a, const vector signed long long *__b) { return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vsx_ld(int __a, const vector unsigned long long *__b) { return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b); } static __inline__ vector double __ATTRS_o_ai vec_vsx_ld(int __a, const vector double *__b) { return (vector double)__builtin_vsx_lxvd2x(__a, __b); } static __inline__ vector double __ATTRS_o_ai vec_vsx_ld(int __a, const double *__b) { return (vector double)__builtin_vsx_lxvd2x(__a, __b); } static __inline__ vector bool short __ATTRS_o_ai vec_vsx_ld(int __a, const vector bool short *__b) { return (vector bool short)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed short __ATTRS_o_ai vec_vsx_ld(int __a, const vector signed short *__b) { return (vector signed short)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed short __ATTRS_o_ai vec_vsx_ld(int __a, const signed short *__b) { return (vector signed short)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsx_ld(int __a, const vector unsigned short *__b) { return (vector unsigned short)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai vec_vsx_ld(int __a, const unsigned short *__b) { return (vector unsigned short)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector bool char __ATTRS_o_ai vec_vsx_ld(int __a, const vector bool char *__b) { return (vector bool char)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsx_ld(int __a, const vector signed char *__b) { return (vector signed char)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vsx_ld(int __a, const signed char *__b) { return (vector signed char)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsx_ld(int __a, const vector unsigned char *__b) { return (vector unsigned char)__builtin_vsx_lxvw4x(__a, __b); } static __inline__ vector unsigned char __ATTRS_o_ai vec_vsx_ld(int __a, const unsigned char *__b) { return (vector unsigned char)__builtin_vsx_lxvw4x(__a, __b); } #endif # 11997 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vsx_st */ #ifdef __VSX__ static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b, vector bool int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b, signed int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool int __a, int __b, unsigned int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b, vector signed int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b, signed int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b, vector unsigned int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b, unsigned int *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b, vector float *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b, float *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b, vector signed long long *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b, vector unsigned long long *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b, vector double *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b, double *__c) { __builtin_vsx_stxvd2x((vector double)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b, vector bool short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b, signed short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool short __a, int __b, unsigned short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed short __a, int __b, vector signed short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed short __a, int __b, signed short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned short __a, int __b, vector unsigned short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned short __a, int __b, unsigned short *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b, vector bool char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b, signed char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector bool char __a, int __b, unsigned char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed char __a, int __b, vector signed char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector signed char __a, int __b, signed char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned char __a, int __b, vector unsigned char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned char __a, int __b, unsigned char *__c) { __builtin_vsx_stxvw4x((vector int)__a, __b, __c); } #endif # 12141 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __VSX__ #define vec_xxpermdi __builtin_vsx_xxpermdi #define vec_xxsldwi __builtin_vsx_xxsldwi #endif # 12146 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_xor */ #define __builtin_altivec_vxor vec_xor static __inline__ vector signed char __ATTRS_o_ai vec_xor(vector signed char __a, vector signed char __b) { return __a ^ __b; } static __inline__ vector signed char __ATTRS_o_ai vec_xor(vector bool char __a, vector signed char __b) { return (vector signed char)__a ^ __b; } static __inline__ vector signed char __ATTRS_o_ai vec_xor(vector signed char __a, vector bool char __b) { return __a ^ (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b) { return __a ^ __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a ^ __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector bool char __b) { return __a ^ (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_xor(vector bool char __a, vector bool char __b) { return __a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) { return __a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_xor(vector bool short __a, vector short __b) { return (vector short)__a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_xor(vector short __a, vector bool short __b) { return __a ^ (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a, vector unsigned short __b) { return __a ^ __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a ^ __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a, vector bool short __b) { return __a ^ (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_xor(vector bool short __a, vector bool short __b) { return __a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) { return __a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) { return (vector int)__a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) { return __a ^ (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a, vector unsigned int __b) { return __a ^ __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a ^ __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a, vector bool int __b) { return __a ^ (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_xor(vector bool int __a, vector bool int __b) { return __a ^ __b; } static __inline__ vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_xor(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_xor(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a, vector signed long long __b) { return __a ^ __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_xor(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a ^ __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a, vector bool long long __b) { return __a ^ (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_xor(vector unsigned long long __a, vector unsigned long long __b) { return __a ^ __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_xor(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a ^ __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_xor(vector unsigned long long __a, vector bool long long __b) { return __a ^ (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a, vector bool long long __b) { return __a ^ __b; } static __inline__ vector double __ATTRS_o_ai vec_xor(vector double __a, vector double __b) { return (vector double)((vector unsigned long long)__a ^ (vector unsigned long long)__b); } static __inline__ vector double __ATTRS_o_ai vec_xor(vector double __a, vector bool long long __b) { return (vector double)((vector unsigned long long)__a ^ (vector unsigned long long)__b); } static __inline__ vector double __ATTRS_o_ai vec_xor(vector bool long long __a, vector double __b) { return (vector double)((vector unsigned long long)__a ^ (vector unsigned long long)__b); } #endif # 12331 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_vxor */ static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector signed char __b) { return __a ^ __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a, vector signed char __b) { return (vector signed char)__a ^ __b; } static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector bool char __b) { return __a ^ (vector signed char)__b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a, vector unsigned char __b) { return __a ^ __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a, vector unsigned char __b) { return (vector unsigned char)__a ^ __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a, vector bool char __b) { return __a ^ (vector unsigned char)__b; } static __inline__ vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a, vector bool char __b) { return __a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) { return __a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_vxor(vector bool short __a, vector short __b) { return (vector short)__a ^ __b; } static __inline__ vector short __ATTRS_o_ai vec_vxor(vector short __a, vector bool short __b) { return __a ^ (vector short)__b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a, vector unsigned short __b) { return __a ^ __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a, vector unsigned short __b) { return (vector unsigned short)__a ^ __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a, vector bool short __b) { return __a ^ (vector unsigned short)__b; } static __inline__ vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a, vector bool short __b) { return __a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) { return __a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) { return (vector int)__a ^ __b; } static __inline__ vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) { return __a ^ (vector int)__b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a, vector unsigned int __b) { return __a ^ __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a, vector unsigned int __b) { return (vector unsigned int)__a ^ __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a, vector bool int __b) { return __a ^ (vector unsigned int)__b; } static __inline__ vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a, vector bool int __b) { return __a ^ __b; } static __inline__ vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vxor(vector bool int __a, vector float __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } static __inline__ vector float __ATTRS_o_ai vec_vxor(vector float __a, vector bool int __b) { vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b; return (vector float)__res; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_vxor(vector signed long long __a, vector signed long long __b) { return __a ^ __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vxor(vector bool long long __a, vector signed long long __b) { return (vector signed long long)__a ^ __b; } static __inline__ vector signed long long __ATTRS_o_ai vec_vxor(vector signed long long __a, vector bool long long __b) { return __a ^ (vector signed long long)__b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vxor(vector unsigned long long __a, vector unsigned long long __b) { return __a ^ __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vxor(vector bool long long __a, vector unsigned long long __b) { return (vector unsigned long long)__a ^ __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_vxor(vector unsigned long long __a, vector bool long long __b) { return __a ^ (vector unsigned long long)__b; } static __inline__ vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a, vector bool long long __b) { return __a ^ __b; } #endif # 12496 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* ------------------------ extensions for CBEA ----------------------------- */ /* vec_extract */ static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) { return __a[__b]; } static __inline__ unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a, int __b) { return __a[__b]; } static __inline__ unsigned char __ATTRS_o_ai vec_extract(vector bool char __a, int __b) { return __a[__b]; } static __inline__ signed short __ATTRS_o_ai vec_extract(vector signed short __a, int __b) { return __a[__b]; } static __inline__ unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a, int __b) { return __a[__b]; } static __inline__ unsigned short __ATTRS_o_ai vec_extract(vector bool short __a, int __b) { return __a[__b]; } static __inline__ signed int __ATTRS_o_ai vec_extract(vector signed int __a, int __b) { return __a[__b]; } static __inline__ unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) { return __a[__b]; } static __inline__ unsigned int __ATTRS_o_ai vec_extract(vector bool int __a, int __b) { return __a[__b]; } #ifdef __VSX__ static __inline__ signed long long __ATTRS_o_ai vec_extract(vector signed long long __a, int __b) { return __a[__b]; } static __inline__ unsigned long long __ATTRS_o_ai vec_extract(vector unsigned long long __a, int __b) { return __a[__b]; } static __inline__ unsigned long long __ATTRS_o_ai vec_extract(vector bool long long __a, int __b) { return __a[__b]; } static __inline__ double __ATTRS_o_ai vec_extract(vector double __a, int __b) { return __a[__b]; } #endif # 12566 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ float __ATTRS_o_ai vec_extract(vector float __a, int __b) { return __a[__b]; } #ifdef __POWER9_VECTOR__ #define vec_insert4b __builtin_vsx_insertword #define vec_extract4b __builtin_vsx_extractuword /* vec_extract_exp */ static __inline__ vector unsigned int __ATTRS_o_ai vec_extract_exp(vector float __a) { return __builtin_vsx_xvxexpsp(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_extract_exp(vector double __a) { return __builtin_vsx_xvxexpdp(__a); } /* vec_extract_sig */ static __inline__ vector unsigned int __ATTRS_o_ai vec_extract_sig(vector float __a) { return __builtin_vsx_xvxsigsp(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_extract_sig (vector double __a) { return __builtin_vsx_xvxsigdp(__a); } static __inline__ vector float __ATTRS_o_ai vec_extract_fp32_from_shorth(vector unsigned short __a) { vector unsigned short __b = #ifdef __LITTLE_ENDIAN__ __builtin_shufflevector(__a, __a, 0, -1, 1, -1, 2, -1, 3, -1); #else # 12606 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 __builtin_shufflevector(__a, __a, -1, 0, -1, 1, -1, 2, -1, 3); #endif # 12608 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvhpsp(__b); } static __inline__ vector float __ATTRS_o_ai vec_extract_fp32_from_shortl(vector unsigned short __a) { vector unsigned short __b = #ifdef __LITTLE_ENDIAN__ __builtin_shufflevector(__a, __a, 4, -1, 5, -1, 6, -1, 7, -1); #else # 12617 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 __builtin_shufflevector(__a, __a, -1, 4, -1, 5, -1, 6, -1, 7); #endif # 12619 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_vsx_xvcvhpsp(__b); } #endif /* __POWER9_VECTOR__ */ # 12622 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_insert */ static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a, vector unsigned char __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector bool char __ATTRS_o_ai vec_insert(unsigned char __a, vector bool char __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector signed short __ATTRS_o_ai vec_insert(signed short __a, vector signed short __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a, vector unsigned short __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector bool short __ATTRS_o_ai vec_insert(unsigned short __a, vector bool short __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector signed int __ATTRS_o_ai vec_insert(signed int __a, vector signed int __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a, vector unsigned int __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector bool int __ATTRS_o_ai vec_insert(unsigned int __a, vector bool int __b, int __c) { __b[__c] = __a; return __b; } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_insert(signed long long __a, vector signed long long __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector unsigned long long __ATTRS_o_ai vec_insert(unsigned long long __a, vector unsigned long long __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector bool long long __ATTRS_o_ai vec_insert(unsigned long long __a, vector bool long long __b, int __c) { __b[__c] = __a; return __b; } static __inline__ vector double __ATTRS_o_ai vec_insert(double __a, vector double __b, int __c) { __b[__c] = __a; return __b; } #endif # 12706 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_insert(float __a, vector float __b, int __c) { __b[__c] = __a; return __b; } /* vec_lvlx */ static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b) { return vec_perm(vec_ld(__a, __b), (vector signed char)(0), vec_lvsl(__a, __b)); } static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const vector signed char *__b) { return vec_perm(vec_ld(__a, __b), (vector signed char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvlx(int __a, const unsigned char *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvlx(int __a, const vector unsigned char *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool char __ATTRS_o_ai vec_lvlx(int __a, const vector bool char *__b) { return vec_perm(vec_ld(__a, __b), (vector bool char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) { return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b)); } static __inline__ vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) { return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvlx(int __a, const unsigned short *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvlx(int __a, const vector unsigned short *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool short __ATTRS_o_ai vec_lvlx(int __a, const vector bool short *__b) { return vec_perm(vec_ld(__a, __b), (vector bool short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) { return vec_perm(vec_ld(__a, __b), (vector pixel)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) { return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b)); } static __inline__ vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) { return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvlx(int __a, const unsigned int *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvlx(int __a, const vector unsigned int *__b) { return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool int __ATTRS_o_ai vec_lvlx(int __a, const vector bool int *__b) { return vec_perm(vec_ld(__a, __b), (vector bool int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) { return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b)); } static __inline__ vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) { return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvlxl */ static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const signed char *__b) { return vec_perm(vec_ldl(__a, __b), (vector signed char)(0), vec_lvsl(__a, __b)); } static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const vector signed char *__b) { return vec_perm(vec_ldl(__a, __b), (vector signed char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a, const unsigned char *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a, const vector unsigned char *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool char __ATTRS_o_ai vec_lvlxl(int __a, const vector bool char *__b) { return vec_perm(vec_ldl(__a, __b), (vector bool char)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) { return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b)); } static __inline__ vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) { return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a, const unsigned short *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a, const vector unsigned short *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool short __ATTRS_o_ai vec_lvlxl(int __a, const vector bool short *__b) { return vec_perm(vec_ldl(__a, __b), (vector bool short)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) { return vec_perm(vec_ldl(__a, __b), (vector pixel)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) { return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b)); } static __inline__ vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) { return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a, const unsigned int *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, __b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a, const vector unsigned int *__b) { return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool int __ATTRS_o_ai vec_lvlxl(int __a, const vector bool int *__b) { return vec_perm(vec_ldl(__a, __b), (vector bool int)(0), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) { return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b)); } static __inline__ vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) { return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvrx */ static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b) { return vec_perm((vector signed char)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const vector signed char *__b) { return vec_perm((vector signed char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvrx(int __a, const unsigned char *__b) { return vec_perm((vector unsigned char)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvrx(int __a, const vector unsigned char *__b) { return vec_perm((vector unsigned char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool char __ATTRS_o_ai vec_lvrx(int __a, const vector bool char *__b) { return vec_perm((vector bool char)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) { return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) { return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvrx(int __a, const unsigned short *__b) { return vec_perm((vector unsigned short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvrx(int __a, const vector unsigned short *__b) { return vec_perm((vector unsigned short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool short __ATTRS_o_ai vec_lvrx(int __a, const vector bool short *__b) { return vec_perm((vector bool short)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) { return vec_perm((vector pixel)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) { return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) { return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvrx(int __a, const unsigned int *__b) { return vec_perm((vector unsigned int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvrx(int __a, const vector unsigned int *__b) { return vec_perm((vector unsigned int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool int __ATTRS_o_ai vec_lvrx(int __a, const vector bool int *__b) { return vec_perm((vector bool int)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) { return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) { return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_lvrxl */ static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b) { return vec_perm((vector signed char)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const vector signed char *__b) { return vec_perm((vector signed char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a, const unsigned char *__b) { return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a, const vector unsigned char *__b) { return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool char __ATTRS_o_ai vec_lvrxl(int __a, const vector bool char *__b) { return vec_perm((vector bool char)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) { return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) { return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a, const unsigned short *__b) { return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a, const vector unsigned short *__b) { return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool short __ATTRS_o_ai vec_lvrxl(int __a, const vector bool short *__b) { return vec_perm((vector bool short)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) { return vec_perm((vector pixel)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) { return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) { return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a, const unsigned int *__b) { return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a, const vector unsigned int *__b) { return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector bool int __ATTRS_o_ai vec_lvrxl(int __a, const vector bool int *__b) { return vec_perm((vector bool int)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } static __inline__ vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) { return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b)); } static __inline__ vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) { return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, (unsigned char *)__b)); } /* vec_stvlx */ static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, signed char *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, vector signed char *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b, vector bool char *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, vector short *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b, vector bool short *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b, vector pixel *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c) { return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b, vector bool int *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlx(vector float __a, int __b, vector float *__c) { return vec_st( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } /* vec_stvlxl */ static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, vector signed char *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b, vector bool char *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, vector short *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b, vector bool short *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b, vector pixel *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c) { return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b, vector bool int *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b, vector float *__c) { return vec_stl( vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } /* vec_stvrx */ static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, signed char *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, vector signed char *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b, vector bool char *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, vector short *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b, vector bool short *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b, vector pixel *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c) { return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b, vector bool int *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrx(vector float __a, int __b, vector float *__c) { return vec_st( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } /* vec_stvrxl */ static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, signed char *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, vector signed char *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b, vector bool char *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, vector short *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b, vector bool short *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b, vector pixel *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c) { return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b, vector bool int *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } static __inline__ void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b, vector float *__c) { return vec_stl( vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)), __b, __c); } /* vec_promote */ static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) { vector signed char __res = (vector signed char)(0); __res[__b] = __a; return __res; } static __inline__ vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a, int __b) { vector unsigned char __res = (vector unsigned char)(0); __res[__b] = __a; return __res; } static __inline__ vector short __ATTRS_o_ai vec_promote(short __a, int __b) { vector short __res = (vector short)(0); __res[__b] = __a; return __res; } static __inline__ vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a, int __b) { vector unsigned short __res = (vector unsigned short)(0); __res[__b] = __a; return __res; } static __inline__ vector int __ATTRS_o_ai vec_promote(int __a, int __b) { vector int __res = (vector int)(0); __res[__b] = __a; return __res; } static __inline__ vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) { vector unsigned int __res = (vector unsigned int)(0); __res[__b] = __a; return __res; } static __inline__ vector float __ATTRS_o_ai vec_promote(float __a, int __b) { vector float __res = (vector float)(0); __res[__b] = __a; return __res; } /* vec_splats */ static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a) { return (vector signed char)(__a); } static __inline__ vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) { return (vector unsigned char)(__a); } static __inline__ vector short __ATTRS_o_ai vec_splats(short __a) { return (vector short)(__a); } static __inline__ vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) { return (vector unsigned short)(__a); } static __inline__ vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); } static __inline__ vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) { return (vector unsigned int)(__a); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_splats(signed long long __a) { return (vector signed long long)(__a); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_splats(unsigned long long __a) { return (vector unsigned long long)(__a); } #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13693 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_splats(signed __int128 __a) { return (vector signed __int128)(__a); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_splats(unsigned __int128 __a) { return (vector unsigned __int128)(__a); } #endif # 13704 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector double __ATTRS_o_ai vec_splats(double __a) { return (vector double)(__a); } #endif # 13709 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector float __ATTRS_o_ai vec_splats(float __a) { return (vector float)(__a); } /* ----------------------------- predicates --------------------------------- */ /* vec_all_eq */ static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool long long __a, vector long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, (vector long long)__b); } #endif # 13886 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpeqsp_p(__CR6_LT, __a, __b); #else # 13892 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b); #endif # 13894 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_eq(vector double __a, vector double __b) { return __builtin_vsx_xvcmpeqdp_p(__CR6_LT, __a, __b); } #endif # 13902 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_ge */ static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif # 14057 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgesp_p(__CR6_LT, __a, __b); #else # 14063 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b); #endif # 14065 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_ge(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgedp_p(__CR6_LT, __a, __b); } #endif # 14073 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_gt */ static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif # 14228 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgtsp_p(__CR6_LT, __a, __b); #else # 14234 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b); #endif # 14236 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_gt(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgtdp_p(__CR6_LT, __a, __b); } #endif # 14244 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_in */ static __inline__ int __attribute__((__always_inline__)) vec_all_in(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b); } /* vec_all_le */ static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_le(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, __b); } static __inline__ int __ATTRS_o_ai vec_all_le(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif # 14407 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgesp_p(__CR6_LT, __b, __a); #else # 14413 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a); #endif # 14415 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_le(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgedp_p(__CR6_LT, __b, __a); } #endif # 14423 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_lt */ static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif # 14579 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgtsp_p(__CR6_LT, __b, __a); #else # 14585 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a); #endif # 14587 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_lt(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgtdp_p(__CR6_LT, __b, __a); } #endif # 14595 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_nan */ static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a) { #ifdef __VSX__ return __builtin_vsx_xvcmpeqsp_p(__CR6_EQ, __a, __a); #else # 14602 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a); #endif # 14604 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_nan(vector double __a) { return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ, __a, __a); } #endif # 14611 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_ne */ static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a, (vector signed long long)__b); } #endif # 14783 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpeqsp_p(__CR6_EQ, __a, __b); #else # 14789 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b); #endif # 14791 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_ne(vector double __a, vector double __b) { return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ, __a, __b); } #endif # 14799 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_nge */ static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgesp_p(__CR6_EQ, __a, __b); #else # 14807 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b); #endif # 14809 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_nge(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgedp_p(__CR6_EQ, __a, __b); } #endif # 14817 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_ngt */ static __inline__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ, __a, __b); #else # 14825 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b); #endif # 14827 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_all_ngt(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ, __a, __b); } #endif # 14835 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_all_nle */ static __inline__ int __attribute__((__always_inline__)) vec_all_nle(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a); } /* vec_all_nlt */ static __inline__ int __attribute__((__always_inline__)) vec_all_nlt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a); } /* vec_all_numeric */ static __inline__ int __attribute__((__always_inline__)) vec_all_numeric(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a); } /* vec_any_eq */ static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) { return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b); } #endif # 15028 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpeqsp_p(__CR6_EQ_REV, __a, __b); #else # 15034 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b); #endif # 15036 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_eq(vector double __a, vector double __b) { return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ_REV, __a, __b); } #endif # 15044 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_ge */ static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, (vector signed long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif # 15207 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgesp_p(__CR6_EQ_REV, __a, __b); #else # 15213 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b); #endif # 15215 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_ge(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgedp_p(__CR6_EQ_REV, __a, __b); } #endif # 15223 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_gt */ static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif # 15386 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ_REV, __a, __b); #else # 15392 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b); #endif # 15394 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_gt(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ_REV, __a, __b); } #endif # 15402 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_le */ static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, (vector unsigned short)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, (vector unsigned int)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, (vector unsigned int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_le(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, __b); } static __inline__ int __ATTRS_o_ai vec_any_le(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, (vector unsigned long long)__a, (vector unsigned long long)__b); } #endif # 15565 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgesp_p(__CR6_EQ_REV, __b, __a); #else # 15571 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a); #endif # 15573 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_le(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgedp_p(__CR6_EQ_REV, __b, __a); } #endif # 15581 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_lt */ static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, (vector unsigned char)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, (vector unsigned short)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, (vector unsigned int)__a); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, (vector signed long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, __a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, (vector unsigned long long)__a); } static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, (vector unsigned long long)__b, (vector unsigned long long)__a); } #endif # 15744 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ_REV, __b, __a); #else # 15750 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a); #endif # 15752 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_lt(vector double __a, vector double __b) { return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ_REV, __b, __a); } #endif # 15760 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_nan */ static __inline__ int __attribute__((__always_inline__)) vec_any_nan(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a); } /* vec_any_ne */ static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector signed char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector unsigned char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) { return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector unsigned short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector bool short __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) { return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a, (vector short)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector unsigned int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) { return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } #ifdef __POWER8_VECTOR__ static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, (vector long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool long long __a, vector signed long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool long long __a, vector unsigned long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool long long __a, vector bool long long __b) { return __builtin_altivec_vcmpequd_p( __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b); } #endif # 15939 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) { #ifdef __VSX__ return __builtin_vsx_xvcmpeqsp_p(__CR6_LT_REV, __a, __b); #else # 15945 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b); #endif # 15947 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 } #ifdef __VSX__ static __inline__ int __ATTRS_o_ai vec_any_ne(vector double __a, vector double __b) { return __builtin_vsx_xvcmpeqdp_p(__CR6_LT_REV, __a, __b); } #endif # 15955 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_any_nge */ static __inline__ int __attribute__((__always_inline__)) vec_any_nge(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b); } /* vec_any_ngt */ static __inline__ int __attribute__((__always_inline__)) vec_any_ngt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b); } /* vec_any_nle */ static __inline__ int __attribute__((__always_inline__)) vec_any_nle(vector float __a, vector float __b) { return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a); } /* vec_any_nlt */ static __inline__ int __attribute__((__always_inline__)) vec_any_nlt(vector float __a, vector float __b) { return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a); } /* vec_any_numeric */ static __inline__ int __attribute__((__always_inline__)) vec_any_numeric(vector float __a) { return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a); } /* vec_any_out */ static __inline__ int __attribute__((__always_inline__)) vec_any_out(vector float __a, vector float __b) { return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b); } /* Power 8 Crypto functions Note: We diverge from the current GCC implementation with regard to cryptography and related functions as follows: - Only the SHA and AES instructions and builtins are disabled by -mno-crypto - The remaining ones are only available on Power8 and up so require -mpower8-vector The justification for this is that export requirements require that Category:Vector.Crypto is optional (i.e. compliant hardware may not provide support). As a result, we need to be able to turn off support for those. The remaining ones (currently controlled by -mcrypto for GCC) still need to be provided on compliant hardware even if Vector.Crypto is not provided. */ #ifdef __CRYPTO__ #define vec_sbox_be __builtin_altivec_crypto_vsbox #define vec_cipher_be __builtin_altivec_crypto_vcipher #define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast #define vec_ncipher_be __builtin_altivec_crypto_vncipher #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast static __inline__ vector unsigned long long __attribute__((__always_inline__)) __builtin_crypto_vsbox(vector unsigned long long __a) { return __builtin_altivec_crypto_vsbox(__a); } static __inline__ vector unsigned long long __attribute__((__always_inline__)) __builtin_crypto_vcipher(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vcipher(__a, __b); } static __inline__ vector unsigned long long __attribute__((__always_inline__)) __builtin_crypto_vcipherlast(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vcipherlast(__a, __b); } static __inline__ vector unsigned long long __attribute__((__always_inline__)) __builtin_crypto_vncipher(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vncipher(__a, __b); } static __inline__ vector unsigned long long __attribute__((__always_inline__)) __builtin_crypto_vncipherlast(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vncipherlast(__a, __b); } #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw #define vec_shasigma_be(X, Y, Z) \ _Generic((X), vector unsigned int \ : __builtin_crypto_vshasigmaw, vector unsigned long long \ : __builtin_crypto_vshasigmad)((X), (Y), (Z)) #endif # 16055 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER8_VECTOR__ static __inline__ vector bool char __ATTRS_o_ai vec_permxor(vector bool char __a, vector bool char __b, vector bool char __c) { return __builtin_altivec_crypto_vpermxor(__a, __b, __c); } static __inline__ vector signed char __ATTRS_o_ai vec_permxor(vector signed char __a, vector signed char __b, vector signed char __c) { return __builtin_altivec_crypto_vpermxor(__a, __b, __c); } static __inline__ vector unsigned char __ATTRS_o_ai vec_permxor(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { return __builtin_altivec_crypto_vpermxor(__a, __b, __c); } static __inline__ vector unsigned char __ATTRS_o_ai __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c) { return __builtin_altivec_crypto_vpermxor(__a, __b, __c); } static __inline__ vector unsigned short __ATTRS_o_ai __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b, vector unsigned short __c) { return (vector unsigned short)__builtin_altivec_crypto_vpermxor( (vector unsigned char)__a, (vector unsigned char)__b, (vector unsigned char)__c); } static __inline__ vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor( vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) { return (vector unsigned int)__builtin_altivec_crypto_vpermxor( (vector unsigned char)__a, (vector unsigned char)__b, (vector unsigned char)__c); } static __inline__ vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(vector unsigned long long __a, vector unsigned long long __b, vector unsigned long long __c) { return (vector unsigned long long)__builtin_altivec_crypto_vpermxor( (vector unsigned char)__a, (vector unsigned char)__b, (vector unsigned char)__c); } static __inline__ vector unsigned char __ATTRS_o_ai __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_crypto_vpmsumb(__a, __b); } static __inline__ vector unsigned short __ATTRS_o_ai __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) { return __builtin_altivec_crypto_vpmsumh(__a, __b); } static __inline__ vector unsigned int __ATTRS_o_ai __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) { return __builtin_altivec_crypto_vpmsumw(__a, __b); } static __inline__ vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb(vector unsigned long long __a, vector unsigned long long __b) { return __builtin_altivec_crypto_vpmsumd(__a, __b); } static __inline__ vector signed char __ATTRS_o_ai vec_vgbbd(vector signed char __a) { return __builtin_altivec_vgbbd((vector unsigned char)__a); } #define vec_pmsum_be __builtin_crypto_vpmsumb #define vec_gb __builtin_altivec_vgbbd static __inline__ vector unsigned char __ATTRS_o_ai vec_vgbbd(vector unsigned char __a) { return __builtin_altivec_vgbbd(__a); } static __inline__ vector long long __ATTRS_o_ai vec_vbpermq(vector signed char __a, vector signed char __b) { return __builtin_altivec_vbpermq((vector unsigned char)__a, (vector unsigned char)__b); } static __inline__ vector long long __ATTRS_o_ai vec_vbpermq(vector unsigned char __a, vector unsigned char __b) { return __builtin_altivec_vbpermq(__a, __b); } #ifdef __powerpc64__ static __inline__ vector unsigned long long __attribute__((__always_inline__)) vec_bperm(vector unsigned __int128 __a, vector unsigned char __b) { return __builtin_altivec_vbpermq((vector unsigned char)__a, (vector unsigned char)__b); } #endif # 16157 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #endif # 16158 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_reve */ static inline __ATTRS_o_ai vector bool char vec_reve(vector bool char __a) { return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector signed char vec_reve(vector signed char __a) { return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector unsigned char vec_reve(vector unsigned char __a) { return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector bool int vec_reve(vector bool int __a) { return __builtin_shufflevector(__a, __a, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector signed int vec_reve(vector signed int __a) { return __builtin_shufflevector(__a, __a, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector unsigned int vec_reve(vector unsigned int __a) { return __builtin_shufflevector(__a, __a, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector bool short vec_reve(vector bool short __a) { return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector signed short vec_reve(vector signed short __a) { return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector unsigned short vec_reve(vector unsigned short __a) { return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0); } static inline __ATTRS_o_ai vector float vec_reve(vector float __a) { return __builtin_shufflevector(__a, __a, 3, 2, 1, 0); } #ifdef __VSX__ static inline __ATTRS_o_ai vector bool long long vec_reve(vector bool long long __a) { return __builtin_shufflevector(__a, __a, 1, 0); } static inline __ATTRS_o_ai vector signed long long vec_reve(vector signed long long __a) { return __builtin_shufflevector(__a, __a, 1, 0); } static inline __ATTRS_o_ai vector unsigned long long vec_reve(vector unsigned long long __a) { return __builtin_shufflevector(__a, __a, 1, 0); } static inline __ATTRS_o_ai vector double vec_reve(vector double __a) { return __builtin_shufflevector(__a, __a, 1, 0); } #endif # 16229 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_revb */ static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a) { return __a; } static __inline__ vector signed char __ATTRS_o_ai vec_revb(vector signed char __a) { return __a; } static __inline__ vector unsigned char __ATTRS_o_ai vec_revb(vector unsigned char __a) { return __a; } static __inline__ vector bool short __ATTRS_o_ai vec_revb(vector bool short __a) { vector unsigned char __indices = { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }; return vec_perm(__a, __a, __indices); } static __inline__ vector signed short __ATTRS_o_ai vec_revb(vector signed short __a) { vector unsigned char __indices = { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }; return vec_perm(__a, __a, __indices); } static __inline__ vector unsigned short __ATTRS_o_ai vec_revb(vector unsigned short __a) { vector unsigned char __indices = { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }; return vec_perm(__a, __a, __indices); } static __inline__ vector bool int __ATTRS_o_ai vec_revb(vector bool int __a) { vector unsigned char __indices = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }; return vec_perm(__a, __a, __indices); } static __inline__ vector signed int __ATTRS_o_ai vec_revb(vector signed int __a) { vector unsigned char __indices = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }; return vec_perm(__a, __a, __indices); } static __inline__ vector unsigned int __ATTRS_o_ai vec_revb(vector unsigned int __a) { vector unsigned char __indices = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }; return vec_perm(__a, __a, __indices); } static __inline__ vector float __ATTRS_o_ai vec_revb(vector float __a) { vector unsigned char __indices = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }; return vec_perm(__a, __a, __indices); } #ifdef __VSX__ static __inline__ vector bool long long __ATTRS_o_ai vec_revb(vector bool long long __a) { vector unsigned char __indices = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }; return vec_perm(__a, __a, __indices); } static __inline__ vector signed long long __ATTRS_o_ai vec_revb(vector signed long long __a) { vector unsigned char __indices = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }; return vec_perm(__a, __a, __indices); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_revb(vector unsigned long long __a) { vector unsigned char __indices = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }; return vec_perm(__a, __a, __indices); } static __inline__ vector double __ATTRS_o_ai vec_revb(vector double __a) { vector unsigned char __indices = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }; return vec_perm(__a, __a, __indices); } #endif /* End __VSX__ */ # 16324 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16326 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_revb(vector signed __int128 __a) { vector unsigned char __indices = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; return (vector signed __int128)vec_perm((vector signed int)__a, (vector signed int)__a, __indices); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_revb(vector unsigned __int128 __a) { vector unsigned char __indices = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; return (vector unsigned __int128)vec_perm((vector signed int)__a, (vector signed int)__a, __indices); } #endif /* END __POWER8_VECTOR__ && __powerpc64__ */ # 16344 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_xl */ typedef vector signed char unaligned_vec_schar __attribute__((aligned(1))); typedef vector unsigned char unaligned_vec_uchar __attribute__((aligned(1))); typedef vector signed short unaligned_vec_sshort __attribute__((aligned(1))); typedef vector unsigned short unaligned_vec_ushort __attribute__((aligned(1))); typedef vector signed int unaligned_vec_sint __attribute__((aligned(1))); typedef vector unsigned int unaligned_vec_uint __attribute__((aligned(1))); typedef vector float unaligned_vec_float __attribute__((aligned(1))); static inline __ATTRS_o_ai vector signed char vec_xl(signed long long __offset, signed char *__ptr) { return *(unaligned_vec_schar *)(__ptr + __offset); } static inline __ATTRS_o_ai vector unsigned char vec_xl(signed long long __offset, unsigned char *__ptr) { return *(unaligned_vec_uchar*)(__ptr + __offset); } static inline __ATTRS_o_ai vector signed short vec_xl(signed long long __offset, signed short *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_sshort *)__addr; } static inline __ATTRS_o_ai vector unsigned short vec_xl(signed long long __offset, unsigned short *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_ushort *)__addr; } static inline __ATTRS_o_ai vector signed int vec_xl(signed long long __offset, signed int *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_sint *)__addr; } static inline __ATTRS_o_ai vector unsigned int vec_xl(signed long long __offset, unsigned int *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_uint *)__addr; } static inline __ATTRS_o_ai vector float vec_xl(signed long long __offset, float *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_float *)__addr; } #ifdef __VSX__ typedef vector signed long long unaligned_vec_sll __attribute__((aligned(1))); typedef vector unsigned long long unaligned_vec_ull __attribute__((aligned(1))); typedef vector double unaligned_vec_double __attribute__((aligned(1))); static inline __ATTRS_o_ai vector signed long long vec_xl(signed long long __offset, signed long long *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_sll *)__addr; } static inline __ATTRS_o_ai vector unsigned long long vec_xl(signed long long __offset, unsigned long long *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_ull *)__addr; } static inline __ATTRS_o_ai vector double vec_xl(signed long long __offset, double *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_double *)__addr; } #endif # 16418 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16420 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 typedef vector signed __int128 unaligned_vec_si128 __attribute__((aligned(1))); typedef vector unsigned __int128 unaligned_vec_ui128 __attribute__((aligned(1))); static inline __ATTRS_o_ai vector signed __int128 vec_xl(signed long long __offset, signed __int128 *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_si128 *)__addr; } static inline __ATTRS_o_ai vector unsigned __int128 vec_xl(signed long long __offset, unsigned __int128 *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; return *(unaligned_vec_ui128 *)__addr; } #endif # 16435 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_xl_be */ #ifdef __LITTLE_ENDIAN__ static __inline__ vector signed char __ATTRS_o_ai vec_xl_be(signed long long __offset, signed char *__ptr) { vector signed char __vec = (vector signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr); return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); } static __inline__ vector unsigned char __ATTRS_o_ai vec_xl_be(signed long long __offset, unsigned char *__ptr) { vector unsigned char __vec = (vector unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr); return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); } static __inline__ vector signed short __ATTRS_o_ai vec_xl_be(signed long long __offset, signed short *__ptr) { vector signed short __vec = (vector signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr); return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); } static __inline__ vector unsigned short __ATTRS_o_ai vec_xl_be(signed long long __offset, unsigned short *__ptr) { vector unsigned short __vec = (vector unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr); return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); } static __inline__ vector signed int __ATTRS_o_ai vec_xl_be(signed long long __offset, signed int *__ptr) { return (vector signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr); } static __inline__ vector unsigned int __ATTRS_o_ai vec_xl_be(signed long long __offset, unsigned int *__ptr) { return (vector unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr); } static __inline__ vector float __ATTRS_o_ai vec_xl_be(signed long long __offset, float *__ptr) { return (vector float)__builtin_vsx_lxvw4x_be(__offset, __ptr); } #ifdef __VSX__ static __inline__ vector signed long long __ATTRS_o_ai vec_xl_be(signed long long __offset, signed long long *__ptr) { return (vector signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr); } static __inline__ vector unsigned long long __ATTRS_o_ai vec_xl_be(signed long long __offset, unsigned long long *__ptr) { return (vector unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr); } static __inline__ vector double __ATTRS_o_ai vec_xl_be(signed long long __offset, double *__ptr) { return (vector double)__builtin_vsx_lxvd2x_be(__offset, __ptr); } #endif # 16496 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16498 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ vector signed __int128 __ATTRS_o_ai vec_xl_be(signed long long __offset, signed __int128 *__ptr) { return vec_xl(__offset, __ptr); } static __inline__ vector unsigned __int128 __ATTRS_o_ai vec_xl_be(signed long long __offset, unsigned __int128 *__ptr) { return vec_xl(__offset, __ptr); } #endif # 16508 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #else # 16509 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #define vec_xl_be vec_xl #endif # 16511 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_xst */ static inline __ATTRS_o_ai void vec_xst(vector signed char __vec, signed long long __offset, signed char *__ptr) { *(unaligned_vec_schar *)(__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void vec_xst(vector unsigned char __vec, signed long long __offset, unsigned char *__ptr) { *(unaligned_vec_uchar *)(__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void vec_xst(vector signed short __vec, signed long long __offset, signed short *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_sshort *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector unsigned short __vec, signed long long __offset, unsigned short *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_ushort *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector signed int __vec, signed long long __offset, signed int *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_sint *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector unsigned int __vec, signed long long __offset, unsigned int *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_uint *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector float __vec, signed long long __offset, float *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_float *)__addr = __vec; } #ifdef __VSX__ static inline __ATTRS_o_ai void vec_xst(vector signed long long __vec, signed long long __offset, signed long long *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_sll *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector unsigned long long __vec, signed long long __offset, unsigned long long *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_ull *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector double __vec, signed long long __offset, double *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_double *)__addr = __vec; } #endif # 16583 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16585 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static inline __ATTRS_o_ai void vec_xst(vector signed __int128 __vec, signed long long __offset, signed __int128 *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_si128 *)__addr = __vec; } static inline __ATTRS_o_ai void vec_xst(vector unsigned __int128 __vec, signed long long __offset, unsigned __int128 *__ptr) { signed char *__addr = (signed char *)__ptr + __offset; *(unaligned_vec_ui128 *)__addr = __vec; } #endif # 16599 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 /* vec_xst_be */ #ifdef __LITTLE_ENDIAN__ static __inline__ void __ATTRS_o_ai vec_xst_be(vector signed char __vec, signed long long __offset, signed char *__ptr) { vector signed char __tmp = __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); typedef __attribute__((vector_size(sizeof(__tmp)))) double __vector_double; __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector unsigned char __vec, signed long long __offset, unsigned char *__ptr) { vector unsigned char __tmp = __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); typedef __attribute__((vector_size(sizeof(__tmp)))) double __vector_double; __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector signed short __vec, signed long long __offset, signed short *__ptr) { vector signed short __tmp = __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); typedef __attribute__((vector_size(sizeof(__tmp)))) double __vector_double; __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector unsigned short __vec, signed long long __offset, unsigned short *__ptr) { vector unsigned short __tmp = __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4); typedef __attribute__((vector_size(sizeof(__tmp)))) double __vector_double; __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector signed int __vec, signed long long __offset, signed int *__ptr) { __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector unsigned int __vec, signed long long __offset, unsigned int *__ptr) { __builtin_vsx_stxvw4x_be((vector int)__vec, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector float __vec, signed long long __offset, float *__ptr) { __builtin_vsx_stxvw4x_be((vector int)__vec, __offset, __ptr); } #ifdef __VSX__ static __inline__ void __ATTRS_o_ai vec_xst_be(vector signed long long __vec, signed long long __offset, signed long long *__ptr) { __builtin_vsx_stxvd2x_be((vector double)__vec, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector unsigned long long __vec, signed long long __offset, unsigned long long *__ptr) { __builtin_vsx_stxvd2x_be((vector double)__vec, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector double __vec, signed long long __offset, double *__ptr) { __builtin_vsx_stxvd2x_be((vector double)__vec, __offset, __ptr); } #endif # 16678 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16680 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static __inline__ void __ATTRS_o_ai vec_xst_be(vector signed __int128 __vec, signed long long __offset, signed __int128 *__ptr) { vec_xst(__vec, __offset, __ptr); } static __inline__ void __ATTRS_o_ai vec_xst_be(vector unsigned __int128 __vec, signed long long __offset, unsigned __int128 *__ptr) { vec_xst(__vec, __offset, __ptr); } #endif # 16692 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #else # 16693 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #define vec_xst_be vec_xst #endif # 16695 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #ifdef __POWER9_VECTOR__ #define vec_test_data_class(__a, __b) \ _Generic( \ (__a), vector float \ : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \ vector double \ : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \ (__b))) #endif /* #ifdef __POWER9_VECTOR__ */ # 16706 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static vector float __ATTRS_o_ai vec_neg(vector float __a) { return -__a; } #ifdef __VSX__ static vector double __ATTRS_o_ai vec_neg(vector double __a) { return -__a; } #endif # 16717 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16719 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static vector long long __ATTRS_o_ai vec_neg(vector long long __a) { return -__a; } #endif # 16723 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static vector signed int __ATTRS_o_ai vec_neg(vector signed int __a) { return -__a; } static vector signed short __ATTRS_o_ai vec_neg(vector signed short __a) { return -__a; } static vector signed char __ATTRS_o_ai vec_neg(vector signed char __a) { return -__a; } static vector float __ATTRS_o_ai vec_nabs(vector float __a) { return - vec_abs(__a); } #ifdef __VSX__ static vector double __ATTRS_o_ai vec_nabs(vector double __a) { return - vec_abs(__a); } #endif # 16746 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16748 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static vector long long __ATTRS_o_ai vec_nabs(vector long long __a) { return __builtin_altivec_vminsd(__a, -__a); } #endif # 16752 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 static vector signed int __ATTRS_o_ai vec_nabs(vector signed int __a) { return __builtin_altivec_vminsw(__a, -__a); } static vector signed short __ATTRS_o_ai vec_nabs(vector signed short __a) { return __builtin_altivec_vminsh(__a, -__a); } static vector signed char __ATTRS_o_ai vec_nabs(vector signed char __a) { return __builtin_altivec_vminsb(__a, -__a); } #undef __ATTRS_o_ai #endif /* __ALTIVEC_H */ # 16767 "/usr/lib/clang/10.0.0/include/altivec.h" 3 4 # 12 "./altivec-types.h" 2 typedef __vector unsigned char vec_u8; typedef __vector signed char vec_s8; typedef __vector unsigned short vec_u16; typedef __vector signed short vec_s16; typedef __vector unsigned int vec_u32; typedef __vector signed int vec_s32; typedef __vector unsigned long long vec_u64; typedef __vector signed long long vec_s64; typedef __vector float vec_f; #endif # 24 "./altivec-types.h" # 35 "./gcm.h" 2 /* The ghash freebl test tries to use this in C++, and gcc defines conflict. */ #ifdef __cplusplus #undef pixel #undef vector #undef bool #endif # 42 "./gcm.h" /* * PPC CRYPTO requires at least gcc 8 or clang. The LE check is purely * because it's only been tested on LE. If you're interested in BE, * please send a patch. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 8)) && \ defined(IS_LITTLE_ENDIAN) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 50 "./gcm.h" #define USE_PPC_CRYPTO #endif # 52 "./gcm.h" #endif # 54 "./gcm.h" SEC_BEGIN_PROTOS #ifdef HAVE_INT128_SUPPORT typedef unsigned __int128 uint128_t; #endif # 60 "./gcm.h" typedef struct GCMContextStr GCMContext; /* * The context argument is the inner cipher context to use with cipher. The * GCMContext does not own context. context needs to remain valid for as long * as the GCMContext is valid. * * The cipher argument is a block cipher in the ECB encrypt mode. */ GCMContext *GCM_CreateContext(void *context, freeblCipherFunc cipher, const unsigned char *params); void GCM_DestroyContext(GCMContext *gcm, PRBool freeit); SECStatus GCM_EncryptUpdate(GCMContext *gcm, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize); SECStatus GCM_DecryptUpdate(GCMContext *gcm, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize); /* These functions are here only so we can test them */ #define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */ typedef struct gcmHashContextStr gcmHashContext; typedef SECStatus (*ghash_t)(gcmHashContext *, const unsigned char *, unsigned int); pre_align struct gcmHashContextStr { #ifdef NSS_X86_OR_X64 __m128i x, h; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__aarch64__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 91 "./gcm.h" uint64x2_t x, h; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(USE_PPC_CRYPTO) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 93 "./gcm.h" vec_u64 x, h; #endif # 95 "./gcm.h" uint64_t x_low, x_high, h_high, h_low; unsigned char buffer[MAX_BLOCK_SIZE]; unsigned int bufLen; uint8_t counterBuf[16]; uint64_t cLen; ghash_t ghash_mul; PRBool hw; gcmHashContext *mem; } post_align; SECStatus gcmHash_Update(gcmHashContext *ghash, const unsigned char *buf, unsigned int len); SECStatus gcmHash_InitContext(gcmHashContext *ghash, const unsigned char *H, PRBool sw); SECStatus gcmHash_Reset(gcmHashContext *ghash, const unsigned char *AAD, unsigned int AADLen); SECStatus gcmHash_Final(gcmHashContext *ghash, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout); SEC_END_PROTOS #endif # 117 "./gcm.h" # 13 "gcm.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "ctr.h" #endif /* expanded by -frewrite-includes */ # 13 "gcm.c" # 1 "./ctr.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef CTR_H #define CTR_H 1 #if 0 /* expanded by -frewrite-includes */ #include "blapii.h" #endif /* expanded by -frewrite-includes */ # 8 "./ctr.h" # 9 "./ctr.h" /* This structure is defined in this header because both ctr.c and gcm.c * need it. */ struct CTRContextStr { freeblCipherFunc cipher; void *context; unsigned char counter[MAX_BLOCK_SIZE]; unsigned char buffer[MAX_BLOCK_SIZE]; unsigned char counterFirst[MAX_BLOCK_SIZE]; /* counter overlfow value */ PRBool checkWrap; /*check for counter overflow*/ unsigned long counterBits; unsigned int bufPtr; }; typedef struct CTRContextStr CTRContext; SECStatus CTR_InitContext(CTRContext *ctr, void *context, freeblCipherFunc cipher, const unsigned char *param); /* * The context argument is the inner cipher context to use with cipher. The * CTRContext does not own context. context needs to remain valid for as long * as the CTRContext is valid. * * The cipher argument is a block cipher in the ECB encrypt mode. */ CTRContext *CTR_CreateContext(void *context, freeblCipherFunc cipher, const unsigned char *param); void CTR_DestroyContext(CTRContext *ctr, PRBool freeit); SECStatus CTR_Update(CTRContext *ctr, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize); #ifdef USE_HW_AES SECStatus CTR_Update_HW_AES(CTRContext *ctr, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize); #endif # 51 "./ctr.h" #endif # 53 "./ctr.h" # 14 "gcm.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "secerr.h" #endif /* expanded by -frewrite-includes */ # 14 "gcm.c" # 1 "../../../dist/public/nss/secerr.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __SEC_ERR_H_ #define __SEC_ERR_H_ #if 0 /* expanded by -frewrite-includes */ #include "utilrename.h" #endif /* expanded by -frewrite-includes */ # 8 "../../../dist/public/nss/secerr.h" # 9 "../../../dist/public/nss/secerr.h" #define SEC_ERROR_BASE (-0x2000) #define SEC_ERROR_LIMIT (SEC_ERROR_BASE + 1000) #define IS_SEC_ERROR(code) \ (((code) >= SEC_ERROR_BASE) && ((code) < SEC_ERROR_LIMIT)) #ifndef NO_SECURITY_ERROR_ENUM typedef enum { SEC_ERROR_IO = SEC_ERROR_BASE + 0, SEC_ERROR_LIBRARY_FAILURE = SEC_ERROR_BASE + 1, SEC_ERROR_BAD_DATA = SEC_ERROR_BASE + 2, SEC_ERROR_OUTPUT_LEN = SEC_ERROR_BASE + 3, SEC_ERROR_INPUT_LEN = SEC_ERROR_BASE + 4, SEC_ERROR_INVALID_ARGS = SEC_ERROR_BASE + 5, SEC_ERROR_INVALID_ALGORITHM = SEC_ERROR_BASE + 6, SEC_ERROR_INVALID_AVA = SEC_ERROR_BASE + 7, SEC_ERROR_INVALID_TIME = SEC_ERROR_BASE + 8, SEC_ERROR_BAD_DER = SEC_ERROR_BASE + 9, SEC_ERROR_BAD_SIGNATURE = SEC_ERROR_BASE + 10, SEC_ERROR_EXPIRED_CERTIFICATE = SEC_ERROR_BASE + 11, SEC_ERROR_REVOKED_CERTIFICATE = SEC_ERROR_BASE + 12, SEC_ERROR_UNKNOWN_ISSUER = SEC_ERROR_BASE + 13, SEC_ERROR_BAD_KEY = SEC_ERROR_BASE + 14, SEC_ERROR_BAD_PASSWORD = SEC_ERROR_BASE + 15, SEC_ERROR_RETRY_PASSWORD = SEC_ERROR_BASE + 16, SEC_ERROR_NO_NODELOCK = SEC_ERROR_BASE + 17, SEC_ERROR_BAD_DATABASE = SEC_ERROR_BASE + 18, SEC_ERROR_NO_MEMORY = SEC_ERROR_BASE + 19, SEC_ERROR_UNTRUSTED_ISSUER = SEC_ERROR_BASE + 20, SEC_ERROR_UNTRUSTED_CERT = SEC_ERROR_BASE + 21, SEC_ERROR_DUPLICATE_CERT = (SEC_ERROR_BASE + 22), SEC_ERROR_DUPLICATE_CERT_NAME = (SEC_ERROR_BASE + 23), SEC_ERROR_ADDING_CERT = (SEC_ERROR_BASE + 24), SEC_ERROR_FILING_KEY = (SEC_ERROR_BASE + 25), SEC_ERROR_NO_KEY = (SEC_ERROR_BASE + 26), SEC_ERROR_CERT_VALID = (SEC_ERROR_BASE + 27), SEC_ERROR_CERT_NOT_VALID = (SEC_ERROR_BASE + 28), SEC_ERROR_CERT_NO_RESPONSE = (SEC_ERROR_BASE + 29), SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE = (SEC_ERROR_BASE + 30), SEC_ERROR_CRL_EXPIRED = (SEC_ERROR_BASE + 31), SEC_ERROR_CRL_BAD_SIGNATURE = (SEC_ERROR_BASE + 32), SEC_ERROR_CRL_INVALID = (SEC_ERROR_BASE + 33), SEC_ERROR_EXTENSION_VALUE_INVALID = (SEC_ERROR_BASE + 34), SEC_ERROR_EXTENSION_NOT_FOUND = (SEC_ERROR_BASE + 35), SEC_ERROR_CA_CERT_INVALID = (SEC_ERROR_BASE + 36), SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID = (SEC_ERROR_BASE + 37), SEC_ERROR_CERT_USAGES_INVALID = (SEC_ERROR_BASE + 38), SEC_INTERNAL_ONLY = (SEC_ERROR_BASE + 39), SEC_ERROR_INVALID_KEY = (SEC_ERROR_BASE + 40), SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION = (SEC_ERROR_BASE + 41), SEC_ERROR_OLD_CRL = (SEC_ERROR_BASE + 42), SEC_ERROR_NO_EMAIL_CERT = (SEC_ERROR_BASE + 43), SEC_ERROR_NO_RECIPIENT_CERTS_QUERY = (SEC_ERROR_BASE + 44), SEC_ERROR_NOT_A_RECIPIENT = (SEC_ERROR_BASE + 45), SEC_ERROR_PKCS7_KEYALG_MISMATCH = (SEC_ERROR_BASE + 46), SEC_ERROR_PKCS7_BAD_SIGNATURE = (SEC_ERROR_BASE + 47), SEC_ERROR_UNSUPPORTED_KEYALG = (SEC_ERROR_BASE + 48), SEC_ERROR_DECRYPTION_DISALLOWED = (SEC_ERROR_BASE + 49), /* Fortezza Alerts */ XP_SEC_FORTEZZA_BAD_CARD = (SEC_ERROR_BASE + 50), XP_SEC_FORTEZZA_NO_CARD = (SEC_ERROR_BASE + 51), XP_SEC_FORTEZZA_NONE_SELECTED = (SEC_ERROR_BASE + 52), XP_SEC_FORTEZZA_MORE_INFO = (SEC_ERROR_BASE + 53), XP_SEC_FORTEZZA_PERSON_NOT_FOUND = (SEC_ERROR_BASE + 54), XP_SEC_FORTEZZA_NO_MORE_INFO = (SEC_ERROR_BASE + 55), XP_SEC_FORTEZZA_BAD_PIN = (SEC_ERROR_BASE + 56), XP_SEC_FORTEZZA_PERSON_ERROR = (SEC_ERROR_BASE + 57), SEC_ERROR_NO_KRL = (SEC_ERROR_BASE + 58), SEC_ERROR_KRL_EXPIRED = (SEC_ERROR_BASE + 59), SEC_ERROR_KRL_BAD_SIGNATURE = (SEC_ERROR_BASE + 60), SEC_ERROR_REVOKED_KEY = (SEC_ERROR_BASE + 61), SEC_ERROR_KRL_INVALID = (SEC_ERROR_BASE + 62), SEC_ERROR_NEED_RANDOM = (SEC_ERROR_BASE + 63), SEC_ERROR_NO_MODULE = (SEC_ERROR_BASE + 64), SEC_ERROR_NO_TOKEN = (SEC_ERROR_BASE + 65), SEC_ERROR_READ_ONLY = (SEC_ERROR_BASE + 66), SEC_ERROR_NO_SLOT_SELECTED = (SEC_ERROR_BASE + 67), SEC_ERROR_CERT_NICKNAME_COLLISION = (SEC_ERROR_BASE + 68), SEC_ERROR_KEY_NICKNAME_COLLISION = (SEC_ERROR_BASE + 69), SEC_ERROR_SAFE_NOT_CREATED = (SEC_ERROR_BASE + 70), SEC_ERROR_BAGGAGE_NOT_CREATED = (SEC_ERROR_BASE + 71), XP_JAVA_REMOVE_PRINCIPAL_ERROR = (SEC_ERROR_BASE + 72), XP_JAVA_DELETE_PRIVILEGE_ERROR = (SEC_ERROR_BASE + 73), XP_JAVA_CERT_NOT_EXISTS_ERROR = (SEC_ERROR_BASE + 74), SEC_ERROR_BAD_EXPORT_ALGORITHM = (SEC_ERROR_BASE + 75), SEC_ERROR_EXPORTING_CERTIFICATES = (SEC_ERROR_BASE + 76), SEC_ERROR_IMPORTING_CERTIFICATES = (SEC_ERROR_BASE + 77), SEC_ERROR_PKCS12_DECODING_PFX = (SEC_ERROR_BASE + 78), SEC_ERROR_PKCS12_INVALID_MAC = (SEC_ERROR_BASE + 79), SEC_ERROR_PKCS12_UNSUPPORTED_MAC_ALGORITHM = (SEC_ERROR_BASE + 80), SEC_ERROR_PKCS12_UNSUPPORTED_TRANSPORT_MODE = (SEC_ERROR_BASE + 81), SEC_ERROR_PKCS12_CORRUPT_PFX_STRUCTURE = (SEC_ERROR_BASE + 82), SEC_ERROR_PKCS12_UNSUPPORTED_PBE_ALGORITHM = (SEC_ERROR_BASE + 83), SEC_ERROR_PKCS12_UNSUPPORTED_VERSION = (SEC_ERROR_BASE + 84), SEC_ERROR_PKCS12_PRIVACY_PASSWORD_INCORRECT = (SEC_ERROR_BASE + 85), SEC_ERROR_PKCS12_CERT_COLLISION = (SEC_ERROR_BASE + 86), SEC_ERROR_USER_CANCELLED = (SEC_ERROR_BASE + 87), SEC_ERROR_PKCS12_DUPLICATE_DATA = (SEC_ERROR_BASE + 88), SEC_ERROR_MESSAGE_SEND_ABORTED = (SEC_ERROR_BASE + 89), SEC_ERROR_INADEQUATE_KEY_USAGE = (SEC_ERROR_BASE + 90), SEC_ERROR_INADEQUATE_CERT_TYPE = (SEC_ERROR_BASE + 91), SEC_ERROR_CERT_ADDR_MISMATCH = (SEC_ERROR_BASE + 92), SEC_ERROR_PKCS12_UNABLE_TO_IMPORT_KEY = (SEC_ERROR_BASE + 93), SEC_ERROR_PKCS12_IMPORTING_CERT_CHAIN = (SEC_ERROR_BASE + 94), SEC_ERROR_PKCS12_UNABLE_TO_LOCATE_OBJECT_BY_NAME = (SEC_ERROR_BASE + 95), SEC_ERROR_PKCS12_UNABLE_TO_EXPORT_KEY = (SEC_ERROR_BASE + 96), SEC_ERROR_PKCS12_UNABLE_TO_WRITE = (SEC_ERROR_BASE + 97), SEC_ERROR_PKCS12_UNABLE_TO_READ = (SEC_ERROR_BASE + 98), SEC_ERROR_PKCS12_KEY_DATABASE_NOT_INITIALIZED = (SEC_ERROR_BASE + 99), SEC_ERROR_KEYGEN_FAIL = (SEC_ERROR_BASE + 100), SEC_ERROR_INVALID_PASSWORD = (SEC_ERROR_BASE + 101), SEC_ERROR_RETRY_OLD_PASSWORD = (SEC_ERROR_BASE + 102), SEC_ERROR_BAD_NICKNAME = (SEC_ERROR_BASE + 103), SEC_ERROR_NOT_FORTEZZA_ISSUER = (SEC_ERROR_BASE + 104), SEC_ERROR_CANNOT_MOVE_SENSITIVE_KEY = (SEC_ERROR_BASE + 105), SEC_ERROR_JS_INVALID_MODULE_NAME = (SEC_ERROR_BASE + 106), SEC_ERROR_JS_INVALID_DLL = (SEC_ERROR_BASE + 107), SEC_ERROR_JS_ADD_MOD_FAILURE = (SEC_ERROR_BASE + 108), SEC_ERROR_JS_DEL_MOD_FAILURE = (SEC_ERROR_BASE + 109), SEC_ERROR_OLD_KRL = (SEC_ERROR_BASE + 110), SEC_ERROR_CKL_CONFLICT = (SEC_ERROR_BASE + 111), SEC_ERROR_CERT_NOT_IN_NAME_SPACE = (SEC_ERROR_BASE + 112), SEC_ERROR_KRL_NOT_YET_VALID = (SEC_ERROR_BASE + 113), SEC_ERROR_CRL_NOT_YET_VALID = (SEC_ERROR_BASE + 114), SEC_ERROR_UNKNOWN_CERT = (SEC_ERROR_BASE + 115), SEC_ERROR_UNKNOWN_SIGNER = (SEC_ERROR_BASE + 116), SEC_ERROR_CERT_BAD_ACCESS_LOCATION = (SEC_ERROR_BASE + 117), SEC_ERROR_OCSP_UNKNOWN_RESPONSE_TYPE = (SEC_ERROR_BASE + 118), SEC_ERROR_OCSP_BAD_HTTP_RESPONSE = (SEC_ERROR_BASE + 119), SEC_ERROR_OCSP_MALFORMED_REQUEST = (SEC_ERROR_BASE + 120), SEC_ERROR_OCSP_SERVER_ERROR = (SEC_ERROR_BASE + 121), SEC_ERROR_OCSP_TRY_SERVER_LATER = (SEC_ERROR_BASE + 122), SEC_ERROR_OCSP_REQUEST_NEEDS_SIG = (SEC_ERROR_BASE + 123), SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST = (SEC_ERROR_BASE + 124), SEC_ERROR_OCSP_UNKNOWN_RESPONSE_STATUS = (SEC_ERROR_BASE + 125), SEC_ERROR_OCSP_UNKNOWN_CERT = (SEC_ERROR_BASE + 126), SEC_ERROR_OCSP_NOT_ENABLED = (SEC_ERROR_BASE + 127), SEC_ERROR_OCSP_NO_DEFAULT_RESPONDER = (SEC_ERROR_BASE + 128), SEC_ERROR_OCSP_MALFORMED_RESPONSE = (SEC_ERROR_BASE + 129), SEC_ERROR_OCSP_UNAUTHORIZED_RESPONSE = (SEC_ERROR_BASE + 130), SEC_ERROR_OCSP_FUTURE_RESPONSE = (SEC_ERROR_BASE + 131), SEC_ERROR_OCSP_OLD_RESPONSE = (SEC_ERROR_BASE + 132), /* smime stuff */ SEC_ERROR_DIGEST_NOT_FOUND = (SEC_ERROR_BASE + 133), SEC_ERROR_UNSUPPORTED_MESSAGE_TYPE = (SEC_ERROR_BASE + 134), SEC_ERROR_MODULE_STUCK = (SEC_ERROR_BASE + 135), SEC_ERROR_BAD_TEMPLATE = (SEC_ERROR_BASE + 136), SEC_ERROR_CRL_NOT_FOUND = (SEC_ERROR_BASE + 137), SEC_ERROR_REUSED_ISSUER_AND_SERIAL = (SEC_ERROR_BASE + 138), SEC_ERROR_BUSY = (SEC_ERROR_BASE + 139), SEC_ERROR_EXTRA_INPUT = (SEC_ERROR_BASE + 140), /* error codes used by elliptic curve code */ SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE = (SEC_ERROR_BASE + 141), SEC_ERROR_UNSUPPORTED_EC_POINT_FORM = (SEC_ERROR_BASE + 142), SEC_ERROR_UNRECOGNIZED_OID = (SEC_ERROR_BASE + 143), SEC_ERROR_OCSP_INVALID_SIGNING_CERT = (SEC_ERROR_BASE + 144), /* new revocation errors */ SEC_ERROR_REVOKED_CERTIFICATE_CRL = (SEC_ERROR_BASE + 145), SEC_ERROR_REVOKED_CERTIFICATE_OCSP = (SEC_ERROR_BASE + 146), SEC_ERROR_CRL_INVALID_VERSION = (SEC_ERROR_BASE + 147), SEC_ERROR_CRL_V1_CRITICAL_EXTENSION = (SEC_ERROR_BASE + 148), SEC_ERROR_CRL_UNKNOWN_CRITICAL_EXTENSION = (SEC_ERROR_BASE + 149), SEC_ERROR_UNKNOWN_OBJECT_TYPE = (SEC_ERROR_BASE + 150), SEC_ERROR_INCOMPATIBLE_PKCS11 = (SEC_ERROR_BASE + 151), SEC_ERROR_NO_EVENT = (SEC_ERROR_BASE + 152), SEC_ERROR_CRL_ALREADY_EXISTS = (SEC_ERROR_BASE + 153), SEC_ERROR_NOT_INITIALIZED = (SEC_ERROR_BASE + 154), SEC_ERROR_TOKEN_NOT_LOGGED_IN = (SEC_ERROR_BASE + 155), SEC_ERROR_OCSP_RESPONDER_CERT_INVALID = (SEC_ERROR_BASE + 156), SEC_ERROR_OCSP_BAD_SIGNATURE = (SEC_ERROR_BASE + 157), SEC_ERROR_OUT_OF_SEARCH_LIMITS = (SEC_ERROR_BASE + 158), SEC_ERROR_INVALID_POLICY_MAPPING = (SEC_ERROR_BASE + 159), SEC_ERROR_POLICY_VALIDATION_FAILED = (SEC_ERROR_BASE + 160), /* No longer used. Unknown AIA location types are now silently ignored. */ SEC_ERROR_UNKNOWN_AIA_LOCATION_TYPE = (SEC_ERROR_BASE + 161), SEC_ERROR_BAD_HTTP_RESPONSE = (SEC_ERROR_BASE + 162), SEC_ERROR_BAD_LDAP_RESPONSE = (SEC_ERROR_BASE + 163), SEC_ERROR_FAILED_TO_ENCODE_DATA = (SEC_ERROR_BASE + 164), SEC_ERROR_BAD_INFO_ACCESS_LOCATION = (SEC_ERROR_BASE + 165), SEC_ERROR_LIBPKIX_INTERNAL = (SEC_ERROR_BASE + 166), SEC_ERROR_PKCS11_GENERAL_ERROR = (SEC_ERROR_BASE + 167), SEC_ERROR_PKCS11_FUNCTION_FAILED = (SEC_ERROR_BASE + 168), SEC_ERROR_PKCS11_DEVICE_ERROR = (SEC_ERROR_BASE + 169), SEC_ERROR_BAD_INFO_ACCESS_METHOD = (SEC_ERROR_BASE + 170), SEC_ERROR_CRL_IMPORT_FAILED = (SEC_ERROR_BASE + 171), SEC_ERROR_EXPIRED_PASSWORD = (SEC_ERROR_BASE + 172), SEC_ERROR_LOCKED_PASSWORD = (SEC_ERROR_BASE + 173), SEC_ERROR_UNKNOWN_PKCS11_ERROR = (SEC_ERROR_BASE + 174), SEC_ERROR_BAD_CRL_DP_URL = (SEC_ERROR_BASE + 175), SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED = (SEC_ERROR_BASE + 176), SEC_ERROR_LEGACY_DATABASE = (SEC_ERROR_BASE + 177), SEC_ERROR_APPLICATION_CALLBACK_ERROR = (SEC_ERROR_BASE + 178), /* Add new error codes above here. */ SEC_ERROR_END_OF_LIST } SECErrorCodes; #endif /* NO_SECURITY_ERROR_ENUM */ # 217 "../../../dist/public/nss/secerr.h" #endif /* __SEC_ERR_H_ */ # 219 "../../../dist/public/nss/secerr.h" # 15 "gcm.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 15 "gcm.c" # 16 "gcm.c" #if 0 /* expanded by -frewrite-includes */ #include "pkcs11t.h" #endif /* expanded by -frewrite-includes */ # 16 "gcm.c" # 1 "../../../dist/public/nss/pkcs11t.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* License to copy and use this software is granted provided that it is * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface * (Cryptoki)" in all material mentioning or referencing this software. * License is also granted to make and use derivative works provided that * such works are identified as "derived from the RSA Security Inc. PKCS #11 * Cryptographic Token Interface (Cryptoki)" in all material mentioning or * referencing the derived work. * RSA Security Inc. makes no representations concerning either the * merchantability of this software or the suitability of this software for * any particular purpose. It is provided "as is" without express or implied * warranty of any kind. */ #ifndef _PKCS11T_H_ #define _PKCS11T_H_ 1 #define CK_TRUE 1 #define CK_FALSE 0 #if 0 /* expanded by -frewrite-includes */ #include "prtypes.h" #endif /* expanded by -frewrite-includes */ # 25 "../../../dist/public/nss/pkcs11t.h" # 26 "../../../dist/public/nss/pkcs11t.h" #define CK_PTR * #define CK_NULL_PTR 0 #define CK_CALLBACK_FUNCTION(rtype, func) rtype(PR_CALLBACK *func) #define CK_DECLARE_FUNCTION(rtype, func) extern rtype func #define CK_DECLARE_FUNCTION_POINTER(rtype, func) rtype(PR_CALLBACK *func) #define CK_INVALID_SESSION 0 /* an unsigned 8-bit value */ typedef unsigned char CK_BYTE; /* an unsigned 8-bit character */ typedef CK_BYTE CK_CHAR; /* an 8-bit UTF-8 character */ typedef CK_BYTE CK_UTF8CHAR; /* a BYTE-sized Boolean flag */ typedef CK_BYTE CK_BBOOL; /* an unsigned value, at least 32 bits long */ typedef unsigned long int CK_ULONG; /* a signed value, the same size as a CK_ULONG */ /* CK_LONG is new for v2.0 */ typedef long int CK_LONG; /* at least 32 bits; each bit is a Boolean flag */ typedef CK_ULONG CK_FLAGS; /* some special values for certain CK_ULONG variables */ #define CK_UNAVAILABLE_INFORMATION (~0UL) #define CK_EFFECTIVELY_INFINITE 0 typedef CK_BYTE CK_PTR CK_BYTE_PTR; typedef CK_CHAR CK_PTR CK_CHAR_PTR; typedef CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR; typedef CK_ULONG CK_PTR CK_ULONG_PTR; typedef void CK_PTR CK_VOID_PTR; /* Pointer to a CK_VOID_PTR-- i.e., pointer to pointer to void */ typedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR; /* The following value is always invalid if used as a session */ /* handle or object handle */ #define CK_INVALID_HANDLE 0 /* pack */ #if 0 /* expanded by -frewrite-includes */ #include "pkcs11p.h" #endif /* expanded by -frewrite-includes */ # 75 "../../../dist/public/nss/pkcs11t.h" # 1 "../../../dist/public/nss/pkcs11p.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document * is granted provided that it is identified as "RSA Security Inc. Public-Key * Cryptography Standards (PKCS)" in all material mentioning or referencing * this document. */ /* these data types are platform/implementation dependent. */ /* * Packing was removed from the shipped RSA header files, even * though it's still needed. put in a central file to help merging.. */ #if 0 /* disabled by -frewrite-includes */ #if defined(_WIN32) || defined(_WINDOWS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "../../../dist/public/nss/pkcs11p.h" #ifdef __clang__ #pragma clang diagnostic ignored "-Wpragma-pack" #endif # 20 "../../../dist/public/nss/pkcs11p.h" #ifdef _MSC_VER #pragma warning(disable : 4103) #endif # 23 "../../../dist/public/nss/pkcs11p.h" #pragma pack(push, cryptoki, 1) #endif # 25 "../../../dist/public/nss/pkcs11p.h" # 76 "../../../dist/public/nss/pkcs11t.h" 2 typedef struct CK_VERSION { CK_BYTE major; /* integer portion of version number */ CK_BYTE minor; /* 1/100ths portion of version number */ } CK_VERSION; typedef CK_VERSION CK_PTR CK_VERSION_PTR; typedef struct CK_INFO { /* manufacturerID and libraryDecription have been changed from * CK_CHAR to CK_UTF8CHAR for v2.10 */ CK_VERSION cryptokiVersion; /* PKCS #11 interface ver */ CK_UTF8CHAR manufacturerID[32]; /* blank padded */ CK_FLAGS flags; /* must be zero */ /* libraryDescription and libraryVersion are new for v2.0 */ CK_UTF8CHAR libraryDescription[32]; /* blank padded */ CK_VERSION libraryVersion; /* version of library */ } CK_INFO; typedef CK_INFO CK_PTR CK_INFO_PTR; /* CK_NOTIFICATION enumerates the types of notifications that * PKCS #11 provides to an application */ /* CK_NOTIFICATION has been changed from an enum to a CK_ULONG * for v2.0 */ typedef CK_ULONG CK_NOTIFICATION; #define CKN_SURRENDER 0 typedef CK_ULONG CK_SLOT_ID; typedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR; /* CK_SLOT_INFO provides information about a slot */ typedef struct CK_SLOT_INFO { /* slotDescription and manufacturerID have been changed from * CK_CHAR to CK_UTF8CHAR for v2.10 */ CK_UTF8CHAR slotDescription[64]; /* blank padded */ CK_UTF8CHAR manufacturerID[32]; /* blank padded */ CK_FLAGS flags; /* hardwareVersion and firmwareVersion are new for v2.0 */ CK_VERSION hardwareVersion; /* version of hardware */ CK_VERSION firmwareVersion; /* version of firmware */ } CK_SLOT_INFO; /* flags: bit flags that provide capabilities of the slot * Bit Flag Mask Meaning */ #define CKF_TOKEN_PRESENT 0x00000001 /* a token is there */ #define CKF_REMOVABLE_DEVICE 0x00000002 /* removable devices*/ #define CKF_HW_SLOT 0x00000004 /* hardware slot */ typedef CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR; /* CK_TOKEN_INFO provides information about a token */ typedef struct CK_TOKEN_INFO { /* label, manufacturerID, and model have been changed from * CK_CHAR to CK_UTF8CHAR for v2.10 */ CK_UTF8CHAR label[32]; /* blank padded */ CK_UTF8CHAR manufacturerID[32]; /* blank padded */ CK_UTF8CHAR model[16]; /* blank padded */ CK_CHAR serialNumber[16]; /* blank padded */ CK_FLAGS flags; /* see below */ /* ulMaxSessionCount, ulSessionCount, ulMaxRwSessionCount, * ulRwSessionCount, ulMaxPinLen, and ulMinPinLen have all been * changed from CK_USHORT to CK_ULONG for v2.0 */ CK_ULONG ulMaxSessionCount; /* max open sessions */ CK_ULONG ulSessionCount; /* sess. now open */ CK_ULONG ulMaxRwSessionCount; /* max R/W sessions */ CK_ULONG ulRwSessionCount; /* R/W sess. now open */ CK_ULONG ulMaxPinLen; /* in bytes */ CK_ULONG ulMinPinLen; /* in bytes */ CK_ULONG ulTotalPublicMemory; /* in bytes */ CK_ULONG ulFreePublicMemory; /* in bytes */ CK_ULONG ulTotalPrivateMemory; /* in bytes */ CK_ULONG ulFreePrivateMemory; /* in bytes */ /* hardwareVersion, firmwareVersion, and time are new for * v2.0 */ CK_VERSION hardwareVersion; /* version of hardware */ CK_VERSION firmwareVersion; /* version of firmware */ CK_CHAR utcTime[16]; /* time */ } CK_TOKEN_INFO; /* The flags parameter is defined as follows: * Bit Flag Mask Meaning */ #define CKF_RNG 0x00000001 /* has random # \ * generator */ #define CKF_WRITE_PROTECTED 0x00000002 /* token is \ * write- \ * protected */ #define CKF_LOGIN_REQUIRED 0x00000004 /* user must \ * login */ #define CKF_USER_PIN_INITIALIZED 0x00000008 /* normal user's \ * PIN is set */ /* CKF_RESTORE_KEY_NOT_NEEDED is new for v2.0. If it is set, * that means that *every* time the state of cryptographic * operations of a session is successfully saved, all keys * needed to continue those operations are stored in the state */ #define CKF_RESTORE_KEY_NOT_NEEDED 0x00000020 /* CKF_CLOCK_ON_TOKEN is new for v2.0. If it is set, that means * that the token has some sort of clock. The time on that * clock is returned in the token info structure */ #define CKF_CLOCK_ON_TOKEN 0x00000040 /* CKF_PROTECTED_AUTHENTICATION_PATH is new for v2.0. If it is * set, that means that there is some way for the user to login * without sending a PIN through the PKCS #11 library itself */ #define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100 /* CKF_DUAL_CRYPTO_OPERATIONS is new for v2.0. If it is true, * that means that a single session with the token can perform * dual simultaneous cryptographic operations (digest and * encrypt; decrypt and digest; sign and encrypt; and decrypt * and sign) */ #define CKF_DUAL_CRYPTO_OPERATIONS 0x00000200 /* CKF_TOKEN_INITIALIZED if new for v2.10. If it is true, the * token has been initialized using C_InitializeToken or an * equivalent mechanism outside the scope of PKCS #11. * Calling C_InitializeToken when this flag is set will cause * the token to be reinitialized. */ #define CKF_TOKEN_INITIALIZED 0x00000400 /* CKF_SECONDARY_AUTHENTICATION if new for v2.10. If it is * true, the token supports secondary authentication for * private key objects. This flag is deprecated in v2.11 and onwards. */ #define CKF_SECONDARY_AUTHENTICATION 0x00000800 /* CKF_USER_PIN_COUNT_LOW if new for v2.10. If it is true, an * incorrect user login PIN has been entered at least once * since the last successful authentication. */ #define CKF_USER_PIN_COUNT_LOW 0x00010000 /* CKF_USER_PIN_FINAL_TRY if new for v2.10. If it is true, * supplying an incorrect user PIN will it to become locked. */ #define CKF_USER_PIN_FINAL_TRY 0x00020000 /* CKF_USER_PIN_LOCKED if new for v2.10. If it is true, the * user PIN has been locked. User login to the token is not * possible. */ #define CKF_USER_PIN_LOCKED 0x00040000 /* CKF_USER_PIN_TO_BE_CHANGED if new for v2.10. If it is true, * the user PIN value is the default value set by token * initialization or manufacturing, or the PIN has been * expired by the card. */ #define CKF_USER_PIN_TO_BE_CHANGED 0x00080000 /* CKF_SO_PIN_COUNT_LOW if new for v2.10. If it is true, an * incorrect SO login PIN has been entered at least once since * the last successful authentication. */ #define CKF_SO_PIN_COUNT_LOW 0x00100000 /* CKF_SO_PIN_FINAL_TRY if new for v2.10. If it is true, * supplying an incorrect SO PIN will it to become locked. */ #define CKF_SO_PIN_FINAL_TRY 0x00200000 /* CKF_SO_PIN_LOCKED if new for v2.10. If it is true, the SO * PIN has been locked. SO login to the token is not possible. */ #define CKF_SO_PIN_LOCKED 0x00400000 /* CKF_SO_PIN_TO_BE_CHANGED if new for v2.10. If it is true, * the SO PIN value is the default value set by token * initialization or manufacturing, or the PIN has been * expired by the card. */ #define CKF_SO_PIN_TO_BE_CHANGED 0x00800000 typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR; /* CK_SESSION_HANDLE is a PKCS #11-assigned value that * identifies a session */ typedef CK_ULONG CK_SESSION_HANDLE; typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR; /* CK_USER_TYPE enumerates the types of PKCS #11 users */ /* CK_USER_TYPE has been changed from an enum to a CK_ULONG for * v2.0 */ typedef CK_ULONG CK_USER_TYPE; /* Security Officer */ #define CKU_SO 0 /* Normal user */ #define CKU_USER 1 /* Context specific (added in v2.20) */ #define CKU_CONTEXT_SPECIFIC 2 /* CK_STATE enumerates the session states */ /* CK_STATE has been changed from an enum to a CK_ULONG for * v2.0 */ typedef CK_ULONG CK_STATE; #define CKS_RO_PUBLIC_SESSION 0 #define CKS_RO_USER_FUNCTIONS 1 #define CKS_RW_PUBLIC_SESSION 2 #define CKS_RW_USER_FUNCTIONS 3 #define CKS_RW_SO_FUNCTIONS 4 /* CK_SESSION_INFO provides information about a session */ typedef struct CK_SESSION_INFO { CK_SLOT_ID slotID; CK_STATE state; CK_FLAGS flags; /* see below */ /* ulDeviceError was changed from CK_USHORT to CK_ULONG for * v2.0 */ CK_ULONG ulDeviceError; /* device-dependent error code */ } CK_SESSION_INFO; /* The flags are defined in the following table: * Bit Flag Mask Meaning */ #define CKF_RW_SESSION 0x00000002 /* session is r/w */ #define CKF_SERIAL_SESSION 0x00000004 /* no parallel */ typedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR; /* CK_OBJECT_HANDLE is a token-specific identifier for an * object */ typedef CK_ULONG CK_OBJECT_HANDLE; typedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR; /* CK_OBJECT_CLASS is a value that identifies the classes (or * types) of objects that PKCS #11 recognizes. It is defined * as follows: */ /* CK_OBJECT_CLASS was changed from CK_USHORT to CK_ULONG for * v2.0 */ typedef CK_ULONG CK_OBJECT_CLASS; /* The following classes of objects are defined: */ /* CKO_HW_FEATURE is new for v2.10 */ /* CKO_DOMAIN_PARAMETERS is new for v2.11 */ /* CKO_MECHANISM is new for v2.20 */ /* CKO_PROFILE is new for v3.00 */ #define CKO_DATA 0x00000000 #define CKO_CERTIFICATE 0x00000001 #define CKO_PUBLIC_KEY 0x00000002 #define CKO_PRIVATE_KEY 0x00000003 #define CKO_SECRET_KEY 0x00000004 #define CKO_HW_FEATURE 0x00000005 #define CKO_DOMAIN_PARAMETERS 0x00000006 #define CKO_MECHANISM 0x00000007 #define CKO_PROFILE 0x00000009 #define CKO_VENDOR_DEFINED 0x80000000 typedef CK_OBJECT_CLASS CK_PTR CK_OBJECT_CLASS_PTR; /* CK_PROFILE_ID is new for v3.00. CK_PROFILE_ID is a value that * identifies the profile that the token supports. */ typedef CK_ULONG CK_PROFILE_ID; /* Profile ID's */ #define CKP_INVALID_ID 0x00000000UL #define CKP_BASELINE_PROVIDER 0x00000001UL #define CKP_EXTENDED_PROVIDER 0x00000002UL #define CKP_AUTHENTICATION_TOKEN 0x00000003UL #define CKP_PUBLIC_CERTIFICATES_TOKEN 0x00000004UL #define CKP_VENDOR_DEFINED 0x80000000UL /* CK_HW_FEATURE_TYPE is new for v2.10. CK_HW_FEATURE_TYPE is a * value that identifies the hardware feature type of an object * with CK_OBJECT_CLASS equal to CKO_HW_FEATURE. */ typedef CK_ULONG CK_HW_FEATURE_TYPE; /* The following hardware feature types are defined */ /* CKH_USER_INTERFACE is new for v2.20 */ #define CKH_MONOTONIC_COUNTER 0x00000001 #define CKH_CLOCK 0x00000002 #define CKH_USER_INTERFACE 0x00000003 #define CKH_VENDOR_DEFINED 0x80000000 /* CK_KEY_TYPE is a value that identifies a key type */ /* CK_KEY_TYPE was changed from CK_USHORT to CK_ULONG for v2.0 */ typedef CK_ULONG CK_KEY_TYPE; /* the following key types are defined: */ #define CKK_RSA 0x00000000 #define CKK_DSA 0x00000001 #define CKK_DH 0x00000002 /* CKK_ECDSA and CKK_KEA are new for v2.0 */ /* CKK_ECDSA is deprecated in v2.11, CKK_EC is preferred. */ #define CKK_ECDSA 0x00000003 #define CKK_EC 0x00000003 #define CKK_X9_42_DH 0x00000004 #define CKK_KEA 0x00000005 #define CKK_GENERIC_SECRET 0x00000010 #define CKK_RC2 0x00000011 #define CKK_RC4 0x00000012 #define CKK_DES 0x00000013 #define CKK_DES2 0x00000014 #define CKK_DES3 0x00000015 /* all these key types are new for v2.0 */ #define CKK_CAST 0x00000016 #define CKK_CAST3 0x00000017 /* CKK_CAST5 is deprecated in v2.11, CKK_CAST128 is preferred. */ #define CKK_CAST5 0x00000018 #define CKK_CAST128 0x00000018 #define CKK_RC5 0x00000019 #define CKK_IDEA 0x0000001A #define CKK_SKIPJACK 0x0000001B #define CKK_BATON 0x0000001C #define CKK_JUNIPER 0x0000001D #define CKK_CDMF 0x0000001E #define CKK_AES 0x0000001F /* BlowFish and TwoFish are new for v2.20 */ #define CKK_BLOWFISH 0x00000020 #define CKK_TWOFISH 0x00000021 /* Camellia is proposed for v2.20 Amendment 3 */ #define CKK_CAMELLIA 0x00000025 #define CKK_SEED 0x00000026 #define CKK_VENDOR_DEFINED 0x80000000 /* CK_CERTIFICATE_TYPE is a value that identifies a certificate * type */ /* CK_CERTIFICATE_TYPE was changed from CK_USHORT to CK_ULONG * for v2.0 */ typedef CK_ULONG CK_CERTIFICATE_TYPE; /* The following certificate types are defined: */ /* CKC_X_509_ATTR_CERT is new for v2.10 */ /* CKC_WTLS is new for v2.20 */ #define CKC_X_509 0x00000000 #define CKC_X_509_ATTR_CERT 0x00000001 #define CKC_WTLS 0x00000002 #define CKC_VENDOR_DEFINED 0x80000000 /* CK_ATTRIBUTE_TYPE is a value that identifies an attribute * type */ /* CK_ATTRIBUTE_TYPE was changed from CK_USHORT to CK_ULONG for * v2.0 */ typedef CK_ULONG CK_ATTRIBUTE_TYPE; /* The CKF_ARRAY_ATTRIBUTE flag identifies an attribute which consists of an array of values. */ #define CKF_ARRAY_ATTRIBUTE 0x40000000 /* The following attribute types are defined: */ #define CKA_CLASS 0x00000000 #define CKA_TOKEN 0x00000001 #define CKA_PRIVATE 0x00000002 #define CKA_LABEL 0x00000003 #define CKA_APPLICATION 0x00000010 #define CKA_VALUE 0x00000011 /* CKA_OBJECT_ID is new for v2.10 */ #define CKA_OBJECT_ID 0x00000012 #define CKA_CERTIFICATE_TYPE 0x00000080 #define CKA_ISSUER 0x00000081 #define CKA_SERIAL_NUMBER 0x00000082 /* CKA_AC_ISSUER, CKA_OWNER, and CKA_ATTR_TYPES are new * for v2.10 */ #define CKA_AC_ISSUER 0x00000083 #define CKA_OWNER 0x00000084 #define CKA_ATTR_TYPES 0x00000085 /* CKA_TRUSTED is new for v2.11 */ #define CKA_TRUSTED 0x00000086 /* CKA_CERTIFICATE_CATEGORY ... * CKA_CHECK_VALUE are new for v2.20 */ #define CKA_CERTIFICATE_CATEGORY 0x00000087 #define CKA_JAVA_MIDP_SECURITY_DOMAIN 0x00000088 #define CKA_URL 0x00000089 #define CKA_HASH_OF_SUBJECT_PUBLIC_KEY 0x0000008A #define CKA_HASH_OF_ISSUER_PUBLIC_KEY 0x0000008B #define CKA_CHECK_VALUE 0x00000090 #define CKA_KEY_TYPE 0x00000100 #define CKA_SUBJECT 0x00000101 #define CKA_ID 0x00000102 #define CKA_SENSITIVE 0x00000103 #define CKA_ENCRYPT 0x00000104 #define CKA_DECRYPT 0x00000105 #define CKA_WRAP 0x00000106 #define CKA_UNWRAP 0x00000107 #define CKA_SIGN 0x00000108 #define CKA_SIGN_RECOVER 0x00000109 #define CKA_VERIFY 0x0000010A #define CKA_VERIFY_RECOVER 0x0000010B #define CKA_DERIVE 0x0000010C #define CKA_START_DATE 0x00000110 #define CKA_END_DATE 0x00000111 #define CKA_MODULUS 0x00000120 #define CKA_MODULUS_BITS 0x00000121 #define CKA_PUBLIC_EXPONENT 0x00000122 #define CKA_PRIVATE_EXPONENT 0x00000123 #define CKA_PRIME_1 0x00000124 #define CKA_PRIME_2 0x00000125 #define CKA_EXPONENT_1 0x00000126 #define CKA_EXPONENT_2 0x00000127 #define CKA_COEFFICIENT 0x00000128 /* CKA_PUBLIC_KEY_INFO is new for v2.40 */ #define CKA_PUBLIC_KEY_INFO 0x00000129 #define CKA_PRIME 0x00000130 #define CKA_SUBPRIME 0x00000131 #define CKA_BASE 0x00000132 /* CKA_PRIME_BITS and CKA_SUB_PRIME_BITS are new for v2.11 */ #define CKA_PRIME_BITS 0x00000133 #define CKA_SUBPRIME_BITS 0x00000134 #define CKA_SUB_PRIME_BITS CKA_SUBPRIME_BITS /* (To retain backwards-compatibility) */ #define CKA_VALUE_BITS 0x00000160 #define CKA_VALUE_LEN 0x00000161 /* CKA_EXTRACTABLE, CKA_LOCAL, CKA_NEVER_EXTRACTABLE, * CKA_ALWAYS_SENSITIVE, CKA_MODIFIABLE, CKA_ECDSA_PARAMS, * and CKA_EC_POINT are new for v2.0 */ #define CKA_EXTRACTABLE 0x00000162 #define CKA_LOCAL 0x00000163 #define CKA_NEVER_EXTRACTABLE 0x00000164 #define CKA_ALWAYS_SENSITIVE 0x00000165 /* CKA_KEY_GEN_MECHANISM is new for v2.11 */ #define CKA_KEY_GEN_MECHANISM 0x00000166 #define CKA_MODIFIABLE 0x00000170 /* CKA_ECDSA_PARAMS is deprecated in v2.11, * CKA_EC_PARAMS is preferred. */ #define CKA_ECDSA_PARAMS 0x00000180 #define CKA_EC_PARAMS 0x00000180 #define CKA_EC_POINT 0x00000181 /* CKA_SECONDARY_AUTH, CKA_AUTH_PIN_FLAGS, * are new for v2.10. Deprecated in v2.11 and onwards. */ #define CKA_SECONDARY_AUTH 0x00000200 #define CKA_AUTH_PIN_FLAGS 0x00000201 /* CKA_ALWAYS_AUTHENTICATE ... * CKA_UNWRAP_TEMPLATE are new for v2.20 */ #define CKA_ALWAYS_AUTHENTICATE 0x00000202 #define CKA_WRAP_WITH_TRUSTED 0x00000210 #define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x00000211) #define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x00000212) /* CKA_HW_FEATURE_TYPE, CKA_RESET_ON_INIT, and CKA_HAS_RESET * are new for v2.10 */ #define CKA_HW_FEATURE_TYPE 0x00000300 #define CKA_RESET_ON_INIT 0x00000301 #define CKA_HAS_RESET 0x00000302 /* The following attributes are new for v2.20 */ #define CKA_PIXEL_X 0x00000400 #define CKA_PIXEL_Y 0x00000401 #define CKA_RESOLUTION 0x00000402 #define CKA_CHAR_ROWS 0x00000403 #define CKA_CHAR_COLUMNS 0x00000404 #define CKA_COLOR 0x00000405 #define CKA_BITS_PER_PIXEL 0x00000406 #define CKA_CHAR_SETS 0x00000480 #define CKA_ENCODING_METHODS 0x00000481 #define CKA_MIME_TYPES 0x00000482 #define CKA_MECHANISM_TYPE 0x00000500 #define CKA_REQUIRED_CMS_ATTRIBUTES 0x00000501 #define CKA_DEFAULT_CMS_ATTRIBUTES 0x00000502 #define CKA_SUPPORTED_CMS_ATTRIBUTES 0x00000503 #define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x00000600) #define CKA_PROFILE_ID 0x00000601UL #define CKA_VENDOR_DEFINED 0x80000000 /* CK_ATTRIBUTE is a structure that includes the type, length * and value of an attribute */ typedef struct CK_ATTRIBUTE { CK_ATTRIBUTE_TYPE type; CK_VOID_PTR pValue; /* ulValueLen went from CK_USHORT to CK_ULONG for v2.0 */ CK_ULONG ulValueLen; /* in bytes */ } CK_ATTRIBUTE; typedef CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR; /* CK_DATE is a structure that defines a date */ typedef struct CK_DATE { CK_CHAR year[4]; /* the year ("1900" - "9999") */ CK_CHAR month[2]; /* the month ("01" - "12") */ CK_CHAR day[2]; /* the day ("01" - "31") */ } CK_DATE; /* CK_MECHANISM_TYPE is a value that identifies a mechanism * type */ /* CK_MECHANISM_TYPE was changed from CK_USHORT to CK_ULONG for * v2.0 */ typedef CK_ULONG CK_MECHANISM_TYPE; /* the following mechanism types are defined: */ #define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000 #define CKM_RSA_PKCS 0x00000001 #define CKM_RSA_9796 0x00000002 #define CKM_RSA_X_509 0x00000003 /* CKM_MD2_RSA_PKCS, CKM_MD5_RSA_PKCS, and CKM_SHA1_RSA_PKCS * are new for v2.0. They are mechanisms which hash and sign */ #define CKM_MD2_RSA_PKCS 0x00000004 #define CKM_MD5_RSA_PKCS 0x00000005 #define CKM_SHA1_RSA_PKCS 0x00000006 /* CKM_RIPEMD128_RSA_PKCS, CKM_RIPEMD160_RSA_PKCS, and * CKM_RSA_PKCS_OAEP are new for v2.10 */ #define CKM_RIPEMD128_RSA_PKCS 0x00000007 #define CKM_RIPEMD160_RSA_PKCS 0x00000008 #define CKM_RSA_PKCS_OAEP 0x00000009 /* CKM_RSA_X9_31_KEY_PAIR_GEN, CKM_RSA_X9_31, CKM_SHA1_RSA_X9_31, * CKM_RSA_PKCS_PSS, and CKM_SHA1_RSA_PKCS_PSS are new for v2.11 */ #define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000A #define CKM_RSA_X9_31 0x0000000B #define CKM_SHA1_RSA_X9_31 0x0000000C #define CKM_RSA_PKCS_PSS 0x0000000D #define CKM_SHA1_RSA_PKCS_PSS 0x0000000E #define CKM_DSA_KEY_PAIR_GEN 0x00000010 #define CKM_DSA 0x00000011 #define CKM_DSA_SHA1 0x00000012 #define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020 #define CKM_DH_PKCS_DERIVE 0x00000021 /* CKM_X9_42_DH_KEY_PAIR_GEN, CKM_X9_42_DH_DERIVE, * CKM_X9_42_DH_HYBRID_DERIVE, and CKM_X9_42_MQV_DERIVE are new for * v2.11 */ #define CKM_X9_42_DH_KEY_PAIR_GEN 0x00000030 #define CKM_X9_42_DH_DERIVE 0x00000031 #define CKM_X9_42_DH_HYBRID_DERIVE 0x00000032 #define CKM_X9_42_MQV_DERIVE 0x00000033 /* CKM_SHA256/384/512 are new for v2.20 */ #define CKM_SHA256_RSA_PKCS 0x00000040 #define CKM_SHA384_RSA_PKCS 0x00000041 #define CKM_SHA512_RSA_PKCS 0x00000042 #define CKM_SHA256_RSA_PKCS_PSS 0x00000043 #define CKM_SHA384_RSA_PKCS_PSS 0x00000044 #define CKM_SHA512_RSA_PKCS_PSS 0x00000045 /* CKM_SHA224 new for v2.20 amendment 3 */ #define CKM_SHA224_RSA_PKCS 0x00000046 #define CKM_SHA224_RSA_PKCS_PSS 0x00000047 #define CKM_RC2_KEY_GEN 0x00000100 #define CKM_RC2_ECB 0x00000101 #define CKM_RC2_CBC 0x00000102 #define CKM_RC2_MAC 0x00000103 /* CKM_RC2_MAC_GENERAL and CKM_RC2_CBC_PAD are new for v2.0 */ #define CKM_RC2_MAC_GENERAL 0x00000104 #define CKM_RC2_CBC_PAD 0x00000105 #define CKM_RC4_KEY_GEN 0x00000110 #define CKM_RC4 0x00000111 #define CKM_DES_KEY_GEN 0x00000120 #define CKM_DES_ECB 0x00000121 #define CKM_DES_CBC 0x00000122 #define CKM_DES_MAC 0x00000123 /* CKM_DES_MAC_GENERAL and CKM_DES_CBC_PAD are new for v2.0 */ #define CKM_DES_MAC_GENERAL 0x00000124 #define CKM_DES_CBC_PAD 0x00000125 #define CKM_DES2_KEY_GEN 0x00000130 #define CKM_DES3_KEY_GEN 0x00000131 #define CKM_DES3_ECB 0x00000132 #define CKM_DES3_CBC 0x00000133 #define CKM_DES3_MAC 0x00000134 /* CKM_DES3_MAC_GENERAL, CKM_DES3_CBC_PAD, CKM_CDMF_KEY_GEN, * CKM_CDMF_ECB, CKM_CDMF_CBC, CKM_CDMF_MAC, * CKM_CDMF_MAC_GENERAL, and CKM_CDMF_CBC_PAD are new for v2.0 */ #define CKM_DES3_MAC_GENERAL 0x00000135 #define CKM_DES3_CBC_PAD 0x00000136 #define CKM_CDMF_KEY_GEN 0x00000140 #define CKM_CDMF_ECB 0x00000141 #define CKM_CDMF_CBC 0x00000142 #define CKM_CDMF_MAC 0x00000143 #define CKM_CDMF_MAC_GENERAL 0x00000144 #define CKM_CDMF_CBC_PAD 0x00000145 /* the following four DES mechanisms are new for v2.20 */ #define CKM_DES_OFB64 0x00000150 #define CKM_DES_OFB8 0x00000151 #define CKM_DES_CFB64 0x00000152 #define CKM_DES_CFB8 0x00000153 #define CKM_MD2 0x00000200 /* CKM_MD2_HMAC and CKM_MD2_HMAC_GENERAL are new for v2.0 */ #define CKM_MD2_HMAC 0x00000201 #define CKM_MD2_HMAC_GENERAL 0x00000202 #define CKM_MD5 0x00000210 /* CKM_MD5_HMAC and CKM_MD5_HMAC_GENERAL are new for v2.0 */ #define CKM_MD5_HMAC 0x00000211 #define CKM_MD5_HMAC_GENERAL 0x00000212 #define CKM_SHA_1 0x00000220 /* CKM_SHA_1_HMAC and CKM_SHA_1_HMAC_GENERAL are new for v2.0 */ #define CKM_SHA_1_HMAC 0x00000221 #define CKM_SHA_1_HMAC_GENERAL 0x00000222 /* CKM_RIPEMD128, CKM_RIPEMD128_HMAC, * CKM_RIPEMD128_HMAC_GENERAL, CKM_RIPEMD160, CKM_RIPEMD160_HMAC, * and CKM_RIPEMD160_HMAC_GENERAL are new for v2.10 */ #define CKM_RIPEMD128 0x00000230 #define CKM_RIPEMD128_HMAC 0x00000231 #define CKM_RIPEMD128_HMAC_GENERAL 0x00000232 #define CKM_RIPEMD160 0x00000240 #define CKM_RIPEMD160_HMAC 0x00000241 #define CKM_RIPEMD160_HMAC_GENERAL 0x00000242 /* CKM_SHA256/384/512 are new for v2.20 */ #define CKM_SHA256 0x00000250 #define CKM_SHA256_HMAC 0x00000251 #define CKM_SHA256_HMAC_GENERAL 0x00000252 #define CKM_SHA384 0x00000260 #define CKM_SHA384_HMAC 0x00000261 #define CKM_SHA384_HMAC_GENERAL 0x00000262 #define CKM_SHA512 0x00000270 #define CKM_SHA512_HMAC 0x00000271 #define CKM_SHA512_HMAC_GENERAL 0x00000272 /* CKM_SHA224 new for v2.20 amendment 3 */ #define CKM_SHA224 0x00000255 #define CKM_SHA224_HMAC 0x00000256 #define CKM_SHA224_HMAC_GENERAL 0x00000257 /* All of the following mechanisms are new for v2.0 */ /* Note that CAST128 and CAST5 are the same algorithm */ #define CKM_CAST_KEY_GEN 0x00000300 #define CKM_CAST_ECB 0x00000301 #define CKM_CAST_CBC 0x00000302 #define CKM_CAST_MAC 0x00000303 #define CKM_CAST_MAC_GENERAL 0x00000304 #define CKM_CAST_CBC_PAD 0x00000305 #define CKM_CAST3_KEY_GEN 0x00000310 #define CKM_CAST3_ECB 0x00000311 #define CKM_CAST3_CBC 0x00000312 #define CKM_CAST3_MAC 0x00000313 #define CKM_CAST3_MAC_GENERAL 0x00000314 #define CKM_CAST3_CBC_PAD 0x00000315 #define CKM_CAST5_KEY_GEN 0x00000320 #define CKM_CAST128_KEY_GEN 0x00000320 #define CKM_CAST5_ECB 0x00000321 #define CKM_CAST128_ECB 0x00000321 #define CKM_CAST5_CBC 0x00000322 #define CKM_CAST128_CBC 0x00000322 #define CKM_CAST5_MAC 0x00000323 #define CKM_CAST128_MAC 0x00000323 #define CKM_CAST5_MAC_GENERAL 0x00000324 #define CKM_CAST128_MAC_GENERAL 0x00000324 #define CKM_CAST5_CBC_PAD 0x00000325 #define CKM_CAST128_CBC_PAD 0x00000325 #define CKM_RC5_KEY_GEN 0x00000330 #define CKM_RC5_ECB 0x00000331 #define CKM_RC5_CBC 0x00000332 #define CKM_RC5_MAC 0x00000333 #define CKM_RC5_MAC_GENERAL 0x00000334 #define CKM_RC5_CBC_PAD 0x00000335 #define CKM_IDEA_KEY_GEN 0x00000340 #define CKM_IDEA_ECB 0x00000341 #define CKM_IDEA_CBC 0x00000342 #define CKM_IDEA_MAC 0x00000343 #define CKM_IDEA_MAC_GENERAL 0x00000344 #define CKM_IDEA_CBC_PAD 0x00000345 #define CKM_GENERIC_SECRET_KEY_GEN 0x00000350 #define CKM_CONCATENATE_BASE_AND_KEY 0x00000360 #define CKM_CONCATENATE_BASE_AND_DATA 0x00000362 #define CKM_CONCATENATE_DATA_AND_BASE 0x00000363 #define CKM_XOR_BASE_AND_DATA 0x00000364 #define CKM_EXTRACT_KEY_FROM_KEY 0x00000365 #define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370 #define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371 #define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372 /* CKM_SSL3_MASTER_KEY_DERIVE_DH, CKM_TLS_PRE_MASTER_KEY_GEN, * CKM_TLS_MASTER_KEY_DERIVE, CKM_TLS_KEY_AND_MAC_DERIVE, and * CKM_TLS_MASTER_KEY_DERIVE_DH are new for v2.11 */ #define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373 #define CKM_TLS_PRE_MASTER_KEY_GEN 0x00000374 #define CKM_TLS_MASTER_KEY_DERIVE 0x00000375 #define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376 #define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377 /* CKM_TLS_PRF is new for v2.20 */ #define CKM_TLS_PRF 0x00000378 #define CKM_SSL3_MD5_MAC 0x00000380 #define CKM_SSL3_SHA1_MAC 0x00000381 #define CKM_MD5_KEY_DERIVATION 0x00000390 #define CKM_MD2_KEY_DERIVATION 0x00000391 #define CKM_SHA1_KEY_DERIVATION 0x00000392 /* CKM_SHA256/384/512 are new for v2.20 */ #define CKM_SHA256_KEY_DERIVATION 0x00000393 #define CKM_SHA384_KEY_DERIVATION 0x00000394 #define CKM_SHA512_KEY_DERIVATION 0x00000395 /* CKM_SHA224 new for v2.20 amendment 3 */ #define CKM_SHA224_KEY_DERIVATION 0x00000396 #define CKM_PBE_MD2_DES_CBC 0x000003A0 #define CKM_PBE_MD5_DES_CBC 0x000003A1 #define CKM_PBE_MD5_CAST_CBC 0x000003A2 #define CKM_PBE_MD5_CAST3_CBC 0x000003A3 #define CKM_PBE_MD5_CAST5_CBC 0x000003A4 #define CKM_PBE_MD5_CAST128_CBC 0x000003A4 #define CKM_PBE_SHA1_CAST5_CBC 0x000003A5 #define CKM_PBE_SHA1_CAST128_CBC 0x000003A5 #define CKM_PBE_SHA1_RC4_128 0x000003A6 #define CKM_PBE_SHA1_RC4_40 0x000003A7 #define CKM_PBE_SHA1_DES3_EDE_CBC 0x000003A8 #define CKM_PBE_SHA1_DES2_EDE_CBC 0x000003A9 #define CKM_PBE_SHA1_RC2_128_CBC 0x000003AA #define CKM_PBE_SHA1_RC2_40_CBC 0x000003AB /* CKM_PKCS5_PBKD2 is new for v2.10 */ #define CKM_PKCS5_PBKD2 0x000003B0 #define CKM_PBA_SHA1_WITH_SHA1_HMAC 0x000003C0 /* WTLS mechanisms are new for v2.20 */ #define CKM_WTLS_PRE_MASTER_KEY_GEN 0x000003D0 #define CKM_WTLS_MASTER_KEY_DERIVE 0x000003D1 #define CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC 0x000003D2 #define CKM_WTLS_PRF 0x000003D3 #define CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE 0x000003D4 #define CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE 0x000003D5 /* TLS 1.2 mechanisms are new for v2.40 */ #define CKM_TLS12_MASTER_KEY_DERIVE 0x000003E0 #define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1 #define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2 #define CKM_TLS12_KEY_SAFE_DERIVE 0x000003E3 #define CKM_TLS12_MAC 0x000003E4 #define CKM_TLS_MAC 0x000003E4 #define CKM_TLS_KDF 0x000003E5 #define CKM_KEY_WRAP_LYNKS 0x00000400 #define CKM_KEY_WRAP_SET_OAEP 0x00000401 /* CKM_CMS_SIG is new for v2.20 */ #define CKM_CMS_SIG 0x00000500 /* Fortezza mechanisms */ #define CKM_SKIPJACK_KEY_GEN 0x00001000 #define CKM_SKIPJACK_ECB64 0x00001001 #define CKM_SKIPJACK_CBC64 0x00001002 #define CKM_SKIPJACK_OFB64 0x00001003 #define CKM_SKIPJACK_CFB64 0x00001004 #define CKM_SKIPJACK_CFB32 0x00001005 #define CKM_SKIPJACK_CFB16 0x00001006 #define CKM_SKIPJACK_CFB8 0x00001007 #define CKM_SKIPJACK_WRAP 0x00001008 #define CKM_SKIPJACK_PRIVATE_WRAP 0x00001009 #define CKM_SKIPJACK_RELAYX 0x0000100a #define CKM_KEA_KEY_PAIR_GEN 0x00001010 #define CKM_KEA_KEY_DERIVE 0x00001011 #define CKM_FORTEZZA_TIMESTAMP 0x00001020 #define CKM_BATON_KEY_GEN 0x00001030 #define CKM_BATON_ECB128 0x00001031 #define CKM_BATON_ECB96 0x00001032 #define CKM_BATON_CBC128 0x00001033 #define CKM_BATON_COUNTER 0x00001034 #define CKM_BATON_SHUFFLE 0x00001035 #define CKM_BATON_WRAP 0x00001036 /* CKM_ECDSA_KEY_PAIR_GEN is deprecated in v2.11, * CKM_EC_KEY_PAIR_GEN is preferred */ #define CKM_ECDSA_KEY_PAIR_GEN 0x00001040 #define CKM_EC_KEY_PAIR_GEN 0x00001040 #define CKM_ECDSA 0x00001041 #define CKM_ECDSA_SHA1 0x00001042 /* CKM_ECDH1_DERIVE, CKM_ECDH1_COFACTOR_DERIVE, and CKM_ECMQV_DERIVE * are new for v2.11 */ #define CKM_ECDH1_DERIVE 0x00001050 #define CKM_ECDH1_COFACTOR_DERIVE 0x00001051 #define CKM_ECMQV_DERIVE 0x00001052 #define CKM_JUNIPER_KEY_GEN 0x00001060 #define CKM_JUNIPER_ECB128 0x00001061 #define CKM_JUNIPER_CBC128 0x00001062 #define CKM_JUNIPER_COUNTER 0x00001063 #define CKM_JUNIPER_SHUFFLE 0x00001064 #define CKM_JUNIPER_WRAP 0x00001065 #define CKM_FASTHASH 0x00001070 /* CKM_AES_KEY_GEN, CKM_AES_ECB, CKM_AES_CBC, CKM_AES_MAC, * CKM_AES_MAC_GENERAL, CKM_AES_CBC_PAD, CKM_DSA_PARAMETER_GEN, * CKM_DH_PKCS_PARAMETER_GEN, and CKM_X9_42_DH_PARAMETER_GEN are * new for v2.11 */ #define CKM_AES_KEY_GEN 0x00001080 #define CKM_AES_ECB 0x00001081 #define CKM_AES_CBC 0x00001082 #define CKM_AES_MAC 0x00001083 #define CKM_AES_MAC_GENERAL 0x00001084 #define CKM_AES_CBC_PAD 0x00001085 /* new for v2.20 amendment 3 */ #define CKM_AES_CTR 0x00001086 /* new for v2.30 */ #define CKM_AES_GCM 0x00001087 #define CKM_AES_CCM 0x00001088 #define CKM_AES_CTS 0x00001089 /* AES-CMAC values copied from v2.40 errata 1 header file */ #define CKM_AES_CMAC 0x0000108A #define CKM_AES_CMAC_GENERAL 0x0000108B #define CKM_AES_XCBC_MAC 0x0000108C #define CKM_AES_XCBC_MAC_96 0x0000108D /* BlowFish and TwoFish are new for v2.20 */ #define CKM_BLOWFISH_KEY_GEN 0x00001090 #define CKM_BLOWFISH_CBC 0x00001091 #define CKM_TWOFISH_KEY_GEN 0x00001092 #define CKM_TWOFISH_CBC 0x00001093 /* Camellia is proposed for v2.20 Amendment 3 */ #define CKM_CAMELLIA_KEY_GEN 0x00000550 #define CKM_CAMELLIA_ECB 0x00000551 #define CKM_CAMELLIA_CBC 0x00000552 #define CKM_CAMELLIA_MAC 0x00000553 #define CKM_CAMELLIA_MAC_GENERAL 0x00000554 #define CKM_CAMELLIA_CBC_PAD 0x00000555 #define CKM_CAMELLIA_ECB_ENCRYPT_DATA 0x00000556 #define CKM_CAMELLIA_CBC_ENCRYPT_DATA 0x00000557 #define CKM_SEED_KEY_GEN 0x00000650 #define CKM_SEED_ECB 0x00000651 #define CKM_SEED_CBC 0x00000652 #define CKM_SEED_MAC 0x00000653 #define CKM_SEED_MAC_GENERAL 0x00000654 #define CKM_SEED_CBC_PAD 0x00000655 #define CKM_SEED_ECB_ENCRYPT_DATA 0x00000656 #define CKM_SEED_CBC_ENCRYPT_DATA 0x00000657 /* CKM_xxx_ENCRYPT_DATA mechanisms are new for v2.20 */ #define CKM_DES_ECB_ENCRYPT_DATA 0x00001100 #define CKM_DES_CBC_ENCRYPT_DATA 0x00001101 #define CKM_DES3_ECB_ENCRYPT_DATA 0x00001102 #define CKM_DES3_CBC_ENCRYPT_DATA 0x00001103 #define CKM_AES_ECB_ENCRYPT_DATA 0x00001104 #define CKM_AES_CBC_ENCRYPT_DATA 0x00001105 #define CKM_DSA_PARAMETER_GEN 0x00002000 #define CKM_DH_PKCS_PARAMETER_GEN 0x00002001 #define CKM_X9_42_DH_PARAMETER_GEN 0x00002002 /* CKM_SP800_108_xxx_KDF are new for v3.0 */ #define CKM_SP800_108_COUNTER_KDF 0x000003acUL #define CKM_SP800_108_FEEDBACK_KDF 0x000003adUL #define CKM_SP800_108_DOUBLE_PIPELINE_KDF 0x000003aeUL #define CKM_VENDOR_DEFINED 0x80000000 typedef CK_MECHANISM_TYPE CK_PTR CK_MECHANISM_TYPE_PTR; /* CK_MECHANISM is a structure that specifies a particular * mechanism */ typedef struct CK_MECHANISM { CK_MECHANISM_TYPE mechanism; CK_VOID_PTR pParameter; /* ulParameterLen was changed from CK_USHORT to CK_ULONG for * v2.0 */ CK_ULONG ulParameterLen; /* in bytes */ } CK_MECHANISM; typedef CK_MECHANISM CK_PTR CK_MECHANISM_PTR; /* CK_MECHANISM_INFO provides information about a particular * mechanism */ typedef struct CK_MECHANISM_INFO { CK_ULONG ulMinKeySize; CK_ULONG ulMaxKeySize; CK_FLAGS flags; } CK_MECHANISM_INFO; /* The flags are defined as follows: * Bit Flag Mask Meaning */ #define CKF_HW 0x00000001 /* performed by HW */ /* The flags CKF_ENCRYPT, CKF_DECRYPT, CKF_DIGEST, CKF_SIGN, * CKG_SIGN_RECOVER, CKF_VERIFY, CKF_VERIFY_RECOVER, * CKF_GENERATE, CKF_GENERATE_KEY_PAIR, CKF_WRAP, CKF_UNWRAP, * and CKF_DERIVE are new for v2.0. They specify whether or not * a mechanism can be used for a particular task */ #define CKF_ENCRYPT 0x00000100 #define CKF_DECRYPT 0x00000200 #define CKF_DIGEST 0x00000400 #define CKF_SIGN 0x00000800 #define CKF_SIGN_RECOVER 0x00001000 #define CKF_VERIFY 0x00002000 #define CKF_VERIFY_RECOVER 0x00004000 #define CKF_GENERATE 0x00008000 #define CKF_GENERATE_KEY_PAIR 0x00010000 #define CKF_WRAP 0x00020000 #define CKF_UNWRAP 0x00040000 #define CKF_DERIVE 0x00080000 /* CKF_EC_F_P, CKF_EC_F_2M, CKF_EC_ECPARAMETERS, CKF_EC_NAMEDCURVE, * CKF_EC_UNCOMPRESS, and CKF_EC_COMPRESS are new for v2.11. They * describe a token's EC capabilities not available in mechanism * information. */ #define CKF_EC_F_P 0x00100000 #define CKF_EC_F_2M 0x00200000 #define CKF_EC_ECPARAMETERS 0x00400000 #define CKF_EC_NAMEDCURVE 0x00800000 #define CKF_EC_UNCOMPRESS 0x01000000 #define CKF_EC_COMPRESS 0x02000000 #define CKF_EXTENSION 0x80000000 /* FALSE for this version */ typedef CK_MECHANISM_INFO CK_PTR CK_MECHANISM_INFO_PTR; /* CK_RV is a value that identifies the return value of a * PKCS #11 function */ /* CK_RV was changed from CK_USHORT to CK_ULONG for v2.0 */ typedef CK_ULONG CK_RV; #define CKR_OK 0x00000000 #define CKR_CANCEL 0x00000001 #define CKR_HOST_MEMORY 0x00000002 #define CKR_SLOT_ID_INVALID 0x00000003 /* CKR_FLAGS_INVALID was removed for v2.0 */ /* CKR_GENERAL_ERROR and CKR_FUNCTION_FAILED are new for v2.0 */ #define CKR_GENERAL_ERROR 0x00000005 #define CKR_FUNCTION_FAILED 0x00000006 /* CKR_ARGUMENTS_BAD, CKR_NO_EVENT, CKR_NEED_TO_CREATE_THREADS, * and CKR_CANT_LOCK are new for v2.01 */ #define CKR_ARGUMENTS_BAD 0x00000007 #define CKR_NO_EVENT 0x00000008 #define CKR_NEED_TO_CREATE_THREADS 0x00000009 #define CKR_CANT_LOCK 0x0000000A #define CKR_ATTRIBUTE_READ_ONLY 0x00000010 #define CKR_ATTRIBUTE_SENSITIVE 0x00000011 #define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012 #define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013 #define CKR_DATA_INVALID 0x00000020 #define CKR_DATA_LEN_RANGE 0x00000021 #define CKR_DEVICE_ERROR 0x00000030 #define CKR_DEVICE_MEMORY 0x00000031 #define CKR_DEVICE_REMOVED 0x00000032 #define CKR_ENCRYPTED_DATA_INVALID 0x00000040 #define CKR_ENCRYPTED_DATA_LEN_RANGE 0x00000041 #define CKR_FUNCTION_CANCELED 0x00000050 #define CKR_FUNCTION_NOT_PARALLEL 0x00000051 /* CKR_FUNCTION_NOT_SUPPORTED is new for v2.0 */ #define CKR_FUNCTION_NOT_SUPPORTED 0x00000054 #define CKR_KEY_HANDLE_INVALID 0x00000060 /* CKR_KEY_SENSITIVE was removed for v2.0 */ #define CKR_KEY_SIZE_RANGE 0x00000062 #define CKR_KEY_TYPE_INCONSISTENT 0x00000063 /* CKR_KEY_NOT_NEEDED, CKR_KEY_CHANGED, CKR_KEY_NEEDED, * CKR_KEY_INDIGESTIBLE, CKR_KEY_FUNCTION_NOT_PERMITTED, * CKR_KEY_NOT_WRAPPABLE, and CKR_KEY_UNEXTRACTABLE are new for * v2.0 */ #define CKR_KEY_NOT_NEEDED 0x00000064 #define CKR_KEY_CHANGED 0x00000065 #define CKR_KEY_NEEDED 0x00000066 #define CKR_KEY_INDIGESTIBLE 0x00000067 #define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068 #define CKR_KEY_NOT_WRAPPABLE 0x00000069 #define CKR_KEY_UNEXTRACTABLE 0x0000006A #define CKR_MECHANISM_INVALID 0x00000070 #define CKR_MECHANISM_PARAM_INVALID 0x00000071 /* CKR_OBJECT_CLASS_INCONSISTENT and CKR_OBJECT_CLASS_INVALID * were removed for v2.0 */ #define CKR_OBJECT_HANDLE_INVALID 0x00000082 #define CKR_OPERATION_ACTIVE 0x00000090 #define CKR_OPERATION_NOT_INITIALIZED 0x00000091 #define CKR_PIN_INCORRECT 0x000000A0 #define CKR_PIN_INVALID 0x000000A1 #define CKR_PIN_LEN_RANGE 0x000000A2 /* CKR_PIN_EXPIRED and CKR_PIN_LOCKED are new for v2.0 */ #define CKR_PIN_EXPIRED 0x000000A3 #define CKR_PIN_LOCKED 0x000000A4 #define CKR_SESSION_CLOSED 0x000000B0 #define CKR_SESSION_COUNT 0x000000B1 #define CKR_SESSION_HANDLE_INVALID 0x000000B3 #define CKR_SESSION_PARALLEL_NOT_SUPPORTED 0x000000B4 #define CKR_SESSION_READ_ONLY 0x000000B5 #define CKR_SESSION_EXISTS 0x000000B6 /* CKR_SESSION_READ_ONLY_EXISTS and * CKR_SESSION_READ_WRITE_SO_EXISTS are new for v2.0 */ #define CKR_SESSION_READ_ONLY_EXISTS 0x000000B7 #define CKR_SESSION_READ_WRITE_SO_EXISTS 0x000000B8 #define CKR_SIGNATURE_INVALID 0x000000C0 #define CKR_SIGNATURE_LEN_RANGE 0x000000C1 #define CKR_TEMPLATE_INCOMPLETE 0x000000D0 #define CKR_TEMPLATE_INCONSISTENT 0x000000D1 #define CKR_TOKEN_NOT_PRESENT 0x000000E0 #define CKR_TOKEN_NOT_RECOGNIZED 0x000000E1 #define CKR_TOKEN_WRITE_PROTECTED 0x000000E2 #define CKR_UNWRAPPING_KEY_HANDLE_INVALID 0x000000F0 #define CKR_UNWRAPPING_KEY_SIZE_RANGE 0x000000F1 #define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT 0x000000F2 #define CKR_USER_ALREADY_LOGGED_IN 0x00000100 #define CKR_USER_NOT_LOGGED_IN 0x00000101 #define CKR_USER_PIN_NOT_INITIALIZED 0x00000102 #define CKR_USER_TYPE_INVALID 0x00000103 /* CKR_USER_ANOTHER_ALREADY_LOGGED_IN and CKR_USER_TOO_MANY_TYPES * are new to v2.01 */ #define CKR_USER_ANOTHER_ALREADY_LOGGED_IN 0x00000104 #define CKR_USER_TOO_MANY_TYPES 0x00000105 #define CKR_WRAPPED_KEY_INVALID 0x00000110 #define CKR_WRAPPED_KEY_LEN_RANGE 0x00000112 #define CKR_WRAPPING_KEY_HANDLE_INVALID 0x00000113 #define CKR_WRAPPING_KEY_SIZE_RANGE 0x00000114 #define CKR_WRAPPING_KEY_TYPE_INCONSISTENT 0x00000115 #define CKR_RANDOM_SEED_NOT_SUPPORTED 0x00000120 /* These are new to v2.0 */ #define CKR_RANDOM_NO_RNG 0x00000121 /* These are new to v2.11 */ #define CKR_DOMAIN_PARAMS_INVALID 0x00000130 /* These are new to v2.0 */ #define CKR_BUFFER_TOO_SMALL 0x00000150 #define CKR_SAVED_STATE_INVALID 0x00000160 #define CKR_INFORMATION_SENSITIVE 0x00000170 #define CKR_STATE_UNSAVEABLE 0x00000180 /* These are new to v2.01 */ #define CKR_CRYPTOKI_NOT_INITIALIZED 0x00000190 #define CKR_CRYPTOKI_ALREADY_INITIALIZED 0x00000191 #define CKR_MUTEX_BAD 0x000001A0 #define CKR_MUTEX_NOT_LOCKED 0x000001A1 /* This is new to v2.20 */ #define CKR_FUNCTION_REJECTED 0x00000200 #define CKR_VENDOR_DEFINED 0x80000000 /* CK_NOTIFY is an application callback that processes events */ typedef CK_CALLBACK_FUNCTION(CK_RV, CK_NOTIFY)( CK_SESSION_HANDLE hSession, /* the session's handle */ CK_NOTIFICATION event, CK_VOID_PTR pApplication /* passed to C_OpenSession */ ); /* CK_FUNCTION_LIST is a structure holding a PKCS #11 spec * version and pointers of appropriate types to all the * PKCS #11 functions */ /* CK_FUNCTION_LIST is new for v2.0 */ typedef struct CK_FUNCTION_LIST CK_FUNCTION_LIST; typedef CK_FUNCTION_LIST CK_PTR CK_FUNCTION_LIST_PTR; typedef CK_FUNCTION_LIST_PTR CK_PTR CK_FUNCTION_LIST_PTR_PTR; /* CK_CREATEMUTEX is an application callback for creating a * mutex object */ typedef CK_CALLBACK_FUNCTION(CK_RV, CK_CREATEMUTEX)( CK_VOID_PTR_PTR ppMutex /* location to receive ptr to mutex */ ); /* CK_DESTROYMUTEX is an application callback for destroying a * mutex object */ typedef CK_CALLBACK_FUNCTION(CK_RV, CK_DESTROYMUTEX)( CK_VOID_PTR pMutex /* pointer to mutex */ ); /* CK_LOCKMUTEX is an application callback for locking a mutex */ typedef CK_CALLBACK_FUNCTION(CK_RV, CK_LOCKMUTEX)( CK_VOID_PTR pMutex /* pointer to mutex */ ); /* CK_UNLOCKMUTEX is an application callback for unlocking a * mutex */ typedef CK_CALLBACK_FUNCTION(CK_RV, CK_UNLOCKMUTEX)( CK_VOID_PTR pMutex /* pointer to mutex */ ); /* CK_C_INITIALIZE_ARGS provides the optional arguments to * C_Initialize */ typedef struct CK_C_INITIALIZE_ARGS { CK_CREATEMUTEX CreateMutex; CK_DESTROYMUTEX DestroyMutex; CK_LOCKMUTEX LockMutex; CK_UNLOCKMUTEX UnlockMutex; CK_FLAGS flags; /* The official PKCS #11 spec does not have a 'LibraryParameters' field, but * a reserved field. NSS needs a way to pass instance-specific information * to the library (like where to find its config files, etc). This * information is usually provided by the installer and passed uninterpreted * by NSS to the library, though NSS does know the specifics of the softoken * version of this parameter. Most compliant PKCS#11 modules expect this * parameter to be NULL, and will return CKR_ARGUMENTS_BAD from * C_Initialize if Library parameters is supplied. */ CK_CHAR_PTR *LibraryParameters; /* This field is only present if the LibraryParameters is not NULL. It must * be NULL in all cases */ CK_VOID_PTR pReserved; } CK_C_INITIALIZE_ARGS; /* flags: bit flags that provide capabilities of the slot * Bit Flag Mask Meaning */ #define CKF_LIBRARY_CANT_CREATE_OS_THREADS 0x00000001 #define CKF_OS_LOCKING_OK 0x00000002 typedef CK_C_INITIALIZE_ARGS CK_PTR CK_C_INITIALIZE_ARGS_PTR; /* additional flags for parameters to functions */ /* CKF_DONT_BLOCK is for the function C_WaitForSlotEvent */ #define CKF_DONT_BLOCK 1 /* CK_RSA_PKCS_OAEP_MGF_TYPE is new for v2.10. * CK_RSA_PKCS_OAEP_MGF_TYPE is used to indicate the Message * Generation Function (MGF) applied to a message block when * formatting a message block for the PKCS #1 OAEP encryption * scheme. */ typedef CK_ULONG CK_RSA_PKCS_MGF_TYPE; typedef CK_RSA_PKCS_MGF_TYPE CK_PTR CK_RSA_PKCS_MGF_TYPE_PTR; /* The following MGFs are defined */ /* CKG_MGF1_SHA256, CKG_MGF1_SHA384, and CKG_MGF1_SHA512 * are new for v2.20 */ #define CKG_MGF1_SHA1 0x00000001 #define CKG_MGF1_SHA256 0x00000002 #define CKG_MGF1_SHA384 0x00000003 #define CKG_MGF1_SHA512 0x00000004 /* v2.20 amendment 3 */ #define CKG_MGF1_SHA224 0x00000005 /* CK_RSA_PKCS_OAEP_SOURCE_TYPE is new for v2.10. * CK_RSA_PKCS_OAEP_SOURCE_TYPE is used to indicate the source * of the encoding parameter when formatting a message block * for the PKCS #1 OAEP encryption scheme. */ typedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE; typedef CK_RSA_PKCS_OAEP_SOURCE_TYPE CK_PTR CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR; /* The following encoding parameter sources are defined */ #define CKZ_DATA_SPECIFIED 0x00000001 /* CK_RSA_PKCS_OAEP_PARAMS is new for v2.10. * CK_RSA_PKCS_OAEP_PARAMS provides the parameters to the * CKM_RSA_PKCS_OAEP mechanism. */ typedef struct CK_RSA_PKCS_OAEP_PARAMS { CK_MECHANISM_TYPE hashAlg; CK_RSA_PKCS_MGF_TYPE mgf; CK_RSA_PKCS_OAEP_SOURCE_TYPE source; CK_VOID_PTR pSourceData; CK_ULONG ulSourceDataLen; } CK_RSA_PKCS_OAEP_PARAMS; typedef CK_RSA_PKCS_OAEP_PARAMS CK_PTR CK_RSA_PKCS_OAEP_PARAMS_PTR; /* CK_RSA_PKCS_PSS_PARAMS is new for v2.11. * CK_RSA_PKCS_PSS_PARAMS provides the parameters to the * CKM_RSA_PKCS_PSS mechanism(s). */ typedef struct CK_RSA_PKCS_PSS_PARAMS { CK_MECHANISM_TYPE hashAlg; CK_RSA_PKCS_MGF_TYPE mgf; CK_ULONG sLen; } CK_RSA_PKCS_PSS_PARAMS; typedef CK_RSA_PKCS_PSS_PARAMS CK_PTR CK_RSA_PKCS_PSS_PARAMS_PTR; /* CK_EC_KDF_TYPE is new for v2.11. */ typedef CK_ULONG CK_EC_KDF_TYPE; /* The following EC Key Derivation Functions are defined */ #define CKD_NULL 0x00000001 #define CKD_SHA1_KDF 0x00000002 #define CKD_SHA224_KDF 0x00000005 #define CKD_SHA256_KDF 0x00000006 #define CKD_SHA384_KDF 0x00000007 #define CKD_SHA512_KDF 0x00000008 /* CK_ECDH1_DERIVE_PARAMS is new for v2.11. * CK_ECDH1_DERIVE_PARAMS provides the parameters to the * CKM_ECDH1_DERIVE and CKM_ECDH1_COFACTOR_DERIVE mechanisms, * where each party contributes one key pair. */ typedef struct CK_ECDH1_DERIVE_PARAMS { CK_EC_KDF_TYPE kdf; CK_ULONG ulSharedDataLen; CK_BYTE_PTR pSharedData; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; } CK_ECDH1_DERIVE_PARAMS; typedef CK_ECDH1_DERIVE_PARAMS CK_PTR CK_ECDH1_DERIVE_PARAMS_PTR; /* CK_ECDH2_DERIVE_PARAMS is new for v2.11. * CK_ECDH2_DERIVE_PARAMS provides the parameters to the * CKM_ECMQV_DERIVE mechanism, where each party contributes two key pairs. */ typedef struct CK_ECDH2_DERIVE_PARAMS { CK_EC_KDF_TYPE kdf; CK_ULONG ulSharedDataLen; CK_BYTE_PTR pSharedData; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; CK_ULONG ulPrivateDataLen; CK_OBJECT_HANDLE hPrivateData; CK_ULONG ulPublicDataLen2; CK_BYTE_PTR pPublicData2; } CK_ECDH2_DERIVE_PARAMS; typedef CK_ECDH2_DERIVE_PARAMS CK_PTR CK_ECDH2_DERIVE_PARAMS_PTR; typedef struct CK_ECMQV_DERIVE_PARAMS { CK_EC_KDF_TYPE kdf; CK_ULONG ulSharedDataLen; CK_BYTE_PTR pSharedData; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; CK_ULONG ulPrivateDataLen; CK_OBJECT_HANDLE hPrivateData; CK_ULONG ulPublicDataLen2; CK_BYTE_PTR pPublicData2; CK_OBJECT_HANDLE publicKey; } CK_ECMQV_DERIVE_PARAMS; typedef CK_ECMQV_DERIVE_PARAMS CK_PTR CK_ECMQV_DERIVE_PARAMS_PTR; /* Typedefs and defines for the CKM_X9_42_DH_KEY_PAIR_GEN and the * CKM_X9_42_DH_PARAMETER_GEN mechanisms (new for PKCS #11 v2.11) */ typedef CK_ULONG CK_X9_42_DH_KDF_TYPE; typedef CK_X9_42_DH_KDF_TYPE CK_PTR CK_X9_42_DH_KDF_TYPE_PTR; /* The following X9.42 DH key derivation functions are defined (besides CKD_NULL already defined : */ #define CKD_SHA1_KDF_ASN1 0x00000003 #define CKD_SHA1_KDF_CONCATENATE 0x00000004 /* CK_X9_42_DH1_DERIVE_PARAMS is new for v2.11. * CK_X9_42_DH1_DERIVE_PARAMS provides the parameters to the * CKM_X9_42_DH_DERIVE key derivation mechanism, where each party * contributes one key pair */ typedef struct CK_X9_42_DH1_DERIVE_PARAMS { CK_X9_42_DH_KDF_TYPE kdf; CK_ULONG ulOtherInfoLen; CK_BYTE_PTR pOtherInfo; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; } CK_X9_42_DH1_DERIVE_PARAMS; typedef struct CK_X9_42_DH1_DERIVE_PARAMS CK_PTR CK_X9_42_DH1_DERIVE_PARAMS_PTR; /* CK_X9_42_DH2_DERIVE_PARAMS is new for v2.11. * CK_X9_42_DH2_DERIVE_PARAMS provides the parameters to the * CKM_X9_42_DH_HYBRID_DERIVE and CKM_X9_42_MQV_DERIVE key derivation * mechanisms, where each party contributes two key pairs */ typedef struct CK_X9_42_DH2_DERIVE_PARAMS { CK_X9_42_DH_KDF_TYPE kdf; CK_ULONG ulOtherInfoLen; CK_BYTE_PTR pOtherInfo; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; CK_ULONG ulPrivateDataLen; CK_OBJECT_HANDLE hPrivateData; CK_ULONG ulPublicDataLen2; CK_BYTE_PTR pPublicData2; } CK_X9_42_DH2_DERIVE_PARAMS; typedef CK_X9_42_DH2_DERIVE_PARAMS CK_PTR CK_X9_42_DH2_DERIVE_PARAMS_PTR; typedef struct CK_X9_42_MQV_DERIVE_PARAMS { CK_X9_42_DH_KDF_TYPE kdf; CK_ULONG ulOtherInfoLen; CK_BYTE_PTR pOtherInfo; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; CK_ULONG ulPrivateDataLen; CK_OBJECT_HANDLE hPrivateData; CK_ULONG ulPublicDataLen2; CK_BYTE_PTR pPublicData2; CK_OBJECT_HANDLE publicKey; } CK_X9_42_MQV_DERIVE_PARAMS; typedef CK_X9_42_MQV_DERIVE_PARAMS CK_PTR CK_X9_42_MQV_DERIVE_PARAMS_PTR; /* CK_KEA_DERIVE_PARAMS provides the parameters to the * CKM_KEA_DERIVE mechanism */ /* CK_KEA_DERIVE_PARAMS is new for v2.0 */ typedef struct CK_KEA_DERIVE_PARAMS { CK_BBOOL isSender; CK_ULONG ulRandomLen; CK_BYTE_PTR pRandomA; CK_BYTE_PTR pRandomB; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; } CK_KEA_DERIVE_PARAMS; typedef CK_KEA_DERIVE_PARAMS CK_PTR CK_KEA_DERIVE_PARAMS_PTR; /* CK_RC2_PARAMS provides the parameters to the CKM_RC2_ECB and * CKM_RC2_MAC mechanisms. An instance of CK_RC2_PARAMS just * holds the effective keysize */ typedef CK_ULONG CK_RC2_PARAMS; typedef CK_RC2_PARAMS CK_PTR CK_RC2_PARAMS_PTR; /* CK_RC2_CBC_PARAMS provides the parameters to the CKM_RC2_CBC * mechanism */ typedef struct CK_RC2_CBC_PARAMS { /* ulEffectiveBits was changed from CK_USHORT to CK_ULONG for * v2.0 */ CK_ULONG ulEffectiveBits; /* effective bits (1-1024) */ CK_BYTE iv[8]; /* IV for CBC mode */ } CK_RC2_CBC_PARAMS; typedef CK_RC2_CBC_PARAMS CK_PTR CK_RC2_CBC_PARAMS_PTR; /* CK_RC2_MAC_GENERAL_PARAMS provides the parameters for the * CKM_RC2_MAC_GENERAL mechanism */ /* CK_RC2_MAC_GENERAL_PARAMS is new for v2.0 */ typedef struct CK_RC2_MAC_GENERAL_PARAMS { CK_ULONG ulEffectiveBits; /* effective bits (1-1024) */ CK_ULONG ulMacLength; /* Length of MAC in bytes */ } CK_RC2_MAC_GENERAL_PARAMS; typedef CK_RC2_MAC_GENERAL_PARAMS CK_PTR CK_RC2_MAC_GENERAL_PARAMS_PTR; /* CK_RC5_PARAMS provides the parameters to the CKM_RC5_ECB and * CKM_RC5_MAC mechanisms */ /* CK_RC5_PARAMS is new for v2.0 */ typedef struct CK_RC5_PARAMS { CK_ULONG ulWordsize; /* wordsize in bits */ CK_ULONG ulRounds; /* number of rounds */ } CK_RC5_PARAMS; typedef CK_RC5_PARAMS CK_PTR CK_RC5_PARAMS_PTR; /* CK_RC5_CBC_PARAMS provides the parameters to the CKM_RC5_CBC * mechanism */ /* CK_RC5_CBC_PARAMS is new for v2.0 */ typedef struct CK_RC5_CBC_PARAMS { CK_ULONG ulWordsize; /* wordsize in bits */ CK_ULONG ulRounds; /* number of rounds */ CK_BYTE_PTR pIv; /* pointer to IV */ CK_ULONG ulIvLen; /* length of IV in bytes */ } CK_RC5_CBC_PARAMS; typedef CK_RC5_CBC_PARAMS CK_PTR CK_RC5_CBC_PARAMS_PTR; /* CK_RC5_MAC_GENERAL_PARAMS provides the parameters for the * CKM_RC5_MAC_GENERAL mechanism */ /* CK_RC5_MAC_GENERAL_PARAMS is new for v2.0 */ typedef struct CK_RC5_MAC_GENERAL_PARAMS { CK_ULONG ulWordsize; /* wordsize in bits */ CK_ULONG ulRounds; /* number of rounds */ CK_ULONG ulMacLength; /* Length of MAC in bytes */ } CK_RC5_MAC_GENERAL_PARAMS; typedef CK_RC5_MAC_GENERAL_PARAMS CK_PTR CK_RC5_MAC_GENERAL_PARAMS_PTR; /* CK_MAC_GENERAL_PARAMS provides the parameters to most block * ciphers' MAC_GENERAL mechanisms. Its value is the length of * the MAC */ /* CK_MAC_GENERAL_PARAMS is new for v2.0 */ typedef CK_ULONG CK_MAC_GENERAL_PARAMS; typedef CK_MAC_GENERAL_PARAMS CK_PTR CK_MAC_GENERAL_PARAMS_PTR; /* CK_DES/AES_ECB/CBC_ENCRYPT_DATA_PARAMS are new for v2.20 */ typedef struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { CK_BYTE iv[8]; CK_BYTE_PTR pData; CK_ULONG length; } CK_DES_CBC_ENCRYPT_DATA_PARAMS; typedef CK_DES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR; typedef struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { CK_BYTE iv[16]; CK_BYTE_PTR pData; CK_ULONG length; } CK_AES_CBC_ENCRYPT_DATA_PARAMS; typedef CK_AES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR; /* CK_AES_CTR_PARAMS is new for PKCS #11 v2.20 amendment 3 */ typedef struct CK_AES_CTR_PARAMS { CK_ULONG ulCounterBits; CK_BYTE cb[16]; } CK_AES_CTR_PARAMS; typedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR; /* CK_GCM_PARAMS is new for version 2.30 */ typedef struct CK_GCM_PARAMS { CK_BYTE_PTR pIv; CK_ULONG ulIvLen; CK_BYTE_PTR pAAD; CK_ULONG ulAADLen; CK_ULONG ulTagBits; } CK_GCM_PARAMS; typedef CK_GCM_PARAMS CK_PTR CK_GCM_PARAMS_PTR; /* CK_CCM_PARAMS is new for version 2.30 */ typedef struct CK_CCM_PARAMS { CK_ULONG ulDataLen; CK_BYTE_PTR pNonce; CK_ULONG ulNonceLen; CK_BYTE_PTR pAAD; CK_ULONG ulAADLen; CK_ULONG ulMACLen; } CK_CCM_PARAMS; typedef CK_CCM_PARAMS CK_PTR CK_CCM_PARAMS_PTR; /* CK_SKIPJACK_PRIVATE_WRAP_PARAMS provides the parameters to the * CKM_SKIPJACK_PRIVATE_WRAP mechanism */ /* CK_SKIPJACK_PRIVATE_WRAP_PARAMS is new for v2.0 */ typedef struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { CK_ULONG ulPasswordLen; CK_BYTE_PTR pPassword; CK_ULONG ulPublicDataLen; CK_BYTE_PTR pPublicData; CK_ULONG ulPAndGLen; CK_ULONG ulQLen; CK_ULONG ulRandomLen; CK_BYTE_PTR pRandomA; CK_BYTE_PTR pPrimeP; CK_BYTE_PTR pBaseG; CK_BYTE_PTR pSubprimeQ; } CK_SKIPJACK_PRIVATE_WRAP_PARAMS; typedef CK_SKIPJACK_PRIVATE_WRAP_PARAMS CK_PTR CK_SKIPJACK_PRIVATE_WRAP_PTR; /* CK_SKIPJACK_RELAYX_PARAMS provides the parameters to the * CKM_SKIPJACK_RELAYX mechanism */ /* CK_SKIPJACK_RELAYX_PARAMS is new for v2.0 */ typedef struct CK_SKIPJACK_RELAYX_PARAMS { CK_ULONG ulOldWrappedXLen; CK_BYTE_PTR pOldWrappedX; CK_ULONG ulOldPasswordLen; CK_BYTE_PTR pOldPassword; CK_ULONG ulOldPublicDataLen; CK_BYTE_PTR pOldPublicData; CK_ULONG ulOldRandomLen; CK_BYTE_PTR pOldRandomA; CK_ULONG ulNewPasswordLen; CK_BYTE_PTR pNewPassword; CK_ULONG ulNewPublicDataLen; CK_BYTE_PTR pNewPublicData; CK_ULONG ulNewRandomLen; CK_BYTE_PTR pNewRandomA; } CK_SKIPJACK_RELAYX_PARAMS; typedef CK_SKIPJACK_RELAYX_PARAMS CK_PTR CK_SKIPJACK_RELAYX_PARAMS_PTR; typedef struct CK_PBE_PARAMS { CK_BYTE_PTR pInitVector; CK_UTF8CHAR_PTR pPassword; CK_ULONG ulPasswordLen; CK_BYTE_PTR pSalt; CK_ULONG ulSaltLen; CK_ULONG ulIteration; } CK_PBE_PARAMS; typedef CK_PBE_PARAMS CK_PTR CK_PBE_PARAMS_PTR; /* CK_KEY_WRAP_SET_OAEP_PARAMS provides the parameters to the * CKM_KEY_WRAP_SET_OAEP mechanism */ /* CK_KEY_WRAP_SET_OAEP_PARAMS is new for v2.0 */ typedef struct CK_KEY_WRAP_SET_OAEP_PARAMS { CK_BYTE bBC; /* block contents byte */ CK_BYTE_PTR pX; /* extra data */ CK_ULONG ulXLen; /* length of extra data in bytes */ } CK_KEY_WRAP_SET_OAEP_PARAMS; typedef CK_KEY_WRAP_SET_OAEP_PARAMS CK_PTR CK_KEY_WRAP_SET_OAEP_PARAMS_PTR; typedef struct CK_SSL3_RANDOM_DATA { CK_BYTE_PTR pClientRandom; CK_ULONG ulClientRandomLen; CK_BYTE_PTR pServerRandom; CK_ULONG ulServerRandomLen; } CK_SSL3_RANDOM_DATA; typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { CK_SSL3_RANDOM_DATA RandomInfo; CK_VERSION_PTR pVersion; } CK_SSL3_MASTER_KEY_DERIVE_PARAMS; typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS CK_PTR CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR; typedef struct CK_SSL3_KEY_MAT_OUT { CK_OBJECT_HANDLE hClientMacSecret; CK_OBJECT_HANDLE hServerMacSecret; CK_OBJECT_HANDLE hClientKey; CK_OBJECT_HANDLE hServerKey; CK_BYTE_PTR pIVClient; CK_BYTE_PTR pIVServer; } CK_SSL3_KEY_MAT_OUT; typedef CK_SSL3_KEY_MAT_OUT CK_PTR CK_SSL3_KEY_MAT_OUT_PTR; typedef struct CK_SSL3_KEY_MAT_PARAMS { CK_ULONG ulMacSizeInBits; CK_ULONG ulKeySizeInBits; CK_ULONG ulIVSizeInBits; CK_BBOOL bIsExport; /* Unused. Must be set to CK_FALSE. */ CK_SSL3_RANDOM_DATA RandomInfo; CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial; } CK_SSL3_KEY_MAT_PARAMS; typedef CK_SSL3_KEY_MAT_PARAMS CK_PTR CK_SSL3_KEY_MAT_PARAMS_PTR; /* CK_TLS_PRF_PARAMS is new for version 2.20 */ typedef struct CK_TLS_PRF_PARAMS { CK_BYTE_PTR pSeed; CK_ULONG ulSeedLen; CK_BYTE_PTR pLabel; CK_ULONG ulLabelLen; CK_BYTE_PTR pOutput; CK_ULONG_PTR pulOutputLen; } CK_TLS_PRF_PARAMS; typedef CK_TLS_PRF_PARAMS CK_PTR CK_TLS_PRF_PARAMS_PTR; /* TLS 1.2 is new for version 2.40 */ typedef struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { CK_SSL3_RANDOM_DATA RandomInfo; CK_VERSION_PTR pVersion; CK_MECHANISM_TYPE prfHashMechanism; } CK_TLS12_MASTER_KEY_DERIVE_PARAMS; typedef CK_TLS12_MASTER_KEY_DERIVE_PARAMS CK_PTR CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR; typedef struct CK_TLS12_KEY_MAT_PARAMS { CK_ULONG ulMacSizeInBits; CK_ULONG ulKeySizeInBits; CK_ULONG ulIVSizeInBits; CK_BBOOL bIsExport; /* Unused. Must be set to CK_FALSE. */ CK_SSL3_RANDOM_DATA RandomInfo; CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial; CK_MECHANISM_TYPE prfHashMechanism; } CK_TLS12_KEY_MAT_PARAMS; typedef CK_TLS12_KEY_MAT_PARAMS CK_PTR CK_TLS12_KEY_MAT_PARAMS_PTR; typedef struct CK_TLS_KDF_PARAMS { CK_MECHANISM_TYPE prfMechanism; CK_BYTE_PTR pLabel; CK_ULONG ulLabelLength; CK_SSL3_RANDOM_DATA RandomInfo; CK_BYTE_PTR pContextData; CK_ULONG ulContextDataLength; } CK_TLS_KDF_PARAMS; typedef struct CK_TLS_MAC_PARAMS { CK_MECHANISM_TYPE prfMechanism; CK_ULONG ulMacLength; CK_ULONG ulServerOrClient; } CK_TLS_MAC_PARAMS; typedef CK_TLS_MAC_PARAMS CK_PTR CK_TLS_MAC_PARAMS_PTR; /* WTLS is new for version 2.20 */ typedef struct CK_WTLS_RANDOM_DATA { CK_BYTE_PTR pClientRandom; CK_ULONG ulClientRandomLen; CK_BYTE_PTR pServerRandom; CK_ULONG ulServerRandomLen; } CK_WTLS_RANDOM_DATA; typedef CK_WTLS_RANDOM_DATA CK_PTR CK_WTLS_RANDOM_DATA_PTR; typedef struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { CK_MECHANISM_TYPE DigestMechanism; CK_WTLS_RANDOM_DATA RandomInfo; CK_BYTE_PTR pVersion; } CK_WTLS_MASTER_KEY_DERIVE_PARAMS; typedef CK_WTLS_MASTER_KEY_DERIVE_PARAMS CK_PTR CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR; typedef struct CK_WTLS_PRF_PARAMS { CK_MECHANISM_TYPE DigestMechanism; CK_BYTE_PTR pSeed; CK_ULONG ulSeedLen; CK_BYTE_PTR pLabel; CK_ULONG ulLabelLen; CK_BYTE_PTR pOutput; CK_ULONG_PTR pulOutputLen; } CK_WTLS_PRF_PARAMS; typedef CK_WTLS_PRF_PARAMS CK_PTR CK_WTLS_PRF_PARAMS_PTR; typedef struct CK_WTLS_KEY_MAT_OUT { CK_OBJECT_HANDLE hMacSecret; CK_OBJECT_HANDLE hKey; CK_BYTE_PTR pIV; } CK_WTLS_KEY_MAT_OUT; typedef CK_WTLS_KEY_MAT_OUT CK_PTR CK_WTLS_KEY_MAT_OUT_PTR; typedef struct CK_WTLS_KEY_MAT_PARAMS { CK_MECHANISM_TYPE DigestMechanism; CK_ULONG ulMacSizeInBits; CK_ULONG ulKeySizeInBits; CK_ULONG ulIVSizeInBits; CK_ULONG ulSequenceNumber; CK_BBOOL bIsExport; /* Unused. Must be set to CK_FALSE. */ CK_WTLS_RANDOM_DATA RandomInfo; CK_WTLS_KEY_MAT_OUT_PTR pReturnedKeyMaterial; } CK_WTLS_KEY_MAT_PARAMS; typedef CK_WTLS_KEY_MAT_PARAMS CK_PTR CK_WTLS_KEY_MAT_PARAMS_PTR; /* The following types for NIST 800-108 KBKDF are defined in PKCS#11 v3.0 */ typedef CK_MECHANISM_TYPE CK_SP800_108_PRF_TYPE; typedef CK_ULONG CK_PRF_DATA_TYPE; #define CK_SP800_108_ITERATION_VARIABLE 0x00000001UL #define CK_SP800_108_OPTIONAL_COUNTER 0x00000002UL #define CK_SP800_108_DKM_LENGTH 0x00000003UL #define CK_SP800_108_BYTE_ARRAY 0x00000004UL /* ERRATA: PKCS#11 v3.0 Cryptographic Token Interface Current Mechanisms * specification specifies a CK_SP800_108_COUNTER, while the pkcs11t.h from * PKCS#11 v3.0 Cryptographic Token Interface Base Specification specifies * CK_SP800_108_OPTIONAL_COUNTER. */ #define CK_SP800_108_COUNTER CK_SP800_108_OPTIONAL_COUNTER typedef struct CK_PRF_DATA_PARAM { CK_PRF_DATA_TYPE type; CK_VOID_PTR pValue; CK_ULONG ulValueLen; } CK_PRF_DATA_PARAM; typedef CK_PRF_DATA_PARAM CK_PTR CK_PRF_DATA_PARAM_PTR; typedef struct CK_SP800_108_COUNTER_FORMAT { CK_BBOOL bLittleEndian; CK_ULONG ulWidthInBits; } CK_SP800_108_COUNTER_FORMAT; typedef CK_SP800_108_COUNTER_FORMAT CK_PTR CK_SP800_108_COUNTER_FORMAT_PTR; typedef CK_ULONG CK_SP800_108_DKM_LENGTH_METHOD; /* ERRATA: PKCS#11 v3.0 Cryptographic Token Interface Current Mechanisms * defines that these constants exist, but doesn't specify values. pkcs11t.h * from PKCS#11 v3.0 Cryptographic Token Interface Base Specification doesn't * define these constants either. */ #define CK_SP800_108_DKM_LENGTH_SUM_OF_KEYS 0x00000001UL #define CK_SP800_108_DKM_LENGTH_SUM_OF_SEGMENTS 0x00000002UL typedef struct CK_SP800_108_DKM_LENGTH_FORMAT { CK_SP800_108_DKM_LENGTH_METHOD dkmLengthMethod; CK_BBOOL bLittleEndian; CK_ULONG ulWidthInBits; } CK_SP800_108_DKM_LENGTH_FORMAT; typedef CK_SP800_108_DKM_LENGTH_FORMAT CK_PTR CK_SP800_108_DKM_LENGTH_FORMAT_PTR; typedef struct CK_DERIVED_KEY { CK_ATTRIBUTE_PTR pTemplate; CK_ULONG ulAttributeCount; CK_OBJECT_HANDLE_PTR phKey; } CK_DERIVED_KEY; typedef CK_DERIVED_KEY CK_PTR CK_DERIVED_KEY_PTR; /* UNFIXED ERRATA: NIST SP800-108 specifies that implementer can decide the * number of bits to take from each PRF invocation. However, all three forms * of the PKCS#11 v3.0 implementation lack a bitwidth for the PRF and only * allow the full-width mechanism varieties. Additionally, outside of the * base key (used as the key to the PRF), there is no way to pass any * additional, PRF-mechanism specific data. */ typedef struct CK_SP800_108_KDF_PARAMS { CK_SP800_108_PRF_TYPE prfType; CK_ULONG ulNumberOfDataParams; CK_PRF_DATA_PARAM_PTR pDataParams; CK_ULONG ulAdditionalDerivedKeys; /* ERRATA: in PKCS#11 v3.0, pAdditionalDerivedKeys is typed as * CK_DERVIED_KEY; it needs to be of type CK_DERIVED_KEY_PTR. */ CK_DERIVED_KEY_PTR pAdditionalDerivedKeys; } CK_SP800_108_KDF_PARAMS; typedef CK_SP800_108_KDF_PARAMS CK_PTR CK_SP800_108_KDF_PARAMS_PTR; typedef struct CK_SP800_108_FEEDBACK_KDF_PARAMS { CK_SP800_108_PRF_TYPE prfType; CK_ULONG ulNumberOfDataParams; CK_PRF_DATA_PARAM_PTR pDataParams; CK_ULONG ulIVLen; CK_BYTE_PTR pIV; CK_ULONG ulAdditionalDerivedKeys; /* ERRATA: in PKCS#11 v3.0, pAdditionalDerivedKeys is typed as * CK_DERVIED_KEY; it needs to be of type CK_DERIVED_KEY_PTR. */ CK_DERIVED_KEY_PTR pAdditionalDerivedKeys; } CK_SP800_108_FEEDBACK_KDF_PARAMS; typedef CK_SP800_108_FEEDBACK_KDF_PARAMS CK_PTR CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR; /* CMS is new for version 2.20 */ typedef struct CK_CMS_SIG_PARAMS { CK_OBJECT_HANDLE certificateHandle; CK_MECHANISM_PTR pSigningMechanism; CK_MECHANISM_PTR pDigestMechanism; CK_UTF8CHAR_PTR pContentType; CK_BYTE_PTR pRequestedAttributes; CK_ULONG ulRequestedAttributesLen; CK_BYTE_PTR pRequiredAttributes; CK_ULONG ulRequiredAttributesLen; } CK_CMS_SIG_PARAMS; typedef CK_CMS_SIG_PARAMS CK_PTR CK_CMS_SIG_PARAMS_PTR; typedef struct CK_KEY_DERIVATION_STRING_DATA { CK_BYTE_PTR pData; CK_ULONG ulLen; } CK_KEY_DERIVATION_STRING_DATA; typedef CK_KEY_DERIVATION_STRING_DATA CK_PTR CK_KEY_DERIVATION_STRING_DATA_PTR; /* The CK_EXTRACT_PARAMS is used for the * CKM_EXTRACT_KEY_FROM_KEY mechanism. It specifies which bit * of the base key should be used as the first bit of the * derived key */ /* CK_EXTRACT_PARAMS is new for v2.0 */ typedef CK_ULONG CK_EXTRACT_PARAMS; typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR; /* CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE is new for v2.10. * CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE is used to * indicate the Pseudo-Random Function (PRF) used to generate * key bits using PKCS #5 PBKDF2. */ typedef CK_ULONG CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; typedef CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE CK_PTR CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR; /* The following PRFs are defined in PKCS #5 v2.1. */ #define CKP_PKCS5_PBKD2_HMAC_SHA1 0x00000001 #define CKP_PKCS5_PBKD2_HMAC_GOSTR3411 0x00000002 #define CKP_PKCS5_PBKD2_HMAC_SHA224 0x00000003 #define CKP_PKCS5_PBKD2_HMAC_SHA256 0x00000004 #define CKP_PKCS5_PBKD2_HMAC_SHA384 0x00000005 #define CKP_PKCS5_PBKD2_HMAC_SHA512 0x00000006 #define CKP_PKCS5_PBKD2_HMAC_SHA512_224 0x00000007 #define CKP_PKCS5_PBKD2_HMAC_SHA512_256 0x00000008 /* CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE is new for v2.10. * CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE is used to indicate the * source of the salt value when deriving a key using PKCS #5 * PBKDF2. */ typedef CK_ULONG CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; typedef CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE CK_PTR CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR; /* The following salt value sources are defined in PKCS #5 v2.0. */ #define CKZ_SALT_SPECIFIED 0x00000001 /* CK_PKCS5_PBKD2_PARAMS is new for v2.10. * CK_PKCS5_PBKD2_PARAMS is a structure that provides the * parameters to the CKM_PKCS5_PBKD2 mechanism. */ typedef struct CK_PKCS5_PBKD2_PARAMS { CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE saltSource; CK_VOID_PTR pSaltSourceData; CK_ULONG ulSaltSourceDataLen; CK_ULONG iterations; CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE prf; CK_VOID_PTR pPrfData; CK_ULONG ulPrfDataLen; CK_UTF8CHAR_PTR pPassword; CK_ULONG_PTR ulPasswordLen; } CK_PKCS5_PBKD2_PARAMS; typedef CK_PKCS5_PBKD2_PARAMS CK_PTR CK_PKCS5_PBKD2_PARAMS_PTR; /* NSS Specific defines */ /* defines that have been deprecated in 2.20, but maintained in our * header file for backward compatibility */ #define CKO_KG_PARAMETERS CKO_DOMAIN_PARAMETERS #define CKF_EC_FP CKF_EC_F_P /* new in v2.11 deprecated by 2.20 */ #define CKR_KEY_PARAMS_INVALID 0x0000006B /* stuff that for historic reasons is in this header file but should have * been in pkcs11n.h */ #define CKK_INVALID_KEY_TYPE 0xffffffff #if 0 /* expanded by -frewrite-includes */ #include "pkcs11n.h" #endif /* expanded by -frewrite-includes */ # 1910 "../../../dist/public/nss/pkcs11t.h" # 1 "../../../dist/public/nss/pkcs11n.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _PKCS11N_H_ #define _PKCS11N_H_ /* * pkcs11n.h * * This file contains the NSS-specific type definitions for Cryptoki * (PKCS#11). */ /* * NSSCK_VENDOR_NSS * * Cryptoki reserves the high half of all the number spaces for * vendor-defined use. I'd like to keep all of our NSS- * specific values together, but not in the oh-so-obvious * 0x80000001, 0x80000002, etc. area. So I've picked an offset, * and constructed values for the beginnings of our spaces. * * Note that some "historical" Netscape values don't fall within * this range. */ #define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */ /* * NSS-defined object classes * */ #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS) #define CKO_NSS_CRL (CKO_NSS + 1) #define CKO_NSS_SMIME (CKO_NSS + 2) #define CKO_NSS_TRUST (CKO_NSS + 3) #define CKO_NSS_BUILTIN_ROOT_LIST (CKO_NSS + 4) #define CKO_NSS_NEWSLOT (CKO_NSS + 5) #define CKO_NSS_DELSLOT (CKO_NSS + 6) /* * NSS-defined key types * */ #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS) #define CKK_NSS_PKCS8 (CKK_NSS + 1) #define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2) #define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3) #define CKK_NSS_CHACHA20 (CKK_NSS + 4) /* * NSS-defined certificate types * */ #define CKC_NSS (CKC_VENDOR_DEFINED | NSSCK_VENDOR_NSS) /* FAKE PKCS #11 defines */ #define CKA_DIGEST 0x81000000L #define CKA_FLAGS_ONLY 0 /* CKA_CLASS */ /* * NSS-defined object attributes * */ #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS) #define CKA_NSS_URL (CKA_NSS + 1) #define CKA_NSS_EMAIL (CKA_NSS + 2) #define CKA_NSS_SMIME_INFO (CKA_NSS + 3) #define CKA_NSS_SMIME_TIMESTAMP (CKA_NSS + 4) #define CKA_NSS_PKCS8_SALT (CKA_NSS + 5) #define CKA_NSS_PASSWORD_CHECK (CKA_NSS + 6) #define CKA_NSS_EXPIRES (CKA_NSS + 7) #define CKA_NSS_KRL (CKA_NSS + 8) #define CKA_NSS_PQG_COUNTER (CKA_NSS + 20) #define CKA_NSS_PQG_SEED (CKA_NSS + 21) #define CKA_NSS_PQG_H (CKA_NSS + 22) #define CKA_NSS_PQG_SEED_BITS (CKA_NSS + 23) #define CKA_NSS_MODULE_SPEC (CKA_NSS + 24) #define CKA_NSS_OVERRIDE_EXTENSIONS (CKA_NSS + 25) #define CKA_NSS_JPAKE_SIGNERID (CKA_NSS + 26) #define CKA_NSS_JPAKE_PEERID (CKA_NSS + 27) #define CKA_NSS_JPAKE_GX1 (CKA_NSS + 28) #define CKA_NSS_JPAKE_GX2 (CKA_NSS + 29) #define CKA_NSS_JPAKE_GX3 (CKA_NSS + 30) #define CKA_NSS_JPAKE_GX4 (CKA_NSS + 31) #define CKA_NSS_JPAKE_X2 (CKA_NSS + 32) #define CKA_NSS_JPAKE_X2S (CKA_NSS + 33) #define CKA_NSS_MOZILLA_CA_POLICY (CKA_NSS + 34) #define CKA_NSS_SERVER_DISTRUST_AFTER (CKA_NSS + 35) #define CKA_NSS_EMAIL_DISTRUST_AFTER (CKA_NSS + 36) /* * Trust attributes: * * If trust goes standard, these probably will too. So I'll * put them all in one place. */ #define CKA_TRUST (CKA_NSS + 0x2000) /* "Usage" key information */ #define CKA_TRUST_DIGITAL_SIGNATURE (CKA_TRUST + 1) #define CKA_TRUST_NON_REPUDIATION (CKA_TRUST + 2) #define CKA_TRUST_KEY_ENCIPHERMENT (CKA_TRUST + 3) #define CKA_TRUST_DATA_ENCIPHERMENT (CKA_TRUST + 4) #define CKA_TRUST_KEY_AGREEMENT (CKA_TRUST + 5) #define CKA_TRUST_KEY_CERT_SIGN (CKA_TRUST + 6) #define CKA_TRUST_CRL_SIGN (CKA_TRUST + 7) /* "Purpose" trust information */ #define CKA_TRUST_SERVER_AUTH (CKA_TRUST + 8) #define CKA_TRUST_CLIENT_AUTH (CKA_TRUST + 9) #define CKA_TRUST_CODE_SIGNING (CKA_TRUST + 10) #define CKA_TRUST_EMAIL_PROTECTION (CKA_TRUST + 11) #define CKA_TRUST_IPSEC_END_SYSTEM (CKA_TRUST + 12) #define CKA_TRUST_IPSEC_TUNNEL (CKA_TRUST + 13) #define CKA_TRUST_IPSEC_USER (CKA_TRUST + 14) #define CKA_TRUST_TIME_STAMPING (CKA_TRUST + 15) #define CKA_TRUST_STEP_UP_APPROVED (CKA_TRUST + 16) #define CKA_CERT_SHA1_HASH (CKA_TRUST + 100) #define CKA_CERT_MD5_HASH (CKA_TRUST + 101) /* NSS trust stuff */ /* HISTORICAL: define used to pass in the database key for DSA private keys */ #define CKA_NETSCAPE_DB 0xD5A0DB00L #define CKA_NETSCAPE_TRUST 0x80000001L /* FAKE PKCS #11 defines */ #define CKM_FAKE_RANDOM 0x80000efeUL #define CKM_INVALID_MECHANISM 0xffffffffUL #define CKT_INVALID_TYPE 0xffffffffUL /* * NSS-defined crypto mechanisms * */ #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS) #define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1) #define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2) /* HKDF key derivation mechanisms. See CK_NSS_HKDFParams for documentation. */ #define CKM_NSS_HKDF_SHA1 (CKM_NSS + 3) #define CKM_NSS_HKDF_SHA256 (CKM_NSS + 4) #define CKM_NSS_HKDF_SHA384 (CKM_NSS + 5) #define CKM_NSS_HKDF_SHA512 (CKM_NSS + 6) /* J-PAKE round 1 key generation mechanisms. * * Required template attributes: CKA_PRIME, CKA_SUBPRIME, CKA_BASE, * CKA_NSS_JPAKE_SIGNERID * Output key type: CKK_NSS_JPAKE_ROUND1 * Output key class: CKO_PRIVATE_KEY * Parameter type: CK_NSS_JPAKERound1Params * */ #define CKM_NSS_JPAKE_ROUND1_SHA1 (CKM_NSS + 7) #define CKM_NSS_JPAKE_ROUND1_SHA256 (CKM_NSS + 8) #define CKM_NSS_JPAKE_ROUND1_SHA384 (CKM_NSS + 9) #define CKM_NSS_JPAKE_ROUND1_SHA512 (CKM_NSS + 10) /* J-PAKE round 2 key derivation mechanisms. * * Required template attributes: CKA_NSS_JPAKE_PEERID * Input key type: CKK_NSS_JPAKE_ROUND1 * Output key type: CKK_NSS_JPAKE_ROUND2 * Output key class: CKO_PRIVATE_KEY * Parameter type: CK_NSS_JPAKERound2Params */ #define CKM_NSS_JPAKE_ROUND2_SHA1 (CKM_NSS + 11) #define CKM_NSS_JPAKE_ROUND2_SHA256 (CKM_NSS + 12) #define CKM_NSS_JPAKE_ROUND2_SHA384 (CKM_NSS + 13) #define CKM_NSS_JPAKE_ROUND2_SHA512 (CKM_NSS + 14) /* J-PAKE final key material derivation mechanisms * * Input key type: CKK_NSS_JPAKE_ROUND2 * Output key type: CKK_GENERIC_SECRET * Output key class: CKO_SECRET_KEY * Parameter type: CK_NSS_JPAKEFinalParams * * You must apply a KDF (e.g. CKM_NSS_HKDF_*) to resultant keying material * to get a key with uniformly distributed bits. */ #define CKM_NSS_JPAKE_FINAL_SHA1 (CKM_NSS + 15) #define CKM_NSS_JPAKE_FINAL_SHA256 (CKM_NSS + 16) #define CKM_NSS_JPAKE_FINAL_SHA384 (CKM_NSS + 17) #define CKM_NSS_JPAKE_FINAL_SHA512 (CKM_NSS + 18) /* Constant-time MAC mechanisms: * * These operations verify a padded, MAC-then-encrypt block of data in * constant-time. Because of the order of operations, the padding bytes are not * protected by the MAC. However, disclosing the value of the padding bytes * gives an attacker the ability to decrypt ciphertexts. Such disclosure can be * as subtle as taking slightly less time to perform the MAC when the padding * is one byte longer. See https://www.isg.rhul.ac.uk/tls/ * * CKM_NSS_HMAC_CONSTANT_TIME: performs an HMAC authentication. * CKM_NSS_SSL3_MAC_CONSTANT_TIME: performs an authentication with SSLv3 MAC. * * Parameter type: CK_NSS_MAC_CONSTANT_TIME_PARAMS */ #define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19) #define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20) /* TLS 1.2 mechanisms */ #define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21) #define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22) #define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23) #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) /* TLS extended master secret derivation */ #define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25) #define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26) #define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27) #define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28) /* Additional PKCS #12 PBE algorithms defined in v1.1 */ #define CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN (CKM_NSS + 29) #define CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN (CKM_NSS + 30) #define CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN (CKM_NSS + 31) #define CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN (CKM_NSS + 32) #define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33) /* IKE mechanism (to be proposed to PKCS #11 */ #define CKM_NSS_IKE_PRF_PLUS_DERIVE (CKM_NSS + 34) #define CKM_NSS_IKE_PRF_DERIVE (CKM_NSS + 35) #define CKM_NSS_IKE1_PRF_DERIVE (CKM_NSS + 36) #define CKM_NSS_IKE1_APP_B_PRF_DERIVE (CKM_NSS + 37) #define CKM_NSS_PUB_FROM_PRIV (CKM_NSS + 40) /* SP800-108 NSS mechanism with support for data object derivation */ #define CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA (CKM_NSS + 42) #define CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA (CKM_NSS + 43) #define CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA (CKM_NSS + 44) /* * HISTORICAL: * Do not attempt to use these. They are only used by NETSCAPE's internal * PKCS #11 interface. Most of these are place holders for other mechanism * and will change in the future. */ #define CKM_NETSCAPE_PBE_SHA1_DES_CBC 0x80000002UL #define CKM_NETSCAPE_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC4 0x80000006UL #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC4 0x80000007UL #define CKM_NETSCAPE_PBE_SHA1_FAULTY_3DES_CBC 0x80000008UL #define CKM_NETSCAPE_PBE_SHA1_HMAC_KEY_GEN 0x80000009UL #define CKM_NETSCAPE_PBE_MD5_HMAC_KEY_GEN 0x8000000aUL #define CKM_NETSCAPE_PBE_MD2_HMAC_KEY_GEN 0x8000000bUL #define CKM_TLS_PRF_GENERAL 0x80000373UL typedef struct CK_NSS_JPAKEPublicValue { CK_BYTE *pGX; CK_ULONG ulGXLen; CK_BYTE *pGV; CK_ULONG ulGVLen; CK_BYTE *pR; CK_ULONG ulRLen; } CK_NSS_JPAKEPublicValue; typedef struct CK_NSS_JPAKERound1Params { CK_NSS_JPAKEPublicValue gx1; /* out */ CK_NSS_JPAKEPublicValue gx2; /* out */ } CK_NSS_JPAKERound1Params; typedef struct CK_NSS_JPAKERound2Params { CK_BYTE *pSharedKey; /* in */ CK_ULONG ulSharedKeyLen; /* in */ CK_NSS_JPAKEPublicValue gx3; /* in */ CK_NSS_JPAKEPublicValue gx4; /* in */ CK_NSS_JPAKEPublicValue A; /* out */ } CK_NSS_JPAKERound2Params; typedef struct CK_NSS_JPAKEFinalParams { CK_NSS_JPAKEPublicValue B; /* in */ } CK_NSS_JPAKEFinalParams; /* macAlg: the MAC algorithm to use. This determines the hash function used in * the HMAC/SSLv3 MAC calculations. * ulBodyTotalLen: the total length of the data, including padding bytes and * padding length. * pHeader: points to a block of data that contains additional data to * authenticate. For TLS this includes the sequence number etc. For SSLv3, * this also includes the initial padding bytes. * * NOTE: the softoken's implementation of CKM_NSS_HMAC_CONSTANT_TIME and * CKM_NSS_SSL3_MAC_CONSTANT_TIME requires that the sum of ulBodyTotalLen * and ulHeaderLen be much smaller than 2^32 / 8 bytes because it uses an * unsigned int variable to represent the length in bits. This should not * be a problem because the SSL/TLS protocol limits the size of an SSL * record to something considerably less than 2^32 bytes. */ typedef struct CK_NSS_MAC_CONSTANT_TIME_PARAMS { CK_MECHANISM_TYPE macAlg; /* in */ CK_ULONG ulBodyTotalLen; /* in */ CK_BYTE *pHeader; /* in */ CK_ULONG ulHeaderLen; /* in */ } CK_NSS_MAC_CONSTANT_TIME_PARAMS; typedef struct CK_NSS_AEAD_PARAMS { CK_BYTE_PTR pNonce; CK_ULONG ulNonceLen; CK_BYTE_PTR pAAD; CK_ULONG ulAADLen; CK_ULONG ulTagLen; } CK_NSS_AEAD_PARAMS; /* * NSS-defined return values * */ #define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS) #define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1) #define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2) /* Mandatory parameter for the CKM_NSS_HKDF_* key deriviation mechanisms. See RFC 5869. bExtract: If set, HKDF-Extract will be applied to the input key. If the optional salt is given, it is used; otherwise, the salt is set to a sequence of zeros equal in length to the HMAC output. If bExpand is not set, then the key template given to C_DeriveKey must indicate an output key size less than or equal to the output size of the HMAC. bExpand: If set, HKDF-Expand will be applied to the input key (if bExtract is not set) or to the result of HKDF-Extract (if bExtract is set). Any info given in the optional pInfo field will be included in the calculation. The size of the output key must be specified in the template passed to C_DeriveKey. */ typedef struct CK_NSS_HKDFParams { CK_BBOOL bExtract; CK_BYTE_PTR pSalt; CK_ULONG ulSaltLen; CK_BBOOL bExpand; CK_BYTE_PTR pInfo; CK_ULONG ulInfoLen; } CK_NSS_HKDFParams; /* * CK_NSS_IKE_PRF_PLUS_PARAMS is a structure that provides the parameters to * the CKM_NSS_IKE_PRF_PLUS_DERIVE mechanism. * The fields of the structure have the following meanings: * prfMechanism underlying MAC mechanism used to generate the prf. * bHasSeedKey hSeed key is present. * hSeedKey optional seed from key * pSeedData optional seed from data. * ulSeedDataLen length of optional seed data. * If no seed data is present this value is NULL. */ typedef struct CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS { CK_MECHANISM_TYPE prfMechanism; CK_BBOOL bHasSeedKey; CK_OBJECT_HANDLE hSeedKey; CK_BYTE_PTR pSeedData; CK_ULONG ulSeedDataLen; } CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS; /* CK_NSS_IKE_PRF_DERIVE_PARAMS is a structure that provides the parameters to * the CKM_NSS_IKE_PRF_DERIVE mechanism. * * The fields of the structure have the following meanings: * prfMechanism underlying MAC mechanism used to generate the prf. * bRekey hNewKey is present. * pNi Ni value * ulNiLen length of Ni * pNr Nr value * ulNrLen length of Nr * hNewKey New key value to drive the rekey. */ typedef struct CK_NSS_IKE_PRF_DERIVE_PARAMS { CK_MECHANISM_TYPE prfMechanism; CK_BBOOL bDataAsKey; CK_BBOOL bRekey; CK_BYTE_PTR pNi; CK_ULONG ulNiLen; CK_BYTE_PTR pNr; CK_ULONG ulNrLen; CK_OBJECT_HANDLE hNewKey; } CK_NSS_IKE_PRF_DERIVE_PARAMS; /* CK_NSS_IKE1_PRF_DERIVE_PARAMS is a structure that provides the parameters * to the CKM_NSS_IKE_PRF_DERIVE mechanism. * * The fields of the structure have the following meanings: * prfMechanism underlying MAC mechanism used to generate the prf. * bRekey hNewKey is present. * pCKYi CKYi value * ulCKYiLen length of CKYi * pCKYr CKYr value * ulCKYrLen length of CKYr * hNewKey New key value to drive the rekey. */ typedef struct CK_NSS_IKE1_PRF_DERIVE_PARAMS { CK_MECHANISM_TYPE prfMechanism; CK_BBOOL bHasPrevKey; CK_OBJECT_HANDLE hKeygxy; CK_OBJECT_HANDLE hPrevKey; CK_BYTE_PTR pCKYi; CK_ULONG ulCKYiLen; CK_BYTE_PTR pCKYr; CK_ULONG ulCKYrLen; CK_BYTE keyNumber; } CK_NSS_IKE1_PRF_DERIVE_PARAMS; /* * Parameter for the TLS extended master secret key derivation mechanisms: * * * CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE * * CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH * * For the TLS 1.2 PRF, the prfHashMechanism parameter determines the hash * function used. For earlier versions of the PRF, set the prfHashMechanism * value to CKM_TLS_PRF. * * The session hash input is expected to be the output of the same hash * function as the PRF uses (as required by draft-ietf-tls-session-hash). So * the ulSessionHashLen member must be equal the output length of the hash * function specified by the prfHashMechanism member (or, for pre-TLS 1.2 PRF, * the length of concatenated MD5 and SHA-1 digests). * */ typedef struct CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS { CK_MECHANISM_TYPE prfHashMechanism; CK_BYTE_PTR pSessionHash; CK_ULONG ulSessionHashLen; CK_VERSION_PTR pVersion; } CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS; /* * Trust info * * This isn't part of the Cryptoki standard (yet), so I'm putting * all the definitions here. Some of this would move to nssckt.h * if trust info were made part of the standard. In view of this * possibility, I'm putting my (NSS) values in the NSS * vendor space, like everything else. */ typedef CK_ULONG CK_TRUST; /* The following trust types are defined: */ #define CKT_VENDOR_DEFINED 0x80000000 #define CKT_NSS (CKT_VENDOR_DEFINED | NSSCK_VENDOR_NSS) /* If trust goes standard, these'll probably drop out of vendor space. */ #define CKT_NSS_TRUSTED (CKT_NSS + 1) #define CKT_NSS_TRUSTED_DELEGATOR (CKT_NSS + 2) #define CKT_NSS_MUST_VERIFY_TRUST (CKT_NSS + 3) #define CKT_NSS_NOT_TRUSTED (CKT_NSS + 10) #define CKT_NSS_TRUST_UNKNOWN (CKT_NSS + 5) /* default */ /* * These may well remain NSS-specific; I'm only using them * to cache resolution data. */ #define CKT_NSS_VALID_DELEGATOR (CKT_NSS + 11) /* * old definitions. They still exist, but the plain meaning of the * labels have never been accurate to what was really implemented. * The new labels correctly reflect what the values effectively mean. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) && (__GNUC__ > 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 488 "../../../dist/public/nss/pkcs11n.h" /* make GCC warn when we use these #defines */ /* * This is really painful because GCC doesn't allow us to mark random * #defines as deprecated. We can only mark the following: * functions, variables, and types. * const variables will create extra storage for everyone including this * header file, so it's undesirable. * functions could be inlined to prevent storage creation, but will fail * when constant values are expected (like switch statements). * enum types do not seem to pay attention to the deprecated attribute. * * That leaves typedefs. We declare new types that we then deprecate, then * cast the resulting value to the deprecated type in the #define, thus * producting the warning when the #define is used. */ #if 0 /* disabled by -frewrite-includes */ #if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 504 "../../../dist/public/nss/pkcs11n.h" /* The mac doesn't like the friendlier deprecate messages. I'm assuming this * is a gcc version issue rather than mac or ppc specific */ typedef CK_TRUST __CKT_NSS_UNTRUSTED __attribute__((deprecated)); typedef CK_TRUST __CKT_NSS_VALID __attribute__((deprecated)); typedef CK_TRUST __CKT_NSS_MUST_VERIFY __attribute__((deprecated)); #else # 510 "../../../dist/public/nss/pkcs11n.h" /* when possible, get a full deprecation warning. This works on gcc 4.5 * it may work on earlier versions of gcc */ typedef CK_TRUST __CKT_NSS_UNTRUSTED __attribute__((deprecated("CKT_NSS_UNTRUSTED really means CKT_NSS_MUST_VERIFY_TRUST"))); typedef CK_TRUST __CKT_NSS_VALID __attribute__((deprecated("CKT_NSS_VALID really means CKT_NSS_NOT_TRUSTED"))); typedef CK_TRUST __CKT_NSS_MUST_VERIFY __attribute__((deprecated("CKT_NSS_MUST_VERIFY really functions as CKT_NSS_TRUST_UNKNOWN"))); #endif # 516 "../../../dist/public/nss/pkcs11n.h" #define CKT_NSS_UNTRUSTED ((__CKT_NSS_UNTRUSTED)CKT_NSS_MUST_VERIFY_TRUST) #define CKT_NSS_VALID ((__CKT_NSS_VALID)CKT_NSS_NOT_TRUSTED) /* keep the old value for compatibility reasons*/ #define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS + 4)) #else # 521 "../../../dist/public/nss/pkcs11n.h" #ifdef _WIN32 /* This magic gets the windows compiler to give us a deprecation * warning */ #pragma deprecated(CKT_NSS_UNTRUSTED, CKT_NSS_MUST_VERIFY, CKT_NSS_VALID) #endif # 526 "../../../dist/public/nss/pkcs11n.h" /* CKT_NSS_UNTRUSTED really means CKT_NSS_MUST_VERIFY_TRUST */ #define CKT_NSS_UNTRUSTED CKT_NSS_MUST_VERIFY_TRUST /* CKT_NSS_VALID really means CKT_NSS_NOT_TRUSTED */ #define CKT_NSS_VALID CKT_NSS_NOT_TRUSTED /* CKT_NSS_MUST_VERIFY was always treated as CKT_NSS_TRUST_UNKNOWN */ #define CKT_NSS_MUST_VERIFY (CKT_NSS + 4) /*really means trust unknown*/ #endif # 533 "../../../dist/public/nss/pkcs11n.h" /* don't leave old programs in a lurch just yet, give them the old NETSCAPE * synonym */ #define CKO_NETSCAPE_CRL CKO_NSS_CRL #define CKO_NETSCAPE_SMIME CKO_NSS_SMIME #define CKO_NETSCAPE_TRUST CKO_NSS_TRUST #define CKO_NETSCAPE_BUILTIN_ROOT_LIST CKO_NSS_BUILTIN_ROOT_LIST #define CKO_NETSCAPE_NEWSLOT CKO_NSS_NEWSLOT #define CKO_NETSCAPE_DELSLOT CKO_NSS_DELSLOT #define CKK_NETSCAPE_PKCS8 CKK_NSS_PKCS8 #define CKA_NETSCAPE_URL CKA_NSS_URL #define CKA_NETSCAPE_EMAIL CKA_NSS_EMAIL #define CKA_NETSCAPE_SMIME_INFO CKA_NSS_SMIME_INFO #define CKA_NETSCAPE_SMIME_TIMESTAMP CKA_NSS_SMIME_TIMESTAMP #define CKA_NETSCAPE_PKCS8_SALT CKA_NSS_PKCS8_SALT #define CKA_NETSCAPE_PASSWORD_CHECK CKA_NSS_PASSWORD_CHECK #define CKA_NETSCAPE_EXPIRES CKA_NSS_EXPIRES #define CKA_NETSCAPE_KRL CKA_NSS_KRL #define CKA_NETSCAPE_PQG_COUNTER CKA_NSS_PQG_COUNTER #define CKA_NETSCAPE_PQG_SEED CKA_NSS_PQG_SEED #define CKA_NETSCAPE_PQG_H CKA_NSS_PQG_H #define CKA_NETSCAPE_PQG_SEED_BITS CKA_NSS_PQG_SEED_BITS #define CKA_NETSCAPE_MODULE_SPEC CKA_NSS_MODULE_SPEC #define CKM_NETSCAPE_AES_KEY_WRAP CKM_NSS_AES_KEY_WRAP #define CKM_NETSCAPE_AES_KEY_WRAP_PAD CKM_NSS_AES_KEY_WRAP_PAD #define CKR_NETSCAPE_CERTDB_FAILED CKR_NSS_CERTDB_FAILED #define CKR_NETSCAPE_KEYDB_FAILED CKR_NSS_KEYDB_FAILED #define CKT_NETSCAPE_TRUSTED CKT_NSS_TRUSTED #define CKT_NETSCAPE_TRUSTED_DELEGATOR CKT_NSS_TRUSTED_DELEGATOR #define CKT_NETSCAPE_UNTRUSTED CKT_NSS_UNTRUSTED #define CKT_NETSCAPE_MUST_VERIFY CKT_NSS_MUST_VERIFY #define CKT_NETSCAPE_TRUST_UNKNOWN CKT_NSS_TRUST_UNKNOWN #define CKT_NETSCAPE_VALID CKT_NSS_VALID #define CKT_NETSCAPE_VALID_DELEGATOR CKT_NSS_VALID_DELEGATOR /* * These are not really PKCS #11 values specifically. They are the 'loadable' * module spec NSS uses. The are available for others to use as well, but not * part of the formal PKCS #11 spec. * * The function 'FIND' returns an array of PKCS #11 initialization strings * The function 'ADD' takes a PKCS #11 initialization string and stores it. * The function 'DEL' takes a 'name= library=' value and deletes the associated * string. * The function 'RELEASE' frees the array returned by 'FIND' */ #define SECMOD_MODULE_DB_FUNCTION_FIND 0 #define SECMOD_MODULE_DB_FUNCTION_ADD 1 #define SECMOD_MODULE_DB_FUNCTION_DEL 2 #define SECMOD_MODULE_DB_FUNCTION_RELEASE 3 typedef char **(PR_CALLBACK *SECMODModuleDBFunc)(unsigned long function, char *parameters, void *moduleSpec); /* softoken slot ID's */ #define SFTK_MIN_USER_SLOT_ID 4 #define SFTK_MAX_USER_SLOT_ID 100 #define SFTK_MIN_FIPS_USER_SLOT_ID 101 #define SFTK_MAX_FIPS_USER_SLOT_ID 127 #endif /* _PKCS11N_H_ */ # 594 "../../../dist/public/nss/pkcs11n.h" # 1911 "../../../dist/public/nss/pkcs11t.h" 2 /* undo packing */ #if 0 /* expanded by -frewrite-includes */ #include "pkcs11u.h" #endif /* expanded by -frewrite-includes */ # 1913 "../../../dist/public/nss/pkcs11t.h" # 1 "../../../dist/public/nss/pkcs11u.h" 1 /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document * is granted provided that it is identified as "RSA Security Inc. Public-Key * Cryptography Standards (PKCS)" in all material mentioning or referencing * this document. */ /* * reset any packing set by pkcs11p.h */ #if 0 /* disabled by -frewrite-includes */ #if defined(_WIN32) || defined(_WINDOWS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 15 "../../../dist/public/nss/pkcs11u.h" #ifdef __clang__ #pragma clang diagnostic ignored "-Wpragma-pack" #endif # 18 "../../../dist/public/nss/pkcs11u.h" #ifdef _MSC_VER #pragma warning(disable : 4103) #endif # 21 "../../../dist/public/nss/pkcs11u.h" #pragma pack(pop, cryptoki) #endif # 23 "../../../dist/public/nss/pkcs11u.h" # 1914 "../../../dist/public/nss/pkcs11t.h" 2 #endif # 1916 "../../../dist/public/nss/pkcs11t.h" # 17 "gcm.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 18 "gcm.c" # 19 "gcm.c" /* old gcc doesn't support some poly64x2_t intrinsic */ #if 0 /* disabled by -frewrite-includes */ #if defined(__aarch64__) && defined(IS_LITTLE_ENDIAN) && \ (defined(__clang__) || defined(__GNUC__) && __GNUC__ > 6) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "gcm.c" #define USE_ARM_GCM #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__arm__) && defined(IS_LITTLE_ENDIAN) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 25 "gcm.c" /* We don't test on big endian platform, so disable this on big endian. */ #define USE_ARM_GCM #endif # 28 "gcm.c" /* Forward declarations */ SECStatus gcm_HashInit_hw(gcmHashContext *ghash); SECStatus gcm_HashWrite_hw(gcmHashContext *ghash, unsigned char *outbuf); SECStatus gcm_HashMult_hw(gcmHashContext *ghash, const unsigned char *buf, unsigned int count); SECStatus gcm_HashZeroX_hw(gcmHashContext *ghash); SECStatus gcm_HashMult_sftw(gcmHashContext *ghash, const unsigned char *buf, unsigned int count); SECStatus gcm_HashMult_sftw32(gcmHashContext *ghash, const unsigned char *buf, unsigned int count); /* Stub definitions for the above *_hw functions, which shouldn't be * used unless NSS_X86_OR_X64 is defined */ #if 0 /* disabled by -frewrite-includes */ #if !defined(NSS_X86_OR_X64) && !defined(USE_ARM_GCM) && !defined(USE_PPC_CRYPTO) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 43 "gcm.c" SECStatus gcm_HashWrite_hw(gcmHashContext *ghash, unsigned char *outbuf) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } SECStatus gcm_HashMult_hw(gcmHashContext *ghash, const unsigned char *buf, unsigned int count) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } SECStatus gcm_HashInit_hw(gcmHashContext *ghash) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } SECStatus gcm_HashZeroX_hw(gcmHashContext *ghash) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } #endif /* !NSS_X86_OR_X64 && !USE_ARM_GCM && !USE_PPC_CRYPTO */ # 72 "gcm.c" uint64_t get64(const unsigned char *bytes) { return ((uint64_t)bytes[0]) << 56 | ((uint64_t)bytes[1]) << 48 | ((uint64_t)bytes[2]) << 40 | ((uint64_t)bytes[3]) << 32 | ((uint64_t)bytes[4]) << 24 | ((uint64_t)bytes[5]) << 16 | ((uint64_t)bytes[6]) << 8 | ((uint64_t)bytes[7]); } /* Initialize a gcmHashContext */ SECStatus gcmHash_InitContext(gcmHashContext *ghash, const unsigned char *H, PRBool sw) { SECStatus rv = SECSuccess; ghash->cLen = 0; ghash->bufLen = 0; PORT_Memset(ghash->counterBuf, 0, sizeof(ghash->counterBuf)); ghash->h_low = get64(H + 8); ghash->h_high = get64(H); #ifdef USE_ARM_GCM #if 0 /* disabled by -frewrite-includes */ #if defined(__aarch64__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 100 "gcm.c" if (arm_pmull_support() && !sw) { #else # 102 "gcm.c" if (arm_neon_support() && !sw) { #endif # 104 "gcm.c" #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(USE_PPC_CRYPTO) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 105 "gcm.c" if (ppc_crypto_support() && !sw) { #else # 107 "gcm.c" if (clmul_support() && !sw) { #endif # 109 "gcm.c" rv = gcm_HashInit_hw(ghash); } else { /* We fall back to the software implementation if we can't use / don't * want to use pclmul. */ #ifdef HAVE_INT128_SUPPORT ghash->ghash_mul = gcm_HashMult_sftw; #else # 116 "gcm.c" ghash->ghash_mul = gcm_HashMult_sftw32; #endif # 118 "gcm.c" ghash->x_high = ghash->x_low = 0; ghash->hw = PR_FALSE; } return rv; } #ifdef HAVE_INT128_SUPPORT /* Binary multiplication x * y = r_high << 64 | r_low. */ void bmul(uint64_t x, uint64_t y, uint64_t *r_high, uint64_t *r_low) { uint128_t x1, x2, x3, x4, x5; uint128_t y1, y2, y3, y4, y5; uint128_t r, z; uint128_t m1 = (uint128_t)0x2108421084210842 << 64 | 0x1084210842108421; uint128_t m2 = (uint128_t)0x4210842108421084 << 64 | 0x2108421084210842; uint128_t m3 = (uint128_t)0x8421084210842108 << 64 | 0x4210842108421084; uint128_t m4 = (uint128_t)0x0842108421084210 << 64 | 0x8421084210842108; uint128_t m5 = (uint128_t)0x1084210842108421 << 64 | 0x0842108421084210; x1 = x & m1; y1 = y & m1; x2 = x & m2; y2 = y & m2; x3 = x & m3; y3 = y & m3; x4 = x & m4; y4 = y & m4; x5 = x & m5; y5 = y & m5; z = (x1 * y1) ^ (x2 * y5) ^ (x3 * y4) ^ (x4 * y3) ^ (x5 * y2); r = z & m1; z = (x1 * y2) ^ (x2 * y1) ^ (x3 * y5) ^ (x4 * y4) ^ (x5 * y3); r |= z & m2; z = (x1 * y3) ^ (x2 * y2) ^ (x3 * y1) ^ (x4 * y5) ^ (x5 * y4); r |= z & m3; z = (x1 * y4) ^ (x2 * y3) ^ (x3 * y2) ^ (x4 * y1) ^ (x5 * y5); r |= z & m4; z = (x1 * y5) ^ (x2 * y4) ^ (x3 * y3) ^ (x4 * y2) ^ (x5 * y1); r |= z & m5; *r_high = (uint64_t)(r >> 64); *r_low = (uint64_t)r; } SECStatus gcm_HashMult_sftw(gcmHashContext *ghash, const unsigned char *buf, unsigned int count) { uint64_t ci_low, ci_high; size_t i; uint64_t z2_low, z2_high, z0_low, z0_high, z1a_low, z1a_high; uint128_t z_high = 0, z_low = 0; ci_low = ghash->x_low; ci_high = ghash->x_high; for (i = 0; i < count; i++, buf += 16) { ci_low ^= get64(buf + 8); ci_high ^= get64(buf); /* Do binary mult ghash->X = C * ghash->H (Karatsuba). */ bmul(ci_high, ghash->h_high, &z2_high, &z2_low); bmul(ci_low, ghash->h_low, &z0_high, &z0_low); bmul(ci_high ^ ci_low, ghash->h_high ^ ghash->h_low, &z1a_high, &z1a_low); z1a_high ^= z2_high ^ z0_high; z1a_low ^= z2_low ^ z0_low; z_high = ((uint128_t)z2_high << 64) | (z2_low ^ z1a_high); z_low = (((uint128_t)z0_high << 64) | z0_low) ^ (((uint128_t)z1a_low) << 64); /* Shift one (multiply by x) as gcm spec is stupid. */ z_high = (z_high << 1) | (z_low >> 127); z_low <<= 1; /* Reduce */ z_low ^= (z_low << 127) ^ (z_low << 126) ^ (z_low << 121); z_high ^= z_low ^ (z_low >> 1) ^ (z_low >> 2) ^ (z_low >> 7); ci_low = (uint64_t)z_high; ci_high = (uint64_t)(z_high >> 64); } ghash->x_low = ci_low; ghash->x_high = ci_high; return SECSuccess; } #else # 204 "gcm.c" /* Binary multiplication x * y = r_high << 32 | r_low. */ void bmul32(uint32_t x, uint32_t y, uint32_t *r_high, uint32_t *r_low) { uint32_t x0, x1, x2, x3; uint32_t y0, y1, y2, y3; uint32_t m1 = (uint32_t)0x11111111; uint32_t m2 = (uint32_t)0x22222222; uint32_t m4 = (uint32_t)0x44444444; uint32_t m8 = (uint32_t)0x88888888; uint64_t z0, z1, z2, z3; uint64_t z; x0 = x & m1; x1 = x & m2; x2 = x & m4; x3 = x & m8; y0 = y & m1; y1 = y & m2; y2 = y & m4; y3 = y & m8; z0 = ((uint64_t)x0 * y0) ^ ((uint64_t)x1 * y3) ^ ((uint64_t)x2 * y2) ^ ((uint64_t)x3 * y1); z1 = ((uint64_t)x0 * y1) ^ ((uint64_t)x1 * y0) ^ ((uint64_t)x2 * y3) ^ ((uint64_t)x3 * y2); z2 = ((uint64_t)x0 * y2) ^ ((uint64_t)x1 * y1) ^ ((uint64_t)x2 * y0) ^ ((uint64_t)x3 * y3); z3 = ((uint64_t)x0 * y3) ^ ((uint64_t)x1 * y2) ^ ((uint64_t)x2 * y1) ^ ((uint64_t)x3 * y0); z0 &= ((uint64_t)m1 << 32) | m1; z1 &= ((uint64_t)m2 << 32) | m2; z2 &= ((uint64_t)m4 << 32) | m4; z3 &= ((uint64_t)m8 << 32) | m8; z = z0 | z1 | z2 | z3; *r_high = (uint32_t)(z >> 32); *r_low = (uint32_t)z; } SECStatus gcm_HashMult_sftw32(gcmHashContext *ghash, const unsigned char *buf, unsigned int count) { size_t i; uint64_t ci_low, ci_high; uint64_t z_high_h, z_high_l, z_low_h, z_low_l; uint32_t ci_high_h, ci_high_l, ci_low_h, ci_low_l; uint32_t b_a_h, b_a_l, a_a_h, a_a_l, b_b_h, b_b_l; uint32_t a_b_h, a_b_l, b_c_h, b_c_l, a_c_h, a_c_l, c_c_h, c_c_l; uint32_t ci_highXlow_h, ci_highXlow_l, c_a_h, c_a_l, c_b_h, c_b_l; uint32_t h_high_h = (uint32_t)(ghash->h_high >> 32); uint32_t h_high_l = (uint32_t)ghash->h_high; uint32_t h_low_h = (uint32_t)(ghash->h_low >> 32); uint32_t h_low_l = (uint32_t)ghash->h_low; uint32_t h_highXlow_h = h_high_h ^ h_low_h; uint32_t h_highXlow_l = h_high_l ^ h_low_l; uint32_t h_highX_xored = h_highXlow_h ^ h_highXlow_l; for (i = 0; i < count; i++, buf += 16) { ci_low = ghash->x_low ^ get64(buf + 8); ci_high = ghash->x_high ^ get64(buf); ci_low_h = (uint32_t)(ci_low >> 32); ci_low_l = (uint32_t)ci_low; ci_high_h = (uint32_t)(ci_high >> 32); ci_high_l = (uint32_t)ci_high; ci_highXlow_h = ci_high_h ^ ci_low_h; ci_highXlow_l = ci_high_l ^ ci_low_l; /* Do binary mult ghash->X = C * ghash->H (recursive Karatsuba). */ bmul32(ci_high_h, h_high_h, &a_a_h, &a_a_l); bmul32(ci_high_l, h_high_l, &a_b_h, &a_b_l); bmul32(ci_high_h ^ ci_high_l, h_high_h ^ h_high_l, &a_c_h, &a_c_l); a_c_h ^= a_a_h ^ a_b_h; a_c_l ^= a_a_l ^ a_b_l; a_a_l ^= a_c_h; a_b_h ^= a_c_l; /* ci_high * h_high = a_a_h:a_a_l:a_b_h:a_b_l */ bmul32(ci_low_h, h_low_h, &b_a_h, &b_a_l); bmul32(ci_low_l, h_low_l, &b_b_h, &b_b_l); bmul32(ci_low_h ^ ci_low_l, h_low_h ^ h_low_l, &b_c_h, &b_c_l); b_c_h ^= b_a_h ^ b_b_h; b_c_l ^= b_a_l ^ b_b_l; b_a_l ^= b_c_h; b_b_h ^= b_c_l; /* ci_low * h_low = b_a_h:b_a_l:b_b_h:b_b_l */ bmul32(ci_highXlow_h, h_highXlow_h, &c_a_h, &c_a_l); bmul32(ci_highXlow_l, h_highXlow_l, &c_b_h, &c_b_l); bmul32(ci_highXlow_h ^ ci_highXlow_l, h_highX_xored, &c_c_h, &c_c_l); c_c_h ^= c_a_h ^ c_b_h; c_c_l ^= c_a_l ^ c_b_l; c_a_l ^= c_c_h; c_b_h ^= c_c_l; /* (ci_high ^ ci_low) * (h_high ^ h_low) = c_a_h:c_a_l:c_b_h:c_b_l */ c_a_h ^= b_a_h ^ a_a_h; c_a_l ^= b_a_l ^ a_a_l; c_b_h ^= b_b_h ^ a_b_h; c_b_l ^= b_b_l ^ a_b_l; z_high_h = ((uint64_t)a_a_h << 32) | a_a_l; z_high_l = (((uint64_t)a_b_h << 32) | a_b_l) ^ (((uint64_t)c_a_h << 32) | c_a_l); z_low_h = (((uint64_t)b_a_h << 32) | b_a_l) ^ (((uint64_t)c_b_h << 32) | c_b_l); z_low_l = ((uint64_t)b_b_h << 32) | b_b_l; /* Shift one (multiply by x) as gcm spec is stupid. */ z_high_h = z_high_h << 1 | z_high_l >> 63; z_high_l = z_high_l << 1 | z_low_h >> 63; z_low_h = z_low_h << 1 | z_low_l >> 63; z_low_l <<= 1; /* Reduce */ z_low_h ^= (z_low_l << 63) ^ (z_low_l << 62) ^ (z_low_l << 57); z_high_h ^= z_low_h ^ (z_low_h >> 1) ^ (z_low_h >> 2) ^ (z_low_h >> 7); z_high_l ^= z_low_l ^ (z_low_l >> 1) ^ (z_low_l >> 2) ^ (z_low_l >> 7) ^ (z_low_h << 63) ^ (z_low_h << 62) ^ (z_low_h << 57); ghash->x_high = z_high_h; ghash->x_low = z_high_l; } return SECSuccess; } #endif /* HAVE_INT128_SUPPORT */ # 328 "gcm.c" static SECStatus gcm_zeroX(gcmHashContext *ghash) { SECStatus rv = SECSuccess; if (ghash->hw) { rv = gcm_HashZeroX_hw(ghash); } ghash->x_high = ghash->x_low = 0; return rv; } /* * implement GCM GHASH using the freebl GHASH function. The gcm_HashMult * function always takes AES_BLOCK_SIZE lengths of data. gcmHash_Update will * format the data properly. */ SECStatus gcmHash_Update(gcmHashContext *ghash, const unsigned char *buf, unsigned int len) { unsigned int blocks; SECStatus rv; ghash->cLen += (len * PR_BITS_PER_BYTE); /* first deal with the current buffer of data. Try to fill it out so * we can hash it */ if (ghash->bufLen) { unsigned int needed = PR_MIN(len, AES_BLOCK_SIZE - ghash->bufLen); if (needed != 0) { PORT_Memcpy(ghash->buffer + ghash->bufLen, buf, needed); } buf += needed; len -= needed; ghash->bufLen += needed; if (len == 0) { /* didn't add enough to hash the data, nothing more do do */ return SECSuccess; } PORT_Assert(ghash->bufLen == AES_BLOCK_SIZE); /* hash the buffer and clear it */ rv = ghash->ghash_mul(ghash, ghash->buffer, 1); PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE); ghash->bufLen = 0; if (rv != SECSuccess) { return SECFailure; } } /* now hash any full blocks remaining in the data stream */ blocks = len / AES_BLOCK_SIZE; if (blocks) { rv = ghash->ghash_mul(ghash, buf, blocks); if (rv != SECSuccess) { return SECFailure; } buf += blocks * AES_BLOCK_SIZE; len -= blocks * AES_BLOCK_SIZE; } /* save any remainder in the buffer to be hashed with the next call */ if (len != 0) { PORT_Memcpy(ghash->buffer, buf, len); ghash->bufLen = len; } return SECSuccess; } /* * write out any partial blocks zero padded through the GHASH engine, * save the lengths for the final completion of the hash */ static SECStatus gcmHash_Sync(gcmHashContext *ghash) { int i; SECStatus rv; /* copy the previous counter to the upper block */ PORT_Memcpy(ghash->counterBuf, &ghash->counterBuf[GCM_HASH_LEN_LEN], GCM_HASH_LEN_LEN); /* copy the current counter in the lower block */ for (i = 0; i < GCM_HASH_LEN_LEN; i++) { ghash->counterBuf[GCM_HASH_LEN_LEN + i] = (ghash->cLen >> ((GCM_HASH_LEN_LEN - 1 - i) * PR_BITS_PER_BYTE)) & 0xff; } ghash->cLen = 0; /* now zero fill the buffer and hash the last block */ if (ghash->bufLen) { PORT_Memset(ghash->buffer + ghash->bufLen, 0, AES_BLOCK_SIZE - ghash->bufLen); rv = ghash->ghash_mul(ghash, ghash->buffer, 1); PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE); ghash->bufLen = 0; if (rv != SECSuccess) { return SECFailure; } } return SECSuccess; } #define WRITE64(x, bytes) \ (bytes)[0] = (x) >> 56; \ (bytes)[1] = (x) >> 48; \ (bytes)[2] = (x) >> 40; \ (bytes)[3] = (x) >> 32; \ (bytes)[4] = (x) >> 24; \ (bytes)[5] = (x) >> 16; \ (bytes)[6] = (x) >> 8; \ (bytes)[7] = (x); /* * This does the final sync, hashes the lengths, then returns * "T", the hashed output. */ SECStatus gcmHash_Final(gcmHashContext *ghash, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout) { unsigned char T[MAX_BLOCK_SIZE]; SECStatus rv; rv = gcmHash_Sync(ghash); if (rv != SECSuccess) { goto cleanup; } rv = ghash->ghash_mul(ghash, ghash->counterBuf, (GCM_HASH_LEN_LEN * 2) / AES_BLOCK_SIZE); if (rv != SECSuccess) { goto cleanup; } if (ghash->hw) { rv = gcm_HashWrite_hw(ghash, T); if (rv != SECSuccess) { goto cleanup; } } else { WRITE64(ghash->x_low, T + 8); WRITE64(ghash->x_high, T); } if (maxout > AES_BLOCK_SIZE) { maxout = AES_BLOCK_SIZE; } PORT_Memcpy(outbuf, T, maxout); *outlen = maxout; rv = SECSuccess; cleanup: PORT_Memset(T, 0, sizeof(T)); return rv; } SECStatus gcmHash_Reset(gcmHashContext *ghash, const unsigned char *AAD, unsigned int AADLen) { SECStatus rv; // Limit AADLen in accordance with SP800-38D if (sizeof(AADLen) >= 8 && AADLen > (1ULL << 61) - 1) { PORT_SetError(SEC_ERROR_INPUT_LEN); return SECFailure; } ghash->cLen = 0; PORT_Memset(ghash->counterBuf, 0, GCM_HASH_LEN_LEN * 2); ghash->bufLen = 0; rv = gcm_zeroX(ghash); if (rv != SECSuccess) { return rv; } /* now kick things off by hashing the Additional Authenticated Data */ if (AADLen != 0) { rv = gcmHash_Update(ghash, AAD, AADLen); if (rv != SECSuccess) { return SECFailure; } rv = gcmHash_Sync(ghash); if (rv != SECSuccess) { return SECFailure; } } return SECSuccess; } /************************************************************************** * Now implement the GCM using gcmHash and CTR * **************************************************************************/ /* state to handle the full GCM operation (hash and counter) */ struct GCMContextStr { gcmHashContext *ghash_context; CTRContext ctr_context; unsigned long tagBits; unsigned char tagKey[MAX_BLOCK_SIZE]; }; GCMContext * GCM_CreateContext(void *context, freeblCipherFunc cipher, const unsigned char *params) { GCMContext *gcm = NULL; gcmHashContext *ghash = NULL; unsigned char H[MAX_BLOCK_SIZE]; unsigned int tmp; PRBool freeCtr = PR_FALSE; const CK_GCM_PARAMS *gcmParams = (const CK_GCM_PARAMS *)params; CK_AES_CTR_PARAMS ctrParams; SECStatus rv; #ifdef DISABLE_HW_GCM const PRBool sw = PR_TRUE; #else # 546 "gcm.c" const PRBool sw = PR_FALSE; #endif # 548 "gcm.c" if (gcmParams->ulIvLen == 0) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return NULL; } if (gcmParams->ulTagBits != 128 && gcmParams->ulTagBits != 120 && gcmParams->ulTagBits != 112 && gcmParams->ulTagBits != 104 && gcmParams->ulTagBits != 96 && gcmParams->ulTagBits != 64 && gcmParams->ulTagBits != 32) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return NULL; } gcm = PORT_ZNew(GCMContext); if (gcm == NULL) { return NULL; } ghash = PORT_ZNewAligned(gcmHashContext, 16, mem); /* first plug in the ghash context */ gcm->ghash_context = ghash; PORT_Memset(H, 0, AES_BLOCK_SIZE); rv = (*cipher)(context, H, &tmp, AES_BLOCK_SIZE, H, AES_BLOCK_SIZE, AES_BLOCK_SIZE); if (rv != SECSuccess) { goto loser; } rv = gcmHash_InitContext(ghash, H, sw); if (rv != SECSuccess) { goto loser; } /* fill in the Counter context */ ctrParams.ulCounterBits = 32; PORT_Memset(ctrParams.cb, 0, sizeof(ctrParams.cb)); if (gcmParams->ulIvLen == 12) { PORT_Memcpy(ctrParams.cb, gcmParams->pIv, gcmParams->ulIvLen); ctrParams.cb[AES_BLOCK_SIZE - 1] = 1; } else { rv = gcmHash_Update(ghash, gcmParams->pIv, gcmParams->ulIvLen); if (rv != SECSuccess) { goto loser; } rv = gcmHash_Final(ghash, ctrParams.cb, &tmp, AES_BLOCK_SIZE); if (rv != SECSuccess) { goto loser; } } rv = CTR_InitContext(&gcm->ctr_context, context, cipher, (unsigned char *)&ctrParams); if (rv != SECSuccess) { goto loser; } freeCtr = PR_TRUE; /* fill in the gcm structure */ gcm->tagBits = gcmParams->ulTagBits; /* save for final step */ /* calculate the final tag key. NOTE: gcm->tagKey is zero to start with. * if this assumption changes, we would need to explicitly clear it here */ rv = CTR_Update(&gcm->ctr_context, gcm->tagKey, &tmp, AES_BLOCK_SIZE, gcm->tagKey, AES_BLOCK_SIZE, AES_BLOCK_SIZE); if (rv != SECSuccess) { goto loser; } /* finally mix in the AAD data */ rv = gcmHash_Reset(ghash, gcmParams->pAAD, gcmParams->ulAADLen); if (rv != SECSuccess) { goto loser; } return gcm; loser: if (freeCtr) { CTR_DestroyContext(&gcm->ctr_context, PR_FALSE); } if (ghash && ghash->mem) { PORT_Free(ghash->mem); } if (gcm) { PORT_Free(gcm); } return NULL; } void GCM_DestroyContext(GCMContext *gcm, PRBool freeit) { /* these two are statically allocated and will be freed when we free * gcm. call their destroy functions to free up any locally * allocated data (like mp_int's) */ CTR_DestroyContext(&gcm->ctr_context, PR_FALSE); PORT_Free(gcm->ghash_context->mem); PORT_Memset(&gcm->tagBits, 0, sizeof(gcm->tagBits)); PORT_Memset(gcm->tagKey, 0, sizeof(gcm->tagKey)); if (freeit) { PORT_Free(gcm); } } static SECStatus gcm_GetTag(GCMContext *gcm, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout) { unsigned int tagBytes; unsigned int extra; unsigned int i; SECStatus rv; tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE; extra = tagBytes * PR_BITS_PER_BYTE - gcm->tagBits; if (outbuf == NULL) { *outlen = tagBytes; PORT_SetError(SEC_ERROR_OUTPUT_LEN); return SECFailure; } if (maxout < tagBytes) { *outlen = tagBytes; PORT_SetError(SEC_ERROR_OUTPUT_LEN); return SECFailure; } maxout = tagBytes; rv = gcmHash_Final(gcm->ghash_context, outbuf, outlen, maxout); if (rv != SECSuccess) { return SECFailure; } for (i = 0; i < *outlen; i++) { outbuf[i] ^= gcm->tagKey[i]; } /* mask off any extra bits we got */ if (extra) { outbuf[tagBytes - 1] &= ~((1 << extra) - 1); } return SECSuccess; } /* * See The Galois/Counter Mode of Operation, McGrew and Viega. * GCM is basically counter mode with a specific initialization and * built in macing operation. */ SECStatus GCM_EncryptUpdate(GCMContext *gcm, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize) { SECStatus rv; unsigned int tagBytes; unsigned int len; PORT_Assert(blocksize == AES_BLOCK_SIZE); if (blocksize != AES_BLOCK_SIZE) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE; if (UINT_MAX - inlen < tagBytes) { PORT_SetError(SEC_ERROR_INPUT_LEN); return SECFailure; } if (maxout < inlen + tagBytes) { *outlen = inlen + tagBytes; PORT_SetError(SEC_ERROR_OUTPUT_LEN); return SECFailure; } rv = CTR_Update(&gcm->ctr_context, outbuf, outlen, maxout, inbuf, inlen, AES_BLOCK_SIZE); if (rv != SECSuccess) { return SECFailure; } rv = gcmHash_Update(gcm->ghash_context, outbuf, *outlen); if (rv != SECSuccess) { PORT_Memset(outbuf, 0, *outlen); /* clear the output buffer */ *outlen = 0; return SECFailure; } rv = gcm_GetTag(gcm, outbuf + *outlen, &len, maxout - *outlen); if (rv != SECSuccess) { PORT_Memset(outbuf, 0, *outlen); /* clear the output buffer */ *outlen = 0; return SECFailure; }; *outlen += len; return SECSuccess; } /* * See The Galois/Counter Mode of Operation, McGrew and Viega. * GCM is basically counter mode with a specific initialization and * built in macing operation. NOTE: the only difference between Encrypt * and Decrypt is when we calculate the mac. That is because the mac must * always be calculated on the cipher text, not the plain text, so for * encrypt, we do the CTR update first and for decrypt we do the mac first. */ SECStatus GCM_DecryptUpdate(GCMContext *gcm, unsigned char *outbuf, unsigned int *outlen, unsigned int maxout, const unsigned char *inbuf, unsigned int inlen, unsigned int blocksize) { SECStatus rv; unsigned int tagBytes; unsigned char tag[MAX_BLOCK_SIZE]; const unsigned char *intag; unsigned int len; PORT_Assert(blocksize == AES_BLOCK_SIZE); if (blocksize != AES_BLOCK_SIZE) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE; /* get the authentication block */ if (inlen < tagBytes) { PORT_SetError(SEC_ERROR_INPUT_LEN); return SECFailure; } inlen -= tagBytes; intag = inbuf + inlen; /* verify the block */ rv = gcmHash_Update(gcm->ghash_context, inbuf, inlen); if (rv != SECSuccess) { return SECFailure; } rv = gcm_GetTag(gcm, tag, &len, AES_BLOCK_SIZE); if (rv != SECSuccess) { return SECFailure; } /* Don't decrypt if we can't authenticate the encrypted data! * This assumes that if tagBits is not a multiple of 8, intag will * preserve the masked off missing bits. */ if (NSS_SecureMemcmp(tag, intag, tagBytes) != 0) { /* force a CKR_ENCRYPTED_DATA_INVALID error at in softoken */ PORT_SetError(SEC_ERROR_BAD_DATA); PORT_Memset(tag, 0, sizeof(tag)); return SECFailure; } PORT_Memset(tag, 0, sizeof(tag)); /* finish the decryption */ return CTR_Update(&gcm->ctr_context, outbuf, outlen, maxout, inbuf, inlen, AES_BLOCK_SIZE); }