added new callback to set frame entity
[libfirm] / ir / be / mips / bearch_mips_t.h
1 #ifndef _BEARCH_mips_T_H_
2 #define _BEARCH_mips_T_H_
3
4 #include "debug.h"
5 #include "irgopt.h"
6 #include "bearch_mips.h"
7 #include "mips_nodes_attr.h"
8 #include "../be.h"
9 #include "set.h"
10
11 typedef struct _mips_isa_t mips_isa_t;
12
13 struct _mips_code_gen_t {
14         const arch_code_generator_if_t *impl;           /**< implementation */
15         ir_graph                       *irg;            /**< current irg */
16         const arch_env_t               *arch_env;       /**< the arch env */
17         set                            *reg_set;        /**< set to memorize registers for FIRM nodes (e.g. phi) */
18         int                             emit_decls;     /**< flag indicating if decls were already emitted */
19         mips_isa_t                     *isa;            /**< the isa instance */
20         const be_irg_t                 *birg;           /**< The be-irg (contains additional information about the irg) */
21         ir_node                        **bl_list;               /**< The block schedule list. */
22         survive_dce_t                              *bl_list_sdce;       /**< survive dce environment for the block schedule list */
23         DEBUG_ONLY(firm_dbg_module_t   *mod;)           /**< debugging module */
24 };
25
26 struct _mips_isa_t {
27         const arch_isa_if_t   *impl;
28         const arch_register_t *sp;            /**< The stack pointer register. */
29         const arch_register_t *fp;            /**< The base pointer register. */
30         const int              stack_dir;     /**< -1 for decreasing, 1 for increasing. */
31         int                    num_codegens;
32   FILE                  *out;           /**< output file */
33 };
34
35 typedef struct _mips_irn_ops_t {
36         const arch_irn_ops_if_t *impl;
37         mips_code_gen_t     *cg;
38 } mips_irn_ops_t;
39
40
41 /* this is a struct to minimize the number of parameters
42    for transformation walker */
43 typedef struct _mips_transform_env_t {
44         dbg_info          *dbg;      /**< The node debug info */
45         ir_graph          *irg;      /**< The irg, the node should be created in */
46         ir_node           *block;    /**< The block, the node should belong to */
47         ir_node           *irn;      /**< The irn, to be transformed */
48         ir_mode           *mode;     /**< The mode of the irn */
49         mips_code_gen_t   *cg;       /**< The code generator */
50         DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */
51 } mips_transform_env_t;
52
53 ir_node *mips_new_NoReg(mips_code_gen_t *cg);
54
55 #endif /* _BEARCH_mips_T_H_ */