blob: 86c409ce1200e1ef0f2002abd32ca70e3f67fee0 [file] [log] [blame]
Julius Werner2a231e32019-05-28 21:03:58 -07001/*
2 * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef ARM_TRUSTED_FIRMWARE_EXPORT_LIB_UTILS_DEF_EXP_H
8#define ARM_TRUSTED_FIRMWARE_EXPORT_LIB_UTILS_DEF_EXP_H
9
10/* EXPORT HEADER -- See include/export/README for details! -- EXPORT HEADER */
11
12/*
13 * For those constants to be shared between C and other sources, apply a 'U',
14 * 'UL', 'ULL', 'L' or 'LL' suffix to the argument only in C, to avoid
15 * undefined or unintended behaviour.
16 *
17 * The GNU assembler and linker do not support these suffixes (it causes the
18 * build process to fail) therefore the suffix is omitted when used in linker
19 * scripts and assembler files.
20*/
21#if defined(__ASSEMBLER__)
22# define U(_x) (_x)
23# define UL(_x) (_x)
24# define ULL(_x) (_x)
25# define L(_x) (_x)
26# define LL(_x) (_x)
27#else
28# define U(_x) (_x##U)
29# define UL(_x) (_x##UL)
30# define ULL(_x) (_x##ULL)
31# define L(_x) (_x##L)
32# define LL(_x) (_x##LL)
33#endif
34
35#endif /* ARM_TRUSTED_FIRMWARE_EXPORT_LIB_UTILS_DEF_EXP_H */