Julius Werner | 2a231e3 | 2019-05-28 21:03:58 -0700 | [diff] [blame] | 1 | /* |
Govindraj Raja | eee28e7 | 2023-08-01 15:52:40 -0500 | [diff] [blame] | 2 | * Copyright (c) 2016-2019, Arm Limited and Contributors. All rights reserved. |
Julius Werner | 2a231e3 | 2019-05-28 21:03:58 -0700 | [diff] [blame] | 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 |
Deepika Bhavnani | 4287c0c | 2019-12-13 10:23:18 -0600 | [diff] [blame] | 28 | # define U_(_x) (_x##U) |
| 29 | # define U(_x) U_(_x) |
Akshay Belsare | 3a4bbb8 | 2023-06-08 10:39:08 +0530 | [diff] [blame] | 30 | # define UL_(_x) (_x##UL) |
| 31 | # define UL(_x) UL_(_x) |
| 32 | # define ULL_(_x) (_x##ULL) |
| 33 | # define ULL(_x) ULL_(_x) |
| 34 | # define L_(_x) (_x##L) |
| 35 | # define L(_x) L_(_x) |
| 36 | # define LL_(_x) (_x##LL) |
| 37 | # define LL(_x) LL_(_x) |
Deepika Bhavnani | 4287c0c | 2019-12-13 10:23:18 -0600 | [diff] [blame] | 38 | |
Julius Werner | 2a231e3 | 2019-05-28 21:03:58 -0700 | [diff] [blame] | 39 | #endif |
| 40 | |
| 41 | #endif /* ARM_TRUSTED_FIRMWARE_EXPORT_LIB_UTILS_DEF_EXP_H */ |