76470ea0db6f9616e340e92b78b413c0e033b09a
[libfirm] / ir / be / ia32 / ia32_transform.h
1 /**
2  * Function prototypes for Firm into ia32-Firm transformations.
3  * @author Christian Wuerdig
4  * $Id$
5  */
6
7 #ifndef _IA32_TRANSFORM_H_
8 #define _IA32_TRANSFORM_H_
9
10 #include "firm_config.h"
11 #include "bearch_ia32_t.h"
12
13 /**
14  * Transform firm nodes to x86 assembler nodes
15  */
16 void ia32_transform_graph(ia32_code_gen_t *cg);
17
18 #if 0
19 /**
20  * Enters all transform functions into the generic pointer
21  */
22 void ia32_register_transformers(void);
23
24 /**
25  * Transforms the given Firm node into one or more appropriate ia32 nodes.
26  */
27 void ia32_transform_node(ir_node *node, void *env);
28 #endif
29
30 /**
31  * The Psi selector can be a tree of compares combined with "And"s and "Or"s.
32  * We create a Set node, respectively a xCmp in case the Psi is a float, for each
33  * compare, which causes the compare result to be stores in a register.  The
34  * "And"s and "Or"s are transformed later, we only adjust their mode.
35  */
36 void ia32_transform_psi_cond_tree(ir_node *node, void *env);
37
38 #ifndef NDEBUG
39 /**
40  * Prints the old node name on cg obst and returns a pointer to it.
41  */
42 const char *ia32_get_old_node_name(ia32_code_gen_t *cg, ir_node *irn);
43 #endif /* NDEBUG */
44
45 typedef enum {
46         ia32_SSIGN, ia32_DSIGN, ia32_SABS, ia32_DABS, ia32_known_const_max
47 } ia32_known_const_t;
48
49 /**
50  * Generate a known floating point constant
51  */
52 ident *ia32_gen_fp_known_const(ia32_known_const_t kct);
53
54 #endif /* _IA32_TRANSFORM_H_ */