added DBG_OPT_LEA( to report Lea craetion to the firm statistic module
[libfirm] / ir / be / ia32 / ia32_emitter.h
1 #ifndef _IA32_EMITTER_H_
2 #define _IA32_EMITTER_H_
3
4 #include "irargs_t.h"  // this also inlucdes <libcore/lc_print.h>
5 #include "irnode.h"
6 #include "debug.h"
7
8 #include "../bearch.h"
9
10 #include "bearch_ia32_t.h"
11
12 typedef struct _ia32_emit_env_t {
13         FILE                  *out;
14         const arch_env_t      *arch_env;
15         const ia32_code_gen_t *cg;
16         ia32_isa_t            *isa;
17         DEBUG_ONLY(firm_dbg_module_t *mod;)
18 } ia32_emit_env_t;
19
20 const lc_arg_env_t *ia32_get_arg_env(void);
21
22 char *ia32_emit_binop(const ir_node *irn, ia32_emit_env_t *env);
23 char *ia32_emit_unop(const ir_node *irn, ia32_emit_env_t *env);
24 char *ia32_emit_am(const ir_node *irn, ia32_emit_env_t *env);
25
26 char *ia32_emit_x87_binop(const ir_node *n, ia32_emit_env_t *env);
27
28 int get_ia32_reg_nr(ir_node *irn, int posi, int in_out);
29 const char *get_ia32_in_reg_name(ir_node *irn, int pos);
30
31 void ia32_gen_routine(FILE *F, ir_graph *irg, const ia32_code_gen_t *cg);
32
33 #endif /* _IA32_EMITTER_H_ */