libmetal
compiler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*
8  * @file gcc/compiler.h
9  * @brief GCC specific primitives for libmetal.
10  */
11 
12 #ifndef __METAL_GCC_COMPILER__H__
13 #define __METAL_GCC_COMPILER__H__
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #define restrict __restrict__
20 #define metal_align(n) __attribute__((aligned(n)))
21 #define metal_weak __attribute__((weak))
22 
23 #define METAL_PACKED_BEGIN
24 #define METAL_PACKED_END __attribute__((__packed__))
25 
26 #ifdef __cplusplus
27 }
28 #endif
29 
30 #endif /* __METAL_GCC_COMPILER__H__ */