Remove AFL Integration by reverting

This commit is contained in:
2021-10-26 11:22:21 +02:00
parent 7ac7c23c12
commit e695686c15
56 changed files with 46 additions and 2580 deletions

View File

@@ -1655,7 +1655,7 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
def = &s->tcg_op_defs[c];
if (c == INDEX_op_insn_start) {
nb_oargs = 0;
UCLOG(" ----");
printf(" ----");
for (i = 0; i < TARGET_INSN_START_WORDS; ++i) {
target_ulong a;
@@ -1664,7 +1664,7 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
#else
a = op->args[i];
#endif
UCLOG(" " TARGET_FMT_lx, a);
printf(" " TARGET_FMT_lx, a);
}
} else if (c == INDEX_op_call) {
/* variable number of arguments */
@@ -1673,11 +1673,11 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
nb_cargs = def->nb_cargs;
/* function name, flags, out args */
UCLOG(" %s %s,$0x%" TCG_PRIlx ",$%d", def->name,
printf(" %s %s,$0x%" TCG_PRIlx ",$%d", def->name,
tcg_find_helper(s, op->args[nb_oargs + nb_iargs]),
op->args[nb_oargs + nb_iargs + 1], nb_oargs);
for (i = 0; i < nb_oargs; i++) {
UCLOG(",%s", tcg_get_arg_str(s, buf, sizeof(buf),
printf(",%s", tcg_get_arg_str(s, buf, sizeof(buf),
op->args[i]));
}
for (i = 0; i < nb_iargs; i++) {
@@ -1686,33 +1686,33 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
if (arg != TCG_CALL_DUMMY_ARG) {
t = tcg_get_arg_str(s, buf, sizeof(buf), arg);
}
UCLOG(",%s", t);
printf(",%s", t);
}
} else {
UCLOG(" %s ", def->name);
printf(" %s ", def->name);
nb_oargs = def->nb_oargs;
nb_iargs = def->nb_iargs;
nb_cargs = def->nb_cargs;
if (def->flags & TCG_OPF_VECTOR) {
UCLOG("v%d,e%d,", 64 << TCGOP_VECL(op),
printf("v%d,e%d,", 64 << TCGOP_VECL(op),
8 << TCGOP_VECE(op));
}
k = 0;
for (i = 0; i < nb_oargs; i++) {
if (k != 0) {
UCLOG(",");
printf(",");
}
UCLOG("%s", tcg_get_arg_str(s, buf, sizeof(buf),
printf("%s", tcg_get_arg_str(s, buf, sizeof(buf),
op->args[k++]));
}
for (i = 0; i < nb_iargs; i++) {
if (k != 0) {
UCLOG(",");
printf(",");
}
UCLOG("%s", tcg_get_arg_str(s, buf, sizeof(buf),
printf("%s", tcg_get_arg_str(s, buf, sizeof(buf),
op->args[k++]));
}
switch (c) {
@@ -1728,9 +1728,9 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
case INDEX_op_cmpsel_vec:
if (op->args[k] < ARRAY_SIZE(cond_name)
&& cond_name[op->args[k]]) {
UCLOG(",%s", cond_name[op->args[k++]]);
printf(",%s", cond_name[op->args[k++]]);
} else {
UCLOG(",$0x%" TCG_PRIlx, op->args[k++]);
printf(",$0x%" TCG_PRIlx, op->args[k++]);
}
i = 1;
break;
@@ -1744,12 +1744,12 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
unsigned ix = get_mmuidx(oi);
if (op & ~(MO_AMASK | MO_BSWAP | MO_SSIZE)) {
UCLOG(",$0x%x,%u", op, ix);
printf(",$0x%x,%u", op, ix);
} else {
const char *s_al, *s_op;
s_al = alignment_name[(op & MO_AMASK) >> MO_ASHIFT];
s_op = ldst_name[op & (MO_BSWAP | MO_SSIZE)];
UCLOG(",%s%s,%u", s_al, s_op, ix);
printf(",%s%s,%u", s_al, s_op, ix);
}
i = 1;
}
@@ -1764,7 +1764,7 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
case INDEX_op_brcond_i32:
case INDEX_op_brcond_i64:
case INDEX_op_brcond2_i32:
UCLOG("%s$L%d", k ? "," : "",
printf("%s$L%d", k ? "," : "",
arg_label(op->args[k])->id);
i++, k++;
break;
@@ -1772,12 +1772,12 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
break;
}
for (; i < nb_cargs; i++, k++) {
UCLOG("%s$0x%" TCG_PRIlx, k ? "," : "", op->args[k]);
printf("%s$0x%" TCG_PRIlx, k ? "," : "", op->args[k]);
}
if(c == INDEX_op_mov_i64){
struct TCGTemp* tp = arg_temp(op->args[1]);
if (tp && tp->val_type == TEMP_VAL_MEM){
UCLOG(" mem_base=%p ", tp->mem_base);
printf(" mem_base=%p ", tp->mem_base);
}
}
}
@@ -1786,19 +1786,19 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
unsigned life = op->life;
if (life & (SYNC_ARG * 3)) {
UCLOG(" sync:");
printf(" sync:");
for (i = 0; i < 2; ++i) {
if (life & (SYNC_ARG << i)) {
UCLOG(" %d", i);
printf(" %d", i);
}
}
}
life /= DEAD_ARG;
if (life) {
UCLOG(" dead:");
printf(" dead:");
for (i = 0; life; ++i, life >>= 1) {
if (life & 1) {
UCLOG(" %d", i);
printf(" %d", i);
}
}
}
@@ -1809,28 +1809,28 @@ void tcg_dump_op(TCGContext *s, bool have_prefs, TCGOp* op)
TCGRegSet set = op->output_pref[i];
if (i == 0) {
UCLOG(" pref=");
printf(" pref=");
} else {
UCLOG(",");
printf(",");
}
if (set == 0) {
UCLOG("none");
printf("none");
} else if (set == MAKE_64BIT_MASK(0, TCG_TARGET_NB_REGS)) {
UCLOG("all");
printf("all");
#ifdef CONFIG_DEBUG_TCG
} else if (tcg_regset_single(set)) {
TCGReg reg = tcg_regset_first(set);
printf("%s", tcg_target_reg_names[reg]);
#endif
} else if (TCG_TARGET_NB_REGS <= 32) {
UCLOG("%#x", (uint32_t)set);
printf("%#x", (uint32_t)set);
} else {
UCLOG("%#" PRIx64, (uint64_t)set);
printf("%#" PRIx64, (uint64_t)set);
}
}
}
UCLOG("\n");
printf("\n");
}
#if 0
@@ -1863,16 +1863,16 @@ void tcg_dump_ops(TCGContext *s, bool have_prefs, const char *headline)
int insn_idx = 0;
int op_idx = 0;
UCLOG("\n*** %s\n", headline);
printf("\n*** %s\n", headline);
// tcg_dump_tbs(s, tcg_dump_tb, NULL);
QTAILQ_FOREACH(op, &s->ops, link) {
if (op->opc == INDEX_op_insn_start) {
UCLOG("\n insn_idx=%d", insn_idx);
printf("\n insn_idx=%d", insn_idx);
insn_idx++;
op_idx = 0;
} else {
UCLOG(" %d: ", op_idx);
printf(" %d: ", op_idx);
}
op_idx++;
tcg_dump_op(s, have_prefs, op);