X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.c;h=83c066154679c13fb8778f4edc4b801ee7626d37;hb=6082146d47925a3dbbc78da30ca0a89276457dce;hp=2b50c3715187e89439b8c6fef19ffee16c651657;hpb=223381b39ed8606f5dbf94a7c1f59fd9e0b6d249;p=libfirm diff --git a/ir/be/bearch.c b/ir/be/bearch.c index 2b50c3715..83c066154 100644 --- a/ir/be/bearch.c +++ b/ir/be/bearch.c @@ -71,17 +71,16 @@ static inline const arch_irn_ops_t *get_irn_ops(const ir_node *irn) 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); } }