1 #ifndef _ARM_NEW_NODES_H_
2 #define _ARM_NEW_NODES_H_
5 * Function prototypes for the assembler ir node constructors.
9 #include "arm_nodes_attr.h"
10 #include "bearch_arm_t.h"
11 #include "gen_arm_machine.h"
13 /***************************************************************************************************
15 * | | | | | | / / | | | | | | | |
16 * __ _| |_| |_ _ __ ___ ___| |_ / /_ _ ___| |_ _ __ ___ ___| |_| |__ ___ __| |___
17 * / _` | __| __| '__| / __|/ _ \ __| / / _` |/ _ \ __| | '_ ` _ \ / _ \ __| '_ \ / _ \ / _` / __|
18 * | (_| | |_| |_| | \__ \ __/ |_ / / (_| | __/ |_ | | | | | | __/ |_| | | | (_) | (_| \__ \
19 * \__,_|\__|\__|_| |___/\___|\__/_/ \__, |\___|\__| |_| |_| |_|\___|\__|_| |_|\___/ \__,_|___/
22 ***************************************************************************************************/
25 * Returns the attributes of an arm node.
27 arm_attr_t *get_arm_attr(const ir_node *node);
30 * Returns the argument register requirements of an arm node.
32 const arm_register_req_t **get_arm_in_req_all(const ir_node *node);
35 * Returns the result register requirements of an arm node.
37 const arm_register_req_t **get_arm_out_req_all(const ir_node *node);
40 * Returns the argument register requirements of an arm node.
42 const arm_register_req_t *get_arm_in_req(const ir_node *node, int pos);
45 * Returns the result register requirements of an arm node.
47 const arm_register_req_t *get_arm_out_req(const ir_node *node, int pos);
50 * Sets the OUT register requirements at position pos.
52 void set_arm_req_out(ir_node *node, const arm_register_req_t *req, int pos);
55 * Sets the complete OUT requirements of node.
57 void set_arm_req_out_all(ir_node *node, const arm_register_req_t **reqs);
60 * Sets the IN register requirements at position pos.
62 void set_arm_req_in(ir_node *node, const arm_register_req_t *req, int pos);
65 * Returns the register flag of an arm node.
67 arch_irn_flags_t get_arm_flags(const ir_node *node);
70 * Sets the register flag of an arm node.
72 void set_arm_flags(const ir_node *node, arch_irn_flags_t flags);
75 * Returns the result register slots of an arm node.
77 const arch_register_t **get_arm_slots(const ir_node *node);
80 * Returns the name of the OUT register at position pos.
82 const char *get_arm_out_reg_name(const ir_node *node, int pos);
85 * Returns the index of the OUT register at position pos within its register class.
87 int get_arm_out_regnr(const ir_node *node, int pos);
90 * Returns the OUT register at position pos.
92 const arch_register_t *get_arm_out_reg(const ir_node *node, int pos);
95 * Sets the number of results.
97 void set_arm_n_res(ir_node *node, int n_res);
100 * Returns the number of results.
102 int get_arm_n_res(const ir_node *node);
105 * Set the ARM machine node attributes to default values.
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);
113 tarval *get_arm_value(const ir_node *node);
118 void set_arm_value(ir_node *node, tarval *tv);
121 * Returns the proj num
123 int get_arm_proj_num(const ir_node *node);
128 void set_arm_proj_num(ir_node *node, int proj_num);
130 const char *get_arm_symconst_label(ir_node *node);
131 void set_arm_symconst_label(ir_node *node, const char *symconst_label);
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);
137 * Returns the number of projs.
139 int get_arm_n_projs(ir_node *node);
142 * Sets the number of projs.
144 void set_arm_n_projs(ir_node *node, int n_projs);
147 * Returns the default_proj_num.
149 long get_arm_default_proj_num(ir_node *node);
152 * Sets the default_proj_num.
154 void set_arm_default_proj_num(ir_node *node, long default_proj_num);
157 * Gets the shift modifier attribute.
159 arm_shift_modifier get_arm_shift_modifier(ir_node *node);
162 * Decode an immediate with shifter operand
164 unsigned int arm_decode_imm_w_shift(tarval *tv);
166 /* Include the generated headers */
167 #include "gen_arm_new_nodes.h"
169 #endif /* _ARM_NEW_NODES_H_ */