promote illegal opcode to a panic

if the engine25519 hits an illegal opcode, really, that's a
software bug that should be fixed. panic, so that we get
a guru meditation and a bug report.
This commit is contained in:
bunnie 2024-03-28 10:21:27 +08:00
parent 4170979f6a
commit cdd1539ba8

View file

@ -53,8 +53,7 @@ pub fn was_engine_error(job_len: usize) -> bool {
let reason = engine.r(utra::engine::EV_PENDING);
if reason & engine.ms(utra::engine::EV_PENDING_ILLEGAL_OPCODE, 1) != 0 {
log::warn!("Illegal opcode encountered in engine25519");
return true;
panic!("Illegal opcode encountered in engine25519");
}
// if the job length isn't what we had set it to, conclude that the
// microcode engine went through a suspend/resume cycle