1 #ifndef _IA32_NEW_NODES_H_
2 #define _IA32_NEW_NODES_H_
5 * Function prototypes for the assembler ir node constructors.
6 * @author Christian Wuerdig
10 #include "ia32_nodes_attr.h"
13 * Returns the name of a firm symconst.
15 const char *get_sc_name(ir_node *symc);
19 /***************************************************************************************************
21 * | | | | | | / / | | | | | | | |
22 * __ _| |_| |_ _ __ ___ ___| |_ / /_ _ ___| |_ _ __ ___ ___| |_| |__ ___ __| |___
23 * / _` | __| __| '__| / __|/ _ \ __| / / _` |/ _ \ __| | '_ ` _ \ / _ \ __| '_ \ / _ \ / _` / __|
24 * | (_| | |_| |_| | \__ \ __/ |_ / / (_| | __/ |_ | | | | | | __/ |_| | | | (_) | (_| \__ \
25 * \__,_|\__|\__|_| |___/\___|\__/_/ \__, |\___|\__| |_| |_| |_|\___|\__|_| |_|\___/ \__,_|___/
28 ***************************************************************************************************/
31 * Returns the attributes of an ia32 node.
33 asmop_attr *get_ia32_attr(const ir_node *node);
36 * Gets the type of an ia32 node.
38 asmop_type_t get_ia32_op_type(const ir_node *node);
41 * Sets the type of an ia32 node.
43 void set_ia32_op_type(const ir_node *node, asmop_type_t tp);
46 * Gets the addr mode type of an ia32 node
48 addrmode_type_t get_ia32_am_type(const ir_node *node);
51 * Sets the addr mode type of an ia32 node
53 void set_ia32_am_type(const ir_node *node, addrmode_type_t am_tp);
56 * Gets the addr mode offset.
58 tarval *get_ia32_am_offs(const ir_node *node);
61 * Sets the offset for addr mode.
63 void set_ia32_am_offs(ir_node *node, tarval *am_offs);
66 * Gets the addr mode const.
68 tarval *get_ia32_am_const(const ir_node *node);
71 * Sets the const for addr mode.
73 void set_ia32_am_const(ir_node *node, tarval *am_const);
76 * Return the tarval of an immediate operation or NULL in case of SymConst
78 tarval *get_ia32_Immop_tarval(const ir_node *node);
81 * Sets the attributes of an immediate operation to the specified tarval
83 void set_ia32_Immop_tarval(ir_node *node, tarval *tv);
86 * Return the old_ir attribute.
88 ir_node *get_ia32_old_ir(const ir_node *node);
91 * Sets the old_ir attribute.
93 void set_ia32_old_ir(ir_node *node, ir_node *old_ir);
96 * Returns the argument register requirements of an ia32 node.
98 const ia32_register_req_t **get_ia32_in_req_all(const ir_node *node);
101 * Returns the result register requirements of an ia32 node.
103 const ia32_register_req_t **get_ia32_out_req_all(const ir_node *node);
106 * Returns the argument register requirements of an ia32 node.
108 const ia32_register_req_t *get_ia32_in_req(const ir_node *node, int pos);
111 * Returns the result register requirements of an ia32 node.
113 const ia32_register_req_t *get_ia32_out_req(const ir_node *node, int pos);
116 * Sets the OUT register requirements at position pos.
118 void set_ia32_req_out(ir_node *node, const ia32_register_req_t *req, int pos);
121 * Sets the IN register requirements at position pos.
123 void set_ia32_req_in(ir_node *node, const ia32_register_req_t *req, int pos);
126 * Returns the register flag of an ia32 node.
128 arch_irn_flags_t get_ia32_flags(const ir_node *node);
131 * Sets the register flag of an ia32 node.
133 void set_ia32_flags(const ir_node *node, arch_irn_flags_t flags);
136 * Returns the result register slots of an ia32 node.
138 const arch_register_t **get_ia32_slots(const ir_node *node);
141 * Returns the name of the OUT register at position pos.
143 const char *get_ia32_out_reg_name(const ir_node *node, int pos);
146 * Returns the index of the OUT register at position pos within its register class.
148 int get_ia32_out_regnr(const ir_node *node, int pos);
151 * Returns the OUT register at position pos.
153 const arch_register_t *get_ia32_out_reg(const ir_node *node, int pos);
156 * Sets the number of results.
158 void set_ia32_n_res(ir_node *node, int n_res);
161 * Returns the number of results.
163 int get_ia32_n_res(const ir_node *node);
166 * Returns the flavour of an ia32 node,
168 op_flavour_t get_ia32_flavour(const ir_node *node);
171 * Sets the flavour of an ia32 node to flavour_Div/Mod/DivMod/Mul/Mulh.
173 void set_ia32_flavour(ir_node *node, op_flavour_t op_flav);
176 * Returns the projnum code.
178 long get_ia32_pncode(const ir_node *node);
181 * Sets the projnum code
183 void set_ia32_pncode(ir_node *node, long code);
187 /******************************************************************************************************
189 * (_) | | | | | | / _| | | (_)
190 * ___ _ __ ___ ___ _ __ _| | __ _| |_| |_ _ __ | |_ _ _ _ __ ___| |_ _ ___ _ __ ___
191 * / __| '_ \ / _ \/ __| |/ _` | | / _` | __| __| '__| | _| | | | '_ \ / __| __| |/ _ \| '_ \ / __|
192 * \__ \ |_) | __/ (__| | (_| | | | (_| | |_| |_| | | | | |_| | | | | (__| |_| | (_) | | | | \__ \
193 * |___/ .__/ \___|\___|_|\__,_|_| \__,_|\__|\__|_| |_| \__,_|_| |_|\___|\__|_|\___/|_| |_| |___/
196 ******************************************************************************************************/
199 * Gets the type of an ia32_Const.
201 unsigned get_ia32_Const_type(ir_node *node);
204 * Sets the type of an ia32_Const.
206 void set_ia32_Const_type(ir_node *node, int type);
209 * Copy the attributes from an ia32_Const to an Immop (Add_i, Sub_i, ...) node
211 void set_ia32_Immop_attr(ir_node *node, ir_node *cnst);
214 * Copy the attributes from a Const to an ia32_Const
216 void set_ia32_Const_attr(ir_node *ia32_cnst, ir_node *cnst);
219 * Sets the AddrMode attribute
221 void set_ia32_AddrMode(ir_node *node);
224 * Returns whether or not the node is an AddrMode node.
226 int is_ia32_AddrMode(ir_node *node);
229 * Checks whether or not an ir_node is an ia32 node
231 int is_ia32_irn(const ir_node *node);
233 /* Include the generated headers */
234 #include "gen_ia32_new_nodes.h"
236 #endif /* _IA32_NEW_NODES_H_ */