From c760a93e1ad66372e500b140871d910b6c257220 Mon Sep 17 00:00:00 2001 From: SarahW Date: Fri, 30 Jun 2017 21:02:28 +0100 Subject: [PATCH] Re-enabled recompiled CLI/STI with VME. --- src/codegen_ops_misc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/codegen_ops_misc.h b/src/codegen_ops_misc.h index b4576d4..9eb9567 100644 --- a/src/codegen_ops_misc.h +++ b/src/codegen_ops_misc.h @@ -16,13 +16,15 @@ static uint32_t ropSTD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32 static uint32_t ropCLI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) { - return 0; + if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI))) + return 0; CLEAR_BITS((uintptr_t)&flags, I_FLAG); return op_pc; } static uint32_t ropSTI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) { - return 0; + if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI))) + return 0; SET_BITS((uintptr_t)&flags, I_FLAG); return op_pc; }