void equalize_dest_src(FILE *F, ir_node *n);
-int get_ia32_in_regnr(ir_node *irn, int pos);
+int get_ia32_reg_nr(ir_node *irn, int posi, int in_out);
const char *get_ia32_in_reg_name(ir_node *irn, int pos);
void ia32_gen_routine(FILE *F, ir_graph *irg, const arch_env_t *env);
return attr->slots[pos]->index;
}
+/**
+ * Returns the OUT register at position pos.
+ */
+const arch_register_t *get_ia32_out_reg(const ir_node *node, int pos) {
+ asmop_attr *attr = get_ia32_attr(node);
+
+ assert(is_ia32_irn(node) && "Not an ia32 node.");
+ assert(pos < attr->n_res && "Invalid OUT position.");
+ assert(attr->slots[pos] && "No register assigned");
+
+ return attr->slots[pos];
+}
+
/**
* Sets the number of results.
*/
void set_ia32_regreq_out(ir_node *node, const arch_register_req_t *req, int pos);
void set_ia32_regreq_in(ir_node *node, const arch_register_req_t *req, int pos);
-const char *get_ia32_out_reg_name(const ir_node *node, int pos);
-int get_ia32_out_regnr(const ir_node *node, int pos);
+const char *get_ia32_out_reg_name(const ir_node *node, int pos);
+int get_ia32_out_regnr(const ir_node *node, int pos);
+const arch_register_t *get_ia32_out_reg(const ir_node *node, int pos);
int is_ia32_irn(const ir_node *node);