1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Completes requires_supervisor.

This commit is contained in:
Thomas Harte 2022-04-25 20:05:45 -04:00
parent 8ff0b71b29
commit 5c356e15b5

View File

@ -102,14 +102,20 @@ enum class Operation: uint8_t {
template <Model model>
constexpr bool requires_supervisor(Operation op) {
switch(op) {
case Operation::ORItoSR: case Operation::ANDItoSR: case Operation::EORItoSR:
case Operation::MOVEfromSR:
if constexpr (model == Model::M68000) {
return false;
}
[[fallthrough]];
case Operation::ORItoSR: case Operation::ANDItoSR:
case Operation::EORItoSR: case Operation::RTE:
case Operation::RESET: case Operation::STOP:
case Operation::MOVEtoUSP: case Operation::MOVEfromUSP:
return true;
default:
return false;
}
// TODO: plenty more.
}
constexpr int size(Operation operation) {