1 #ifndef _BEARCH_TEMPLATE_T_H_
2 #define _BEARCH_TEMPLATE_T_H_
5 #include "bearch_TEMPLATE.h"
6 #include "TEMPLATE_nodes_attr.h"
9 typedef struct _TEMPLATE_code_gen_t {
10 const arch_code_generator_if_t *impl; /* implementation */
11 ir_graph *irg; /* current irg */
12 FILE *out; /* output file */
13 const arch_env_t *arch_env; /* the arch env */
14 set *reg_set; /* set to memorize registers for FIRM nodes (e.g. phi) */
15 firm_dbg_module_t *mod; /* debugging module */
16 int emit_decls; /* flag indicating if decls were already emitted */
17 const be_irg_t *birg; /* The be-irg (contains additional information about the irg) */
18 } TEMPLATE_code_gen_t;
21 typedef struct _TEMPLATE_isa_t {
22 const arch_isa_if_t *impl;
23 const arch_register_t *sp; /** The stack pointer register. */
24 const arch_register_t *bp; /** The base pointer register. */
25 const int stack_dir; /** -1 for decreasing, 1 for increasing. */
30 typedef struct _TEMPLATE_irn_ops_t {
31 const arch_irn_ops_if_t *impl;
32 TEMPLATE_code_gen_t *cg;
36 /* this is a struct to minimize the number of parameters
37 for transformation walker */
38 typedef struct _TEMPLATE_transform_env_t {
39 firm_dbg_module_t *mod; /**< The firm debugger */
40 dbg_info *dbg; /**< The node debug info */
41 ir_graph *irg; /**< The irg, the node should be created in */
42 ir_node *block; /**< The block, the node should belong to */
43 ir_node *irn; /**< The irn, to be transformed */
44 ir_mode *mode; /**< The mode of the irn */
45 } TEMPLATE_transform_env_t;
48 #endif /* _BEARCH_TEMPLATE_T_H_ */