+2021-11-25 Nick Clifton <nickc@redhat.com>
+
+ PR 28614
+ * aarch64-asm.c: Replace assert(0) with real code.
+ * aarch64-dis.c: Likewise.
+ * aarch64-opc.c: Likewise.
+
2021-11-25 Nick Clifton <nickc@redhat.com>
* po/fr.po; Updated French translation.
insert_fields (code, reglane_index, 0, 2, FLD_L, FLD_H);
break;
default:
- assert (0);
+ return false;
}
}
else if (inst->opcode->iclass == cryptosm3)
insert_field (FLD_H, code, reglane_index, 0);
break;
default:
- assert (0);
+ return false;
}
}
return true;
case 2: value = 0xa; break;
case 3: value = 0x6; break;
case 4: value = 0x2; break;
- default: assert (0);
+ default: return false;
}
break;
case 2:
value = 0x0;
break;
default:
- assert (0);
+ return false;
}
insert_field (FLD_opcode, code, value, 0);
opcodeh2 = 0x2;
break;
default:
- assert (0);
+ return false;
}
insert_fields (code, QSsize, 0, 3, FLD_vldst_size, FLD_S, FLD_Q);
gen_sub_field (FLD_asisdlso_opcode, 1, 2, &field);
case AARCH64_OPND_QLF_S_S: value = 0; break;
case AARCH64_OPND_QLF_S_D: value = 1; break;
case AARCH64_OPND_QLF_S_Q: value = 2; break;
- default: assert (0);
+ default: return false;
}
insert_field (FLD_ldst_size, code, value, 0);
}
fld_zan_imm = regno;
break;
default:
- assert (0);
+ return false;
}
insert_field (self->fields[0], code, fld_size, 0);
else if (info->reg.regno == 'z')
fld_crm = 0x04; /* SVCRZA. */
else
- assert (0);
+ return false;
insert_field (self->fields[0], code, fld_crm, 0);
return true;
fld_tshl = 0x0;
break;
default:
- assert (0);
+ return false;
}
insert_field (self->fields[2], code, fld_i1, 0);
qualifier = inst->operands[0].qualifier;
break;
default:
- assert (0);
+ return;
}
assert (qualifier == AARCH64_OPND_QLF_V_4S
|| qualifier == AARCH64_OPND_QLF_V_2D);
case AARCH64_OPND_QLF_S_S: value = 0; break;
case AARCH64_OPND_QLF_S_D: value = 1; break;
case AARCH64_OPND_QLF_S_H: value = 3; break;
- default: assert (0);
+ default: return;
}
insert_field (FLD_type, &inst->value, value, 0);
}
value = ~inst->operands[1].imm.value;
break;
default:
- assert (0);
+ return;
}
inst->operands[1].type = AARCH64_OPND_HALF;
is32 = inst->operands[0].qualifier == AARCH64_OPND_QLF_W;
if (! aarch64_wide_constant_p (value, is32, &shift_amount))
/* The constraint check should have guaranteed this wouldn't happen. */
- assert (0);
+ return;
value >>= shift_amount;
value &= 0xffff;
inst->operands[1].imm.value = value;
case 4: gen_sub_field (FLD_cmode, 1, 2, &field); break; /* per word */
case 2: gen_sub_field (FLD_cmode, 1, 1, &field); break; /* per half */
case 1: gen_sub_field (FLD_cmode, 1, 0, &field); break; /* per byte */
- default: assert (0); return false;
+ default: return false;
}
/* 00: 0; 01: 8; 10:16; 11:24. */
info->shifter.amount = extract_field_2 (&field, code, 0) << 3;
info->shifter.amount = extract_field_2 (&field, code, 0) ? 16 : 8;
break;
default:
- assert (0);
return false;
}
case 32: imm = (imm << 32) | imm;
/* Fall through. */
case 64: break;
- default: assert (0); return 0;
+ default: return 0;
}
*result = imm & ~((uint64_t) -1 << (esize * 4) << (esize * 4));
aarch64_sys_regs_sr[]. */
value = value & ~(0x7);
break;
- default: assert (0); return false;
+ default: return false;
}
for (i = 0; sysins_ops[i].name != NULL; ++i)
info->za_tile_vector.index.imm = 0;
break;
default:
- assert (0);
+ return false;
}
return true;
else if (fld_crm == 0x2)
info->reg.regno = 'z';
else
- assert (0);
+ return false;
return true;
}
inst->operands[0].qualifier = qualifier;
break;
default:
- assert (0);
return 0;
}
successfully converted to the form of ALIAS. */
if (convert_to_alias (©, alias) == 1)
{
- int res;
aarch64_replace_opcode (©, alias);
- res = aarch64_match_operands_constraint (©, NULL);
- assert (res == 1);
- DEBUG_TRACE ("succeed with %s via conversion", alias->name);
- memcpy (inst, ©, sizeof (aarch64_inst));
+ if (aarch64_match_operands_constraint (©, NULL) != 1)
+ {
+ DEBUG_TRACE ("FAILED with alias %s ", alias->name);
+ }
+ else
+ {
+ DEBUG_TRACE ("succeed with %s via conversion", alias->name);
+ memcpy (inst, ©, sizeof (aarch64_inst));
+ }
return;
}
}
mismatch_details, &insn_sequence);
switch (result)
{
- case ERR_UND:
- case ERR_UNP:
- case ERR_NYI:
- assert (0);
case ERR_VFI:
print_verifier_notes (mismatch_details, info);
break;
+ case ERR_UND:
+ case ERR_UNP:
+ case ERR_NYI:
default:
break;
}
snprintf (buf, size, "#0x%-20" PRIx64 "\t// #%" PRIi64,
opnd->imm.value, opnd->imm.value);
break;
- default: assert (0);
+ default:
+ snprintf (buf, size, "<invalid>");
+ break;
}
break;
snprintf (buf, size, "#%.18e", c.d);
}
break;
- default: assert (0);
+ default:
+ snprintf (buf, size, "<invalid>");
+ break;
}
break;
break;
default:
- assert (0);
+ snprintf (buf, size, "<invalid>");
+ break;
}
}
\f