X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2FTEMPLATE%2FTEMPLATE_new_nodes.c;h=12778e95bf5f9da18bb3476d5c312f4570d4e302;hb=93da909d12b7bec51aa36ee5f05966c331f90fb9;hp=b0bb78a96f30172eb5a55b6249622c5bc26a7006;hpb=9fcd5f662056f33a38dbd39f59dc5125718e04ed;p=libfirm diff --git a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c index b0bb78a96..12778e95b 100644 --- a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c +++ b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -91,13 +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[0])); - if (reqs[i]->other_same[1] != -1) - ir_fprintf(F, " or %+F", get_irn_n(n, reqs[i]->other_same[1])); + 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)); + if (reqs[i]->type & arch_register_req_type_must_be_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"); @@ -367,13 +381,12 @@ 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; - (void) latency; attr->flags = flags; attr->out_req = out_reqs;