Make sure unsupported/illegal instructions are caught
This commit is contained in:
@@ -47,6 +47,8 @@ impl Core {
|
||||
}
|
||||
};
|
||||
|
||||
assert_eq!(instr & 3, 3, "Compressed instructions not supported");
|
||||
|
||||
let instr = Instruction(instr);
|
||||
|
||||
let runner = find_runner(instr);
|
||||
@@ -65,6 +67,9 @@ impl Core {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
eprintln!("Invalid Instruction");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user