-/***********************************************************************************
- * _ _ _ __
- * | | (_) | | / _|
- * __| |_ _ _ __ ___ _ __ ___ _ __ _ _ __ | |_ ___ _ __| |_ __ _ ___ ___
- * / _` | | | | '_ ` _ \| '_ \ / _ \ '__| | | '_ \| __/ _ \ '__| _/ _` |/ __/ _ \
- * | (_| | |_| | | | | | | |_) | __/ | | | | | | || __/ | | || (_| | (_| __/
- * \__,_|\__,_|_| |_| |_| .__/ \___|_| |_|_| |_|\__\___|_| |_| \__,_|\___\___|
- * | |
- * |_|
- ***********************************************************************************/
-
-/**
- * Dumps the register requirements for either in or out.
- */
-static void dump_reg_req(FILE *F, ir_node *n, const arch_register_req_t **reqs,
- int inout) {
- char *dir = inout ? "out" : "in";
- int max = inout ? get_ia32_n_res(n) : get_irn_arity(n);
- char buf[1024];
- int i;
-
- memset(buf, 0, sizeof(buf));
-
- if (reqs) {
- for (i = 0; i < max; i++) {
- fprintf(F, "%sreq #%d =", dir, i);
-
- if (reqs[i]->type == arch_register_req_type_none) {
- fprintf(F, " n/a");
- }
-
- if (reqs[i]->type & arch_register_req_type_normal) {
- fprintf(F, " %s", reqs[i]->cls->name);
- }
-
- if (reqs[i]->type & arch_register_req_type_limited) {
- fprintf(F, " %s",
- arch_register_req_format(buf, sizeof(buf), reqs[i], n));
- }
-
- if (reqs[i]->type & arch_register_req_type_should_be_same) {
- 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) {
- 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");
- }
-
- fprintf(F, "\n");
- }
- else {
- fprintf(F, "%sreq = N/A\n", dir);
- }
-}
-