]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/cc_config.h
5 * Created by Michael Brouwer on 10/18/10.
6 * Copyright 2010,2011 Apple Inc. All rights reserved.
9 #ifndef _CORECRYPTO_CC_CONFIG_H_
10 #define _CORECRYPTO_CC_CONFIG_H_
12 #if !defined(CCN_UNIT_SIZE)
13 #if defined(__x86_64__)
14 #define CCN_UNIT_SIZE 8
15 #elif defined(__arm__) || defined(__i386__)
16 #define CCN_UNIT_SIZE 4
18 #define CCN_UNIT_SIZE 2
20 #endif /* !defined(CCN_UNIT_SIZE) */
22 /* No dynamic linking allowed in L4, e.g. avoid nonlazy symbols */
23 /* For corecrypto kext, CC_STATIC should be 0 */
25 #if defined(__x86_64__) || defined(__i386__)
27 /* These assembly routines only work for a single CCN_UNIT_SIZE. */
28 #if (defined(__x86_64__) && CCN_UNIT_SIZE == 8) || (defined(__i386__) && CCN_UNIT_SIZE == 4)
38 #define CCN_ADDMUL1_ASM 0
39 #define CCN_MUL1_ASM 0
41 #define CCN_ADD1_ASM 0
42 #define CCN_SUB1_ASM 0
47 #define CCN_USE_BUILTIN_CLZ 0
48 #define CCSHA1_VNG_INTEL 1
49 #define CCSHA2_VNG_INTEL 1
50 #define CCSHA1_VNG_ARMV7NEON 0
51 #define CCSHA2_VNG_ARMV7NEON 0
58 #define CCN_ADDMUL1_ASM 0
59 #define CCN_MUL1_ASM 0
61 #define CCN_ADD1_ASM 0
62 #define CCN_SUB1_ASM 0
67 #define CCN_USE_BUILTIN_CLZ 0
68 #define CCSHA1_VNG_INTEL 0
69 #define CCSHA2_VNG_INTEL 0
70 #define CCSHA1_VNG_ARMV7NEON 0
71 #define CCSHA2_VNG_ARMV7NEON 0
73 #endif /* !defined(__i386__) */
75 #define CCN_N_INLINE 0
76 #define CCN_CMP_INLINE 0
78 #define CC_INLINE static inline
81 #define CC_NORETURN __attribute__((__noreturn__))
82 #define CC_NOTHROW __attribute__((__nothrow__))
83 #define CC_NONNULL(N) __attribute__((__nonnull__ N))
84 #define CC_NONNULL1 __attribute__((__nonnull__(1)))
85 #define CC_NONNULL2 __attribute__((__nonnull__(2)))
86 #define CC_NONNULL3 __attribute__((__nonnull__(3)))
87 #define CC_NONNULL4 __attribute__((__nonnull__(4)))
88 #define CC_NONNULL5 __attribute__((__nonnull__(5)))
89 #define CC_NONNULL6 __attribute__((__nonnull__(6)))
90 #define CC_NONNULL7 __attribute__((__nonnull__(7)))
91 #define CC_NONNULL_ALL __attribute__((__nonnull__))
92 #define CC_SENTINEL __attribute__((__sentinel__))
93 #define CC_CONST __attribute__((__const__))
94 #define CC_PURE __attribute__((__pure__))
95 #define CC_WARN_RESULT __attribute__((__warn_unused_result__))
96 #define CC_MALLOC __attribute__((__malloc__))
97 #define CC_UNUSED __attribute__((unused))
118 #define CC_NONNULL_ALL
126 #define CC_WARN_RESULT
129 #endif /* !__GNUC__ */
131 #endif /* _CORECRYPTO_CC_CONFIG_H_ */