extended node attribute initializer for execution unit parameter
[libfirm] / ir / be / arm / arm_new_nodes.h
1 #ifndef _ARM_NEW_NODES_H_
2 #define _ARM_NEW_NODES_H_
3
4 /**
5  * Function prototypes for the assembler ir node constructors.
6  * $Id$
7  */
8
9 #include "arm_nodes_attr.h"
10 #include "bearch_arm_t.h"
11 #include "gen_arm_machine.h"
12
13 /***************************************************************************************************
14  *        _   _                   _       __        _                    _   _               _
15  *       | | | |                 | |     / /       | |                  | | | |             | |
16  *   __ _| |_| |_ _ __   ___  ___| |_   / /_ _  ___| |_   _ __ ___   ___| |_| |__   ___   __| |___
17  *  / _` | __| __| '__| / __|/ _ \ __| / / _` |/ _ \ __| | '_ ` _ \ / _ \ __| '_ \ / _ \ / _` / __|
18  * | (_| | |_| |_| |    \__ \  __/ |_ / / (_| |  __/ |_  | | | | | |  __/ |_| | | | (_) | (_| \__ \
19  *  \__,_|\__|\__|_|    |___/\___|\__/_/ \__, |\___|\__| |_| |_| |_|\___|\__|_| |_|\___/ \__,_|___/
20  *                                        __/ |
21  *                                       |___/
22  ***************************************************************************************************/
23
24 /**
25  * Returns the attributes of an arm node.
26  */
27 arm_attr_t *get_arm_attr(const ir_node *node);
28
29 /**
30  * Returns the argument register requirements of an arm node.
31  */
32 const arm_register_req_t **get_arm_in_req_all(const ir_node *node);
33
34 /**
35  * Returns the result register requirements of an arm node.
36  */
37 const arm_register_req_t **get_arm_out_req_all(const ir_node *node);
38
39 /**
40  * Returns the argument register requirements of an arm node.
41  */
42 const arm_register_req_t *get_arm_in_req(const ir_node *node, int pos);
43
44 /**
45  * Returns the result register requirements of an arm node.
46  */
47 const arm_register_req_t *get_arm_out_req(const ir_node *node, int pos);
48
49 /**
50  * Sets the OUT register requirements at position pos.
51  */
52 void set_arm_req_out(ir_node *node, const arm_register_req_t *req, int pos);
53
54 /**
55  * Sets the complete OUT requirements of node.
56  */
57 void set_arm_req_out_all(ir_node *node, const arm_register_req_t **reqs);
58
59 /**
60  * Sets the IN register requirements at position pos.
61  */
62 void set_arm_req_in(ir_node *node, const arm_register_req_t *req, int pos);
63
64 /**
65  * Returns the register flag of an arm node.
66  */
67 arch_irn_flags_t get_arm_flags(const ir_node *node);
68
69 /**
70  * Sets the register flag of an arm node.
71  */
72 void set_arm_flags(const ir_node *node, arch_irn_flags_t flags);
73
74 /**
75  * Returns the result register slots of an arm node.
76  */
77 const arch_register_t **get_arm_slots(const ir_node *node);
78
79 /**
80  * Returns the name of the OUT register at position pos.
81  */
82 const char *get_arm_out_reg_name(const ir_node *node, int pos);
83
84 /**
85  * Returns the index of the OUT register at position pos within its register class.
86  */
87 int get_arm_out_regnr(const ir_node *node, int pos);
88
89 /**
90  * Returns the OUT register at position pos.
91  */
92 const arch_register_t *get_arm_out_reg(const ir_node *node, int pos);
93
94 /**
95  * Sets the number of results.
96  */
97 void set_arm_n_res(ir_node *node, int n_res);
98
99 /**
100  * Returns the number of results.
101  */
102 int get_arm_n_res(const ir_node *node);
103
104 /**
105  * Set the ARM machine node attributes to default values.
106  */
107 void init_arm_attributes(ir_node *node, int flags, const arm_register_req_t ** in_reqs,
108                          const arm_register_req_t ** out_reqs, const be_execution_unit_t **execution_units, int n_res, unsigned latency);
109
110 /**
111  * Returns the tarval
112  */
113 tarval *get_arm_value(const ir_node *node);
114
115 /**
116  * Sets the tarval
117  */
118 void set_arm_value(ir_node *node, tarval *tv);
119
120 /**
121  * Returns the proj num
122  */
123 int get_arm_proj_num(const ir_node *node);
124
125 /**
126  * Sets the proj num
127  */
128 void set_arm_proj_num(ir_node *node, int proj_num);
129
130 const char *get_arm_symconst_label(ir_node *node);
131 void set_arm_symconst_label(ir_node *node, const char *symconst_label);
132
133 ir_node *new_r_arm_StoreStackMInc(ir_graph *irg, ir_node *block, ir_node *mem, ir_node *sp,
134                                                               int n_regs, ir_node **regs, ir_mode *mode);
135
136 /**
137  * Returns the number of projs.
138  */
139 int get_arm_n_projs(ir_node *node);
140
141 /**
142  * Sets the number of projs.
143  */
144 void set_arm_n_projs(ir_node *node, int n_projs);
145
146 /**
147  * Returns the default_proj_num.
148  */
149 long get_arm_default_proj_num(ir_node *node);
150
151 /**
152  * Sets the default_proj_num.
153  */
154 void set_arm_default_proj_num(ir_node *node, long default_proj_num);
155
156 /**
157  * Gets the shift modifier attribute.
158  */
159 arm_shift_modifier get_arm_shift_modifier(ir_node *node);
160
161 /**
162  * Decode an immediate with shifter operand
163  */
164 unsigned int arm_decode_imm_w_shift(tarval *tv);
165
166 /* Include the generated headers */
167 #include "gen_arm_new_nodes.h"
168
169 #endif /* _ARM_NEW_NODES_H_ */