1 #ifndef _BEARCH_IA32_T_H_
2 #define _BEARCH_IA32_T_H_
5 #include "bearch_ia32.h"
6 #include "ia32_nodes_attr.h"
10 typedef struct _ia32_code_gen_t {
11 const arch_code_generator_if_t *impl; /**< implementation */
12 ir_graph *irg; /**< current irg */
13 FILE *out; /**< output file */
14 const arch_env_t *arch_env; /**< the arch env */
15 set *reg_set; /**< set to memorize registers for non-ia32 nodes (e.g. phi nodes) */
16 firm_dbg_module_t *mod; /**< debugging module */
17 int emit_decls; /**< flag indicating if decls were already emitted */
18 int has_alloca; /**< indicates whether the irg contains an alloca or not */
19 const ia32_register_req_t **reg_param_req; /**< hold the requirements for the reg param nodes */
20 pmap *types; /**< A map of modes to primitive types */
21 pmap *tv_ent; /**< A map of entities that store tarvals */
22 ir_node *noreg_gp; /**< Holds the unique per irg GP NoReg node */
23 ir_node *noreg_fp; /**< Holds the unique per irg FP NoReg node */
26 typedef struct _ia32_isa_t {
27 const arch_isa_if_t *impl;
28 const arch_register_t *sp; /** The stack pointer register. */
29 const arch_register_t *bp; /** The base pointer register. */
30 const int stack_dir; /** -1 for decreasing, 1 for increasing. */
35 typedef struct _ia32_irn_ops_t {
36 const arch_irn_ops_if_t *impl;
40 /* this is a struct to minimize the number of parameters
41 for transformation walker */
42 typedef struct _ia32_transform_env_t {
43 const arch_env_t *arch_env; /**< The arch_env */
44 firm_dbg_module_t *mod; /**< The firm debugger */
45 dbg_info *dbg; /**< The node debug info */
46 ir_graph *irg; /**< The irg, the node should be created in */
47 ir_node *block; /**< The block, the node should belong to */
48 ir_node *irn; /**< The irn, to be transformed */
49 ir_mode *mode; /**< The mode of the irn */
50 ia32_code_gen_t *cg; /**< The code generator */
51 } ia32_transform_env_t;
54 * Creates the unique per irg GP NoReg node.
56 ir_node *ia32_new_NoReg_gp(ia32_code_gen_t *cg);
59 * Creates the unique per irg FP NoReg node.
61 ir_node *ia32_new_NoReg_fp(ia32_code_gen_t *cg);
63 #endif /* _BEARCH_IA32_T_H_ */