Skip to content

Commit

Permalink
Add some asserts in inc files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Dec 6, 2024
1 parent c51ffd4 commit ac6754f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/AArch64/AArch64GenDisassemblerTables.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28341,7 +28341,7 @@ static const uint8_t DecoderTableFallback32[] = {

static bool checkDecoderPredicate(MCInst *Inst, unsigned Idx) {
switch (Idx) {
default: /* llvm_unreachable("Invalid index!"); */
default: CS_ASSERT_RET_VAL(0 && "Invalid index!", false);
case 0:
return (AArch64_getFeatureBits(Inst->csh->mode, AArch64_FeatureAll) || AArch64_getFeatureBits(Inst->csh->mode, AArch64_FeatureSME));
case 1:
Expand Down Expand Up @@ -28552,7 +28552,7 @@ static DecodeStatus fname(DecodeStatus S, unsigned Idx, InsnType insn, MCInst *M
*DecodeComplete = true; \
InsnType tmp; \
switch (Idx) { \
default: /* llvm_unreachable("Invalid index!"); */ \
default: CS_ASSERT_RET_VAL(0 && "Invalid index!", MCDisassembler_Fail); \
case 0: \
tmp = fieldname(insn, 0, 16); \
MCOperand_CreateImm0(MI, tmp); \
Expand Down

0 comments on commit ac6754f

Please sign in to comment.