From d6f72d9862296d125f0e3353302dc4c76620737a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 29 May 2022 14:56:44 -0400 Subject: [PATCH] Avoid runtime checking of instruction supervisor requirements. --- .../Implementation/68000Mk2Implementation.hpp | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index a5a83dcb5..f99d9f7b8 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -602,18 +602,21 @@ void Processor()) { \ + if(!status_.is_supervisor) { \ + RaiseException(InstructionSet::M68k::Exception::PrivilegeViolation); \ + } \ + } + +#define CASE(x) \ + case InstructionSet::M68k::Operation::x: \ + CheckSupervisor(x); \ operand_flags_ = InstructionSet::M68k::operand_flags(); #define StdCASE(x, y) \ @@ -642,7 +645,7 @@ void Processor