Software APIs
stdarg.h
Go to the documentation of this file.
1 // Copyright lowRISC contributors.
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_LIB_BASE_FREESTANDING_STDARG_H_
6 #define OPENTITAN_SW_DEVICE_LIB_BASE_FREESTANDING_STDARG_H_
7 
8 /**
9  * @file
10  * @brief C library Variable arguments (Freestanding)
11  *
12  * This header implements the stdarg.h standard header, as required by C11 S4p6.
13  * This header is specified in detail in S7.16.
14  *
15  * The compiler intrinsics below are cribbed from
16  * https://clang.llvm.org/doxygen/stdarg_8h_source.html
17  */
18 
19 typedef __builtin_va_list va_list;
20 #define va_start(ap, param) \
21  __builtin_va_start(ap, param) /**< @hideinitializer */
22 #define va_end(ap) __builtin_va_end(ap) /**< @hideinitializer */
23 #define va_arg(ap, type) __builtin_va_arg(ap, type) /**< @hideinitializer */
24 #define va_copy(dst, src) __builtin_va_copy(dst, src) /**< @hideinitializer */
25 
26 #endif // OPENTITAN_SW_DEVICE_LIB_BASE_FREESTANDING_STDARG_H_