From 3da720c78901194e0206b79bf31b4a9206d2a885 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 29 May 2022 14:55:24 -0400 Subject: [PATCH] Make `requires_supervisor` explicitly compile-time usable. --- InstructionSets/M68k/Instruction.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index 314729f8d..ce211dbec 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -104,9 +104,9 @@ enum class Operation: uint8_t { Max = RESET }; -template -constexpr bool requires_supervisor(Operation op) { - switch(op) { +template +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;