diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@looxix.net> | 2016-11-22 17:32:33 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-13 09:34:44 +0800 |
| commit | 5f8681e7ad9abff079db4ed3bfdeb7b5e1808c4a (patch) | |
| tree | 26728b6eefa5fdb7c61e8f3b82f48fc1ddef2171 /linearize.c | |
| parent | 5dd219ef2abf39d803f8ba4950acabc9c0f0244d (diff) | |
| download | sparse-dev-5f8681e7ad9abff079db4ed3bfdeb7b5e1808c4a.tar.gz | |
OP_SWITCH should use 'insn->cond' instead of 'insn->target'
show_instruction() uses the field 'target' to display OP_SWITCH
instruction instead of 'cond' like OP_BR does.
It doesn't change anything since these two fields use the same
storage inside struct instruction but better to use the right field
to keep consistent.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'linearize.c')
| -rw-r--r-- | linearize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linearize.c b/linearize.c index bffbe022..99966d07 100644 --- a/linearize.c +++ b/linearize.c @@ -359,7 +359,7 @@ const char *show_instruction(struct instruction *insn) } case OP_SWITCH: { struct multijmp *jmp; - buf += sprintf(buf, "%s", show_pseudo(insn->target)); + buf += sprintf(buf, "%s", show_pseudo(insn->cond)); FOR_EACH_PTR(insn->multijmp_list, jmp) { if (jmp->begin == jmp->end) buf += sprintf(buf, ", %d -> .L%u", jmp->begin, jmp->target->nr); |
