aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-05-17 01:13:32 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-07-27 00:52:20 +0200
commit0b0d8b197f1e3b76434b710f8320f8cdf14816a6 (patch)
tree7ae3e736d6e6d50a57995528c486d49eb7e281df
parent15806a1f68178a278c7a297b163d5692fe71cbf2 (diff)
downloadsparse-0b0d8b197f1e3b76434b710f8320f8cdf14816a6.tar.gz
scheck: better diagnostic for unsupported instructions
When reporting an unsupported instruction, display the instruction together with the diagnostic message. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--scheck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scheck.c b/scheck.c
index 754fe76f..c830f56a 100644
--- a/scheck.c
+++ b/scheck.c
@@ -134,7 +134,7 @@ static void binary(Btor *btor, BoolectorSort s, struct instruction *insn)
case OP_SET_AE: t = zext(btor, insn, boolector_ugte(btor, a, b)); break;
case OP_SET_A: t = zext(btor, insn, boolector_ugt(btor, a, b)); break;
default:
- fprintf(stderr, "unsupported insn\n");
+ fprintf(stderr, "unsupported insn: %s\n", show_instruction(insn));
return;
}
insn->target->priv = t;
@@ -167,7 +167,7 @@ static void unop(Btor *btor, struct instruction *insn)
case OP_ZEXT: t = zext(btor, insn, a); break;
case OP_TRUNC: t = slice(btor, insn, a); break;
default:
- fprintf(stderr, "unsupported insn\n");
+ fprintf(stderr, "unsupported insn: %s\n", show_instruction(insn));
return;
}
insn->target->priv = t;
@@ -190,7 +190,7 @@ static void ternop(Btor *btor, struct instruction *insn)
t = boolector_cond(btor, d, b, c);
break;
default:
- fprintf(stderr, "unsupported insn\n");
+ fprintf(stderr, "unsupported insn: %s\n", show_instruction(insn));
return;
}
insn->target->priv = t;
@@ -314,7 +314,7 @@ static bool check_function(struct entrypoint *ep)
case OP_RET:
goto out;
default:
- fprintf(stderr, "unsupported insn\n");
+ fprintf(stderr, "unsupported insn: %s\n", show_instruction(insn));
goto out;
}
} END_FOR_EACH_PTR(insn);