some workaround to avoid condeval creating Phibs which not all backends like
[libfirm] / ir / be / arm / arm_emitter.h
1 #ifndef _ARM_EMITTER_H_
2 #define _ARM_EMITTER_H_
3
4 #include "firm_types.h"
5 #include "irargs_t.h"
6 #include "debug.h"
7
8 #include "../bearch.h"
9
10 #include "bearch_arm_t.h"
11
12 /**
13  * A SymConst entry.
14  */
15 typedef struct _SymConstEntry {
16         unsigned label;              /**< a label number for this label */
17         ir_node  *symconst;          /**< the node holding this label */
18         struct _SymConstEntry *next; /**< links all entries */
19 } SymConstEntry;
20
21 /**
22  * The ARM emitter environment.
23  */
24 typedef struct _arm_emit_env_t {
25         FILE                      *out;      /**< the output stream */
26         const arch_env_t          *arch_env; /**< the architecture environment */
27         const arm_code_gen_t      *cg;       /**< the code generator object */
28         struct obstack            obst;      /**< an temporary store for SymConstEntries */
29         SymConstEntry             *symbols;  /**< list containing all SymConstEntries */
30         DEBUG_ONLY(firm_dbg_module_t *mod;)
31 } arm_emit_env_t;
32
33 const lc_arg_env_t *arm_get_arg_env(void);
34
35 void equalize_dest_src(FILE *F, ir_node *n);
36
37 int get_arm_reg_nr(ir_node *irn, int posi, int in_out);
38 const char *get_arm_in_reg_name(ir_node *irn, int pos);
39
40 void arm_gen_routine(FILE *F, ir_graph *irg, const arm_code_gen_t *cg);
41
42 /**
43  * Sections.
44  */
45 typedef enum sections {
46         NO_SECTION,      /**< no section selected yet. */
47         SECTION_TEXT,    /**< text section */
48         SECTION_DATA,    /**< data section */
49         SECTION_RODATA,  /**< rodata section */
50         SECTION_COMMON,  /**< common section */
51 } sections;
52
53 /**
54  * Switch to a new section
55  */
56 void arm_switch_section(FILE *f, sections sec);
57
58 #endif /* _ARM_EMITTER_H_ */