- Allow an arbitrary (for arbitrary < 32) number of in_rBAR and !in_rBAR constraints...
[libfirm] / ir / be / TEMPLATE / TEMPLATE_new_nodes.c
index 8002c7c..1f137cc 100644 (file)
@@ -91,11 +91,27 @@ static void dump_reg_req(FILE *F, ir_node *n, const arch_register_req_t **reqs,
                        }
 
                        if (reqs[i]->type & arch_register_req_type_should_be_same) {
-                               ir_fprintf(F, " same as %+F", get_irn_n(n, reqs[i]->other_same));
+                               const unsigned other = reqs[i]->other_same;
+                               int i;
+
+                               ir_fprintf(F, " same as");
+                               for (i = 0; 1U << i <= other; ++i) {
+                                       if (other & (1U << i)) {
+                                               ir_fprintf(F, " %+F", get_irn_n(n, i));
+                                       }
+                               }
                        }
 
                        if (reqs[i]->type & arch_register_req_type_should_be_different) {
-                               ir_fprintf(F, " different from %+F", get_irn_n(n, reqs[i]->other_different));
+                               const unsigned other = reqs[i]->other_different;
+                               int i;
+
+                               ir_fprintf(F, " different from");
+                               for (i = 0; 1U << i <= other; ++i) {
+                                       if (other & (1U << i)) {
+                                               ir_fprintf(F, " %+F", get_irn_n(n, i));
+                                       }
+                               }
                        }
 
                        fprintf(F, "\n");
@@ -365,18 +381,19 @@ void init_TEMPLATE_attributes(ir_node *node, arch_irn_flags_t flags,
                               const arch_register_req_t **in_reqs,
                               const arch_register_req_t **out_reqs,
                               const be_execution_unit_t ***execution_units,
-                              int n_res, unsigned latency)
+                              int n_res)
 {
        ir_graph        *irg  = get_irn_irg(node);
        struct obstack  *obst = get_irg_obstack(irg);
        TEMPLATE_attr_t *attr = get_TEMPLATE_attr(node);
+       (void) execution_units;
 
        attr->flags   = flags;
        attr->out_req = out_reqs;
        attr->in_req  = in_reqs;
 
-       attr->slots = NEW_ARR_D(arch_register_t*, obst, n_res);
-       memset((arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0]));
+       attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res);
+       memset(attr->slots, 0, n_res * sizeof(attr->slots[0]));
 }
 
 /***************************************************************************************