const arch_register_req_t *arch_get_register_req(const ir_node *irn, int pos)
{
- const arch_irn_ops_t *ops;
-
if (is_Proj(irn)) {
assert(pos == -1);
pos = -1-get_Proj_proj(irn);
irn = get_Proj_pred(irn);
}
- ops = get_irn_ops_simple(irn);
+
if (pos < 0) {
- return ops->get_irn_reg_req_out(irn, -pos-1);
+ return arch_get_out_register_req(irn, -pos-1);
} else {
+ const arch_irn_ops_t *ops = get_irn_ops_simple(irn);
return ops->get_irn_reg_req_in(irn, pos);
}
}