1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-19 08:31:11 +00:00

Make requires_supervisor explicitly compile-time usable.

This commit is contained in:
Thomas Harte 2022-05-29 14:55:24 -04:00
parent dbf7909b85
commit 3da720c789

View File

@ -104,9 +104,9 @@ enum class Operation: uint8_t {
Max = RESET
};
template <Model model>
constexpr bool requires_supervisor(Operation op) {
switch(op) {
template <Model model, Operation t_op = Operation::Undefined>
constexpr bool requires_supervisor(Operation r_op = Operation::Undefined) {
switch(t_op != Operation::Undefined ? t_op : r_op) {
case Operation::MOVEfromSR:
if constexpr (model == Model::M68000) {
return false;