comparison gcc/config/aarch64/arm_acle.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* AArch64 Non-NEON ACLE intrinsics include file. 1 /* AArch64 Non-NEON ACLE intrinsics include file.
2 2
3 Copyright (C) 2014-2018 Free Software Foundation, Inc. 3 Copyright (C) 2014-2020 Free Software Foundation, Inc.
4 Contributed by ARM Ltd. 4 Contributed by ARM Ltd.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it 8 GCC is free software; you can redistribute it and/or modify it
27 #ifndef _GCC_ARM_ACLE_H 27 #ifndef _GCC_ARM_ACLE_H
28 #define _GCC_ARM_ACLE_H 28 #define _GCC_ARM_ACLE_H
29 29
30 #include <stdint.h> 30 #include <stdint.h>
31 31
32 #pragma GCC push_options
33
34 #pragma GCC target ("+nothing+crc")
35
36 #ifdef __cplusplus 32 #ifdef __cplusplus
37 extern "C" { 33 extern "C" {
38 #endif 34 #endif
39 35
36 #pragma GCC push_options
37 #pragma GCC target ("arch=armv8.3-a")
38 __extension__ static __inline int32_t __attribute__ ((__always_inline__))
39 __jcvt (double __a)
40 {
41 return __builtin_aarch64_jcvtzs (__a);
42 }
43
44 #pragma GCC pop_options
45
46 #pragma GCC push_options
47 #pragma GCC target ("arch=armv8.5-a")
48 __extension__ static __inline float __attribute__ ((__always_inline__))
49 __rint32zf (float __a)
50 {
51 return __builtin_aarch64_frint32zsf (__a);
52 }
53
54 __extension__ static __inline double __attribute__ ((__always_inline__))
55 __rint32z (double __a)
56 {
57 return __builtin_aarch64_frint32zdf (__a);
58 }
59
60 __extension__ static __inline float __attribute__ ((__always_inline__))
61 __rint64zf (float __a)
62 {
63 return __builtin_aarch64_frint64zsf (__a);
64 }
65
66 __extension__ static __inline double __attribute__ ((__always_inline__))
67 __rint64z (double __a)
68 {
69 return __builtin_aarch64_frint64zdf (__a);
70 }
71
72 __extension__ static __inline float __attribute__ ((__always_inline__))
73 __rint32xf (float __a)
74 {
75 return __builtin_aarch64_frint32xsf (__a);
76 }
77
78 __extension__ static __inline double __attribute__ ((__always_inline__))
79 __rint32x (double __a)
80 {
81 return __builtin_aarch64_frint32xdf (__a);
82 }
83
84 __extension__ static __inline float __attribute__ ((__always_inline__))
85 __rint64xf (float __a)
86 {
87 return __builtin_aarch64_frint64xsf (__a);
88 }
89
90 __extension__ static __inline double __attribute__ ((__always_inline__))
91 __rint64x (double __a)
92 {
93 return __builtin_aarch64_frint64xdf (__a);
94 }
95
96
97 #pragma GCC pop_options
98
99 #pragma GCC push_options
100
101 #pragma GCC target ("+nothing+crc")
102
40 __extension__ static __inline uint32_t __attribute__ ((__always_inline__)) 103 __extension__ static __inline uint32_t __attribute__ ((__always_inline__))
41 __crc32b (uint32_t __a, uint8_t __b) 104 __crc32b (uint32_t __a, uint8_t __b)
42 { 105 {
43 return __builtin_aarch64_crc32b (__a, __b); 106 return __builtin_aarch64_crc32b (__a, __b);
44 } 107 }
83 __crc32d (uint32_t __a, uint64_t __b) 146 __crc32d (uint32_t __a, uint64_t __b)
84 { 147 {
85 return __builtin_aarch64_crc32x (__a, __b); 148 return __builtin_aarch64_crc32x (__a, __b);
86 } 149 }
87 150
151 #pragma GCC pop_options
152
153 #ifdef __ARM_FEATURE_TME
154 #pragma GCC push_options
155 #pragma GCC target ("+nothing+tme")
156
157 #define _TMFAILURE_REASON 0x00007fffu
158 #define _TMFAILURE_RTRY 0x00008000u
159 #define _TMFAILURE_CNCL 0x00010000u
160 #define _TMFAILURE_MEM 0x00020000u
161 #define _TMFAILURE_IMP 0x00040000u
162 #define _TMFAILURE_ERR 0x00080000u
163 #define _TMFAILURE_SIZE 0x00100000u
164 #define _TMFAILURE_NEST 0x00200000u
165 #define _TMFAILURE_DBG 0x00400000u
166 #define _TMFAILURE_INT 0x00800000u
167 #define _TMFAILURE_TRIVIAL 0x01000000u
168
169 __extension__ static __inline uint64_t __attribute__ ((__always_inline__))
170 __tstart (void)
171 {
172 return __builtin_aarch64_tstart ();
173 }
174
175 __extension__ static __inline void __attribute__ ((__always_inline__))
176 __tcommit (void)
177 {
178 __builtin_aarch64_tcommit ();
179 }
180
181 __extension__ static __inline void __attribute__ ((__always_inline__))
182 __tcancel (const uint64_t __reason)
183 {
184 __builtin_aarch64_tcancel (__reason);
185 }
186
187 __extension__ static __inline uint64_t __attribute__ ((__always_inline__))
188 __ttest (void)
189 {
190 return __builtin_aarch64_ttest ();
191 }
192
193 #pragma GCC pop_options
194 #endif
195
196 #pragma GCC push_options
197 #pragma GCC target ("+nothing+rng")
198 __extension__ static __inline int __attribute__ ((__always_inline__))
199 __rndr (uint64_t *__res)
200 {
201 return __builtin_aarch64_rndr (__res);
202 }
203
204 __extension__ static __inline int __attribute__ ((__always_inline__))
205 __rndrrs (uint64_t *__res)
206 {
207 return __builtin_aarch64_rndrrs (__res);
208 }
209
210 #pragma GCC pop_options
211
212 #pragma GCC push_options
213 #pragma GCC target ("arch=armv8.5-a+memtag")
214
215 #define __arm_mte_create_random_tag(__ptr, __u64_mask) \
216 __builtin_aarch64_memtag_irg(__ptr, __u64_mask)
217
218 #define __arm_mte_exclude_tag(__ptr, __u64_excluded) \
219 __builtin_aarch64_memtag_gmi(__ptr, __u64_excluded)
220
221 #define __arm_mte_ptrdiff(__ptr_a, __ptr_b) \
222 __builtin_aarch64_memtag_subp(__ptr_a, __ptr_b)
223
224 #define __arm_mte_increment_tag(__ptr, __u_offset) \
225 __builtin_aarch64_memtag_inc_tag(__ptr, __u_offset)
226
227 #define __arm_mte_set_tag(__tagged_address) \
228 __builtin_aarch64_memtag_set_tag(__tagged_address)
229
230 #define __arm_mte_get_tag(__address) \
231 __builtin_aarch64_memtag_get_tag(__address)
232
233 #pragma GCC pop_options
234
88 #ifdef __cplusplus 235 #ifdef __cplusplus
89 } 236 }
90 #endif 237 #endif
91 238
92 #pragma GCC pop_options 239 #endif
93
94 #endif