bevarargs.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * This file is part of libFirm.
 * Copyright (C) 2015 University of Karlsruhe.
 */

/**
 * @file
 * @brief   Default (pointer-based) implementation of variadic functions
 * @author  Andreas Fried
 */

#ifndef FIRM_BE_BEVARARGS_H
#define FIRM_BE_BEVARARGS_H

15
#include "be.h"
16 17
#include "firm_types.h"

18 19 20 21 22 23 24 25 26 27 28
/**
 * Default implementation to lower a va_arg node.
 *
 * This implementation assumes that all arguments except compound types are
 * stored on the stack and that the va_list value points to the next variadic
 * argument.  For compound types a pointer to the object is stored on the stack.
 *
 * @param node A Builtin node with kind ir_bk_va_arg to be lowered
 */
void be_default_lower_va_arg_compound_ptr(ir_node *node);

29 30 31 32 33 34 35 36 37
/**
 * Default implementation to lower a va_arg node.
 *
 * This implementation assumes that all arguments are stored on the
 * stack and that the va_list value points to the next variadic
 * argument.
 *
 * @param node A Builtin node with kind ir_bk_va_arg to be lowered
 */
38
void be_default_lower_va_arg_compound_val(ir_node *node);
39

40 41
void be_set_va_list_type_pointer(backend_params *p);

42
#endif