From 08e387ebac04eeb6c459f131870a89fa1cea6b70 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 20 Jan 2011 15:33:13 +0900 Subject: [PATCH] Slight improvement to branch instruction nodes/labels. --- tools/qfcc/source/expr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index ec9cdb639..eab7cbf57 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -962,6 +962,14 @@ _print_expr (expr_t *e, int level, int id) } printf ("%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1); printf ("%*se_%p -> p_%p;\n", indent, "", e, e); + } else if (e->e.expr.op == 'i' || e->e.expr.op == 'n' + || e->e.expr.op == IFB || e->e.expr.op ==IFBE + || e->e.expr.op == IFA || e->e.expr.op ==IFAE) { + _print_expr (e->e.expr.e1, level, id); + printf ("%*se_%p -> e_%p [label=\"t\"];\n", indent, "", + e, e->e.expr.e1); + printf ("%*se_%p -> e_%p [label=\"g\"];\n", indent, "", + e, e->e.expr.e2); } else { _print_expr (e->e.expr.e1, level, id); _print_expr (e->e.expr.e2, level, id); @@ -973,7 +981,8 @@ _print_expr (expr_t *e, int level, int id) label = get_op_string (e->e.expr.op); break; case ex_uexpr: - _print_expr (e->e.expr.e1, level, id); + if (e->e.expr.op != 'g') + _print_expr (e->e.expr.e1, level, id); printf ("%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1); label = get_op_string (e->e.expr.op); break;