- vcg_private_t *priv = self->data;
- ir_op *op = stat_get_op_from_opcode(op_code);
- ir_mode *mode = (ir_mode *)mode_code;
- long l = attr ? *(long *)attr : 0;
-
- if (priv->pattern_id > priv->max_pattern)
- return;
-
- if (attr) {
- fprintf(priv->f, " node: {title: \"n%u_%u\" label: \"%s%s %ld n%u\" }\n",
- priv->pattern_id, id, get_id_str(op->name), mode ? get_mode_name(mode) : "", l, id);
- }
- else {
- fprintf(priv->f, " node: {title: \"n%u_%u\" label: \"%s%s n%u\" }\n",
- priv->pattern_id, id, get_id_str(op->name), mode ? get_mode_name(mode) : "", id);
- }
-}
+ vcg_private_t *priv = self->data;
+ ir_op *op = stat_get_op_from_opcode(op_code);
+ ir_mode *mode = stat_mode_for_index(mode_code);
+ long l = attr ? *(long *)attr : 0;
+
+ if (priv->pattern_id > priv->max_pattern)
+ return;
+
+ if (attr) {
+ fprintf(priv->f, " node: {title: \"n%u_%u\" label: \"%s%s %ld n%u\" }\n",
+ priv->pattern_id, id, get_id_str(op->name), mode ? get_mode_name(mode) : "", l, id);
+ } else {
+ fprintf(priv->f, " node: {title: \"n%u_%u\" label: \"%s%s n%u\" }\n",
+ priv->pattern_id, id, get_id_str(op->name), mode ? get_mode_name(mode) : "", id);
+ } /* if */
+} /* vcg_dump_node */