static void dump_node_req(FILE *f, int idx, const arch_register_req_t *req,
const ir_node *node)
{
- int did_something = 0;
- char buf[16];
- const char *prefix = buf;
-
- snprintf(buf, sizeof(buf), "#%d ", idx);
- buf[sizeof(buf) - 1] = '\0';
-
- if(req->cls != 0) {
- char tmp[256];
- fprintf(f, prefix);
- arch_register_req_format(tmp, sizeof(tmp), req, node);
- fprintf(f, "%s", tmp);
- did_something = 1;
- }
+ char tmp[256];
+
+ if (req->cls == NULL) return;
- if(did_something)
- fprintf(f, "\n");
+ arch_register_req_format(tmp, sizeof(tmp), req, node);
+ fprintf(f, "#%d %s\n", idx, tmp);
}
/**
switch(reason) {
case dump_node_opcode_txt:
- fprintf(f, get_op_name(get_irn_op(irn)));
+ fputs(get_op_name(get_irn_op(irn)), f);
break;
case dump_node_mode_txt:
if(be_is_Perm(irn) || be_is_Copy(irn) || be_is_CopyKeep(irn)) {