workaround for void* conversion of funcptr
[libfirm] / ir / be / benode.c
index 5ee1715..24c139e 100644 (file)
@@ -407,7 +407,7 @@ static void be_limited(void *data, bitset_t *bs)
 
 void be_set_constr_single_reg(ir_node *irn, int pos, const arch_register_t *reg)
 {
-       int idx           = pos < 0 ? -(pos - 1) : pos;
+       int idx           = pos < 0 ? -(pos + 1) : pos;
        be_node_attr_t *a = get_irn_attr(irn);
        be_reg_data_t *rd = &a->reg_data[idx];
        be_req_t       *r = pos < 0 ? &rd->req : &rd->in_req;