cosmopolitan/libc/integral/lp64arg.inc

29 lines
775 B
PHP
Raw Normal View History

/* variadic arguments for chibicc */
/* <sync libc/runtime/valist.c> */
struct __va_list {
uint32_t gp_offset;
uint32_t fp_offset;
void *overflow_arg_area;
void *reg_save_area;
};
/* </sync libc/runtime/valist.c> */
void *__va_arg(struct __va_list *, size_t, unsigned, unsigned);
2020-12-01 11:43:40 +00:00
#define __GNUC_VA_LIST 1
#define __gnuc_va_list va_list
2020-12-01 11:43:40 +00:00
#define va_end(AP)
#define va_copy(DST, SRC) ((DST)[0] = (SRC)[0])
2020-12-28 01:05:03 +00:00
#define va_start(AP, LAST) \
do { \
*(AP) = *(struct __va_list *)__va_area__; \
2020-12-01 11:43:40 +00:00
} while (0)
#define va_arg(AP, TYPE) \
(*(TYPE *)__va_arg(AP, sizeof(TYPE), _Alignof(TYPE), \
__builtin_reg_class(TYPE)))
2020-12-01 11:43:40 +00:00
2020-12-28 01:05:03 +00:00
typedef struct __va_list va_list[1];