1 #ifndef _IA32_EMITTER_H_
2 #define _IA32_EMITTER_H_
4 #include "irargs_t.h" // this also inlucdes <libcore/lc_print.h>
10 #include "bearch_ia32_t.h"
12 typedef struct _ia32_emit_env_t {
14 const arch_env_t *arch_env;
15 const ia32_code_gen_t *cg;
17 DEBUG_ONLY(firm_dbg_module_t *mod;)
20 const lc_arg_env_t *ia32_get_arg_env(void);
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);
26 char *ia32_emit_x87_binop(const ir_node *n, ia32_emit_env_t *env);
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);
31 void ia32_gen_routine(FILE *F, ir_graph *irg, const ia32_code_gen_t *cg);
36 typedef enum section_t {
37 NO_SECTION = -1, /**< no section selected yet. */
38 SECTION_TEXT = 0, /**< text section */
39 SECTION_DATA = 1, /**< data section */
40 SECTION_RODATA = 2, /**< rodata section */
41 SECTION_COMMON = 3, /**< common section */
46 * Switch to a new section.
48 void ia32_switch_section(FILE *f, section_t sec);
50 typedef enum asm_flavour_t {
51 ASM_LINUX_GAS = 0, /**< Linux gas */
52 ASM_MINGW_GAS = 1, /**< MinGW gas */
56 extern asm_flavour_t asm_flavour;
58 #endif /* _IA32_EMITTER_H_ */