comparison gcc/config/arm/arm_cmse.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* ARMv8-M Secure Extensions intrinsics include file. 1 /* ARMv8-M Secure Extensions intrinsics include file.
2 2
3 Copyright (C) 2015-2017 Free Software Foundation, Inc. 3 Copyright (C) 2015-2018 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
33 #endif 33 #endif
34 34
35 #if __ARM_FEATURE_CMSE & 1 35 #if __ARM_FEATURE_CMSE & 1
36 36
37 #include <stddef.h> 37 #include <stddef.h>
38 #include <stdint.h>
39 38
40 #ifdef __ARM_BIG_ENDIAN 39 #ifdef __ARM_BIG_ENDIAN
41 40
42 typedef union { 41 typedef union {
43 struct cmse_address_info { 42 struct cmse_address_info {
172 171
173 #define CMSE_AU_NONSECURE 2 172 #define CMSE_AU_NONSECURE 2
174 #define CMSE_MPU_NONSECURE 16 173 #define CMSE_MPU_NONSECURE 16
175 #define CMSE_NONSECURE 18 174 #define CMSE_NONSECURE 18
176 175
177 #define cmse_nsfptr_create(p) ((typeof ((p))) ((intptr_t) (p) & ~1)) 176 #define cmse_nsfptr_create(p) ((__typeof__ ((p))) ((__INTPTR_TYPE__) (p) & ~1))
178 177
179 #define cmse_is_nsfptr(p) (!((intptr_t) (p) & 1)) 178 #define cmse_is_nsfptr(p) (!((__INTPTR_TYPE__) (p) & 1))
180 179
181 #endif /* __ARM_FEATURE_CMSE & 2 */ 180 #endif /* __ARM_FEATURE_CMSE & 2 */
182 181
183 #define CMSE_MPU_UNPRIV 4 182 #define CMSE_MPU_UNPRIV 4
184 #define CMSE_MPU_READWRITE 1 183 #define CMSE_MPU_READWRITE 1
186 185
187 __extension__ void * 186 __extension__ void *
188 cmse_check_address_range (void *, size_t, int); 187 cmse_check_address_range (void *, size_t, int);
189 188
190 #define cmse_check_pointed_object(p, f) \ 189 #define cmse_check_pointed_object(p, f) \
191 ((typeof ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f))) 190 ((__typeof__ ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f)))
192 191
193 #endif /* __ARM_FEATURE_CMSE & 1 */ 192 #endif /* __ARM_FEATURE_CMSE & 1 */
194 193
195 #ifdef __cplusplus 194 #ifdef __cplusplus
196 } 195 }