]>
Commit | Line | Data |
---|---|---|
582e2e43 KT |
1 | /* ARM Non-NEON ACLE intrinsics include file. |
2 | ||
cbe34bb5 | 3 | Copyright (C) 2013-2017 Free Software Foundation, Inc. |
582e2e43 KT |
4 | Contributed by ARM Ltd. |
5 | ||
6 | This file is part of GCC. | |
7 | ||
8 | GCC is free software; you can redistribute it and/or modify it | |
9 | under the terms of the GNU General Public License as published | |
10 | by the Free Software Foundation; either version 3, or (at your | |
11 | option) any later version. | |
12 | ||
13 | GCC is distributed in the hope that it will be useful, but WITHOUT | |
14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
15 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
16 | License for more details. | |
17 | ||
18 | Under Section 7 of GPL version 3, you are granted additional | |
19 | permissions described in the GCC Runtime Library Exception, version | |
20 | 3.1, as published by the Free Software Foundation. | |
21 | ||
22 | You should have received a copy of the GNU General Public License and | |
23 | a copy of the GCC Runtime Library Exception along with this program; | |
24 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
25 | <http://www.gnu.org/licenses/>. */ | |
26 | ||
27 | #ifndef _GCC_ARM_ACLE_H | |
28 | #define _GCC_ARM_ACLE_H | |
29 | ||
30 | #include <stdint.h> | |
31 | #ifdef __cplusplus | |
32 | extern "C" { | |
33 | #endif | |
34 | ||
d57daa0c AV |
35 | #if (!__thumb__ || __thumb2__) && __ARM_ARCH >= 4 |
36 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
37 | __arm_cdp (const unsigned int __coproc, const unsigned int __opc1, | |
38 | const unsigned int __CRd, const unsigned int __CRn, | |
39 | const unsigned int __CRm, const unsigned int __opc2) | |
40 | { | |
41 | return __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); | |
42 | } | |
43 | ||
3811581f AV |
44 | __extension__ static __inline void __attribute__ ((__always_inline__)) |
45 | __arm_ldc (const unsigned int __coproc, const unsigned int __CRd, | |
46 | const void * __p) | |
47 | { | |
48 | return __builtin_arm_ldc (__coproc, __CRd, __p); | |
49 | } | |
50 | ||
51 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
52 | __arm_ldcl (const unsigned int __coproc, const unsigned int __CRd, | |
53 | const void * __p) | |
54 | { | |
55 | return __builtin_arm_ldcl (__coproc, __CRd, __p); | |
56 | } | |
57 | ||
58 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
59 | __arm_stc (const unsigned int __coproc, const unsigned int __CRd, | |
60 | void * __p) | |
61 | { | |
62 | return __builtin_arm_stc (__coproc, __CRd, __p); | |
63 | } | |
64 | ||
65 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
66 | __arm_stcl (const unsigned int __coproc, const unsigned int __CRd, | |
67 | void * __p) | |
68 | { | |
69 | return __builtin_arm_stcl (__coproc, __CRd, __p); | |
70 | } | |
d57daa0c AV |
71 | #if __ARM_ARCH >= 5 |
72 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
73 | __arm_cdp2 (const unsigned int __coproc, const unsigned int __opc1, | |
74 | const unsigned int __CRd, const unsigned int __CRn, | |
75 | const unsigned int __CRm, const unsigned int __opc2) | |
76 | { | |
77 | return __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); | |
78 | } | |
3811581f AV |
79 | |
80 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
81 | __arm_ldc2 (const unsigned int __coproc, const unsigned int __CRd, | |
82 | const void * __p) | |
83 | { | |
84 | return __builtin_arm_ldc2 (__coproc, __CRd, __p); | |
85 | } | |
86 | ||
87 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
88 | __arm_ldc2l (const unsigned int __coproc, const unsigned int __CRd, | |
89 | const void * __p) | |
90 | { | |
91 | return __builtin_arm_ldc2l (__coproc, __CRd, __p); | |
92 | } | |
93 | ||
94 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
95 | __arm_stc2 (const unsigned int __coproc, const unsigned int __CRd, | |
96 | void * __p) | |
97 | { | |
98 | return __builtin_arm_stc2 (__coproc, __CRd, __p); | |
99 | } | |
100 | ||
101 | __extension__ static __inline void __attribute__ ((__always_inline__)) | |
102 | __arm_stc2l (const unsigned int __coproc, const unsigned int __CRd, | |
103 | void * __p) | |
104 | { | |
105 | return __builtin_arm_stc2l (__coproc, __CRd, __p); | |
106 | } | |
d57daa0c AV |
107 | #endif /* __ARM_ARCH >= 5. */ |
108 | #endif /* (!__thumb__ || __thumb2__) && __ARM_ARCH >= 4. */ | |
109 | ||
582e2e43 KT |
110 | #ifdef __ARM_FEATURE_CRC32 |
111 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 112 | __crc32b (uint32_t __a, uint8_t __b) |
582e2e43 | 113 | { |
706f749a | 114 | return __builtin_arm_crc32b (__a, __b); |
582e2e43 KT |
115 | } |
116 | ||
117 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 118 | __crc32h (uint32_t __a, uint16_t __b) |
582e2e43 | 119 | { |
706f749a | 120 | return __builtin_arm_crc32h (__a, __b); |
582e2e43 KT |
121 | } |
122 | ||
123 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 124 | __crc32w (uint32_t __a, uint32_t __b) |
582e2e43 | 125 | { |
706f749a | 126 | return __builtin_arm_crc32w (__a, __b); |
582e2e43 KT |
127 | } |
128 | ||
129 | #ifdef __ARM_32BIT_STATE | |
130 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 131 | __crc32d (uint32_t __a, uint64_t __b) |
582e2e43 | 132 | { |
706f749a | 133 | uint32_t __d; |
582e2e43 | 134 | |
706f749a KT |
135 | __d = __crc32w (__crc32w (__a, __b & 0xffffffffULL), __b >> 32); |
136 | return __d; | |
582e2e43 KT |
137 | } |
138 | #endif | |
139 | ||
140 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 141 | __crc32cb (uint32_t __a, uint8_t __b) |
582e2e43 | 142 | { |
706f749a | 143 | return __builtin_arm_crc32cb (__a, __b); |
582e2e43 KT |
144 | } |
145 | ||
146 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 147 | __crc32ch (uint32_t __a, uint16_t __b) |
582e2e43 | 148 | { |
706f749a | 149 | return __builtin_arm_crc32ch (__a, __b); |
582e2e43 KT |
150 | } |
151 | ||
152 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 153 | __crc32cw (uint32_t __a, uint32_t __b) |
582e2e43 | 154 | { |
706f749a | 155 | return __builtin_arm_crc32cw (__a, __b); |
582e2e43 KT |
156 | } |
157 | ||
158 | #ifdef __ARM_32BIT_STATE | |
159 | __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) | |
706f749a | 160 | __crc32cd (uint32_t __a, uint64_t __b) |
582e2e43 | 161 | { |
706f749a | 162 | uint32_t __d; |
582e2e43 | 163 | |
706f749a KT |
164 | __d = __crc32cw (__crc32cw (__a, __b & 0xffffffffULL), __b >> 32); |
165 | return __d; | |
582e2e43 KT |
166 | } |
167 | #endif | |
168 | ||
169 | #endif | |
170 | ||
171 | #ifdef __cplusplus | |
172 | } | |
173 | #endif | |
174 | ||
175 | #endif |