Skip to content

Commit

Permalink
[mono][llvm] Assert on unhandled opcodes instead of falling back to t…
Browse files Browse the repository at this point in the history
…he mini JIT. (#85454)
  • Loading branch information
vargaz authored Apr 28, 2023
1 parent 3320374 commit a7d5482
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mono/mono/mini/mini-llvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5840,6 +5840,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
case OP_NOT_NULL:
case OP_LIVERANGE_START:
case OP_LIVERANGE_END:
case OP_TAILCALL_PARAMETER:
break;
case OP_ICONST:
values [ins->dreg] = const_int32 (ins->inst_c0);
Expand Down Expand Up @@ -11747,13 +11748,20 @@ MONO_RESTORE_WARNING
}
case OP_IL_SEQ_POINT:
break;
default: {
case OP_ARGLIST:
case OP_TAILCALL:
case OP_TAILCALL_REG:
case OP_TAILCALL_MEMBASE:
case OP_CKFINITE: {
char reason [128];

sprintf (reason, "opcode %s", mono_inst_name (ins->opcode));
set_failure (ctx, reason);
break;
}
default:
g_error ("opcode %d %s", ins->opcode, mono_inst_name (ins->opcode));
break;
}

if (!ctx_ok (ctx))
Expand Down

0 comments on commit a7d5482

Please sign in to comment.