2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief Function prototypes for the assembler ir node constructors.
23 * @author Oliver Richter, Tobias Gneist
26 #ifndef FIRM_BE_ARM_ARM_NEW_NODES_H
27 #define FIRM_BE_ARM_ARM_NEW_NODES_H
29 #include "arm_nodes_attr.h"
30 #include "bearch_arm_t.h"
32 /***************************************************************************************************
34 * | | | | | | / / | | | | | | | |
35 * __ _| |_| |_ _ __ ___ ___| |_ / /_ _ ___| |_ _ __ ___ ___| |_| |__ ___ __| |___
36 * / _` | __| __| '__| / __|/ _ \ __| / / _` |/ _ \ __| | '_ ` _ \ / _ \ __| '_ \ / _ \ / _` / __|
37 * | (_| | |_| |_| | \__ \ __/ |_ / / (_| | __/ |_ | | | | | | __/ |_| | | | (_) | (_| \__ \
38 * \__,_|\__|\__|_| |___/\___|\__/_/ \__, |\___|\__| |_| |_| |_|\___|\__|_| |_|\___/ \__,_|___/
41 ***************************************************************************************************/
44 * Returns the attributes of an arm node.
46 arm_attr_t *get_arm_attr(const ir_node *node);
49 * Returns the argument register requirements of an arm node.
51 const arch_register_req_t **get_arm_in_req_all(const ir_node *node);
54 * Returns the result register requirements of an arm node.
56 const arch_register_req_t **get_arm_out_req_all(const ir_node *node);
59 * Returns the argument register requirements of an arm node.
61 const arch_register_req_t *get_arm_in_req(const ir_node *node, int pos);
64 * Returns the result register requirements of an arm node.
66 const arch_register_req_t *get_arm_out_req(const ir_node *node, int pos);
69 * Sets the OUT register requirements at position pos.
71 void set_arm_req_out(ir_node *node, const arch_register_req_t *req, int pos);
74 * Sets the complete OUT requirements of node.
76 void set_arm_req_out_all(ir_node *node, const arch_register_req_t **reqs);
79 * Sets the IN register requirements at position pos.
81 void set_arm_req_in(ir_node *node, const arch_register_req_t *req, int pos);
84 * Returns the register flag of an arm node.
86 arch_irn_flags_t get_arm_flags(const ir_node *node);
89 * Sets the register flag of an arm node.
91 void set_arm_flags(const ir_node *node, arch_irn_flags_t flags);
94 * Returns the result register slots of an arm node.
96 const arch_register_t **get_arm_slots(const ir_node *node);
99 * Returns the name of the OUT register at position pos.
101 const char *get_arm_out_reg_name(const ir_node *node, int pos);
104 * Returns the index of the OUT register at position pos within its register class.
106 int get_arm_out_regnr(const ir_node *node, int pos);
109 * Returns the OUT register at position pos.
111 const arch_register_t *get_arm_out_reg(const ir_node *node, int pos);
114 * Sets the number of results.
116 void set_arm_n_res(ir_node *node, int n_res);
119 * Returns the number of results.
121 int get_arm_n_res(const ir_node *node);
124 * Set the ARM machine node attributes to default values.
126 void init_arm_attributes(ir_node *node, int flags, const arch_register_req_t ** in_reqs,
127 const arch_register_req_t ** out_reqs, const be_execution_unit_t ***execution_units, int n_res, unsigned latency);
132 tarval *get_arm_value(const ir_node *node);
137 void set_arm_value(ir_node *node, tarval *tv);
140 * Returns the proj num
142 int get_arm_proj_num(const ir_node *node);
147 void set_arm_proj_num(ir_node *node, int proj_num);
149 ident *get_arm_symconst_id(const ir_node *node);
150 void set_arm_symconst_id(ir_node *node, ident *symconst_id);
152 ir_node *new_r_arm_StoreStackMInc(ir_graph *irg, ir_node *block, ir_node *mem, ir_node *sp,
153 int n_regs, ir_node **regs, ir_mode *mode);
156 * Returns the number of projs.
158 int get_arm_n_projs(const ir_node *node);
161 * Sets the number of projs.
163 void set_arm_n_projs(ir_node *node, int n_projs);
166 * Returns the default_proj_num.
168 long get_arm_default_proj_num(const ir_node *node);
171 * Sets the default_proj_num.
173 void set_arm_default_proj_num(ir_node *node, long default_proj_num);
176 * Gets the shift modifier attribute.
178 arm_shift_modifier get_arm_shift_modifier(const ir_node *node);
181 * Decode an immediate with shifter operand
183 unsigned int arm_decode_imm_w_shift(tarval *tv);
185 /* Include the generated headers */
186 #include "gen_arm_new_nodes.h"