1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 02:55:07 +00:00

Fix decoding of RESET.

This commit is contained in:
Thomas Harte 2022-06-03 11:15:50 -04:00
parent 7b3cf6e747
commit 71e38a6781

View File

@ -71,7 +71,7 @@ uint32_t operand_mask(AddressingMode mode1, AddressingMode mode2) {
/// immediate operand.
template <Model model>
constexpr Operation Predecoder<model>::operation(OpT op) {
if(op < OpT(Operation::Max)) {
if(op <= OpT(Operation::Max)) {
return Operation(op);
}
@ -445,6 +445,7 @@ template <uint8_t op> uint32_t Predecoder<model>::invalid_operands() {
case OpT(Operation::RTS):
case OpT(Operation::TRAPV):
case OpT(Operation::RTR):
case OpT(Operation::RESET):
return ~NoOperandMask::value;
case OpT(Operation::UNLINK):