becopyopt: Remove the unnecessary attribute name from struct copy_opt_t.
[libfirm] / ir / be / arm / arm_cconv.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   support functions for calling conventions
9  * @author  Matthias Braun
10  */
11 #ifndef FIRM_BE_ARM_ARM_CCONV_H
12 #define FIRM_BE_ARM_ARM_CCONV_H
13
14 #include "firm_types.h"
15 #include "be_types.h"
16 #include "gen_arm_regalloc_if.h"
17
18 /** information about a single parameter or result */
19 typedef struct reg_or_stackslot_t
20 {
21         const arch_register_t *reg0;   /**< if != NULL, the first register used for this parameter. */
22         const arch_register_t *reg1;   /**< if != NULL, the second register used. */
23         ir_type               *type;   /**< indicates that an entity of the specific
24                                                                             type is needed */
25         unsigned               offset; /**< if transmitted via stack, the offset for this parameter. */
26         ir_entity             *entity; /**< entity in frame type */
27 } reg_or_stackslot_t;
28
29 /** The calling convention info for one call site. */
30 typedef struct calling_convention_t
31 {
32         reg_or_stackslot_t *parameters;        /**< parameter info. */
33         unsigned            param_stack_size;  /**< needed stack size for parameters */
34         unsigned            n_reg_params;
35         reg_or_stackslot_t *results;           /**< result info. */
36 } calling_convention_t;
37
38 /**
39  * determine how function parameters and return values are passed.
40  * Decides what goes to register or to stack and what stack offsets/
41  * datatypes are used.
42  */
43 calling_convention_t *arm_decide_calling_convention(const ir_graph *irg,
44                                                     ir_type *function_type);
45
46 /**
47  * free memory used by a calling_convention_t
48  */
49 void arm_free_calling_convention(calling_convention_t *cconv);
50
51 #endif