From: Aleksandar Andrejevic Date: Thu, 4 Jun 2015 20:25:14 +0000 (+0000) Subject: [FAST486] X-Git-Tag: backups/colins-printing-for-freedom@73041~15^2~205 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=e97fb8ee65b221f9ff1ef30743aa5b01a2b59273 [FAST486] Fix VERR and VERW. svn path=/trunk/; revision=68016 --- diff --git a/reactos/lib/fast486/opgroups.c b/reactos/lib/fast486/opgroups.c index f540904481c..e3e6ba7ed2c 100644 --- a/reactos/lib/fast486/opgroups.c +++ b/reactos/lib/fast486/opgroups.c @@ -2002,13 +2002,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeGroup0F00) return; } - /* This is a privileged instruction */ - if (Fast486GetCurrentPrivLevel(State) != 0) - { - Fast486Exception(State, FAST486_EXCEPTION_GP); - return; - } - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, @@ -2033,23 +2026,23 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeGroup0F00) /* Set ZF if it is valid and accessible */ State->Flags.Zf = GdtEntry.Present // must be present - && GdtEntry.SystemType // must be a segment - && (((ModRegRm.Register == 4) - /* code segments are only readable if the RW bit is set */ - && (!GdtEntry.Executable || GdtEntry.ReadWrite)) - || ((ModRegRm.Register == 5) - /* code segments are never writable, data segments are writable when RW is set */ - && (!GdtEntry.Executable && GdtEntry.ReadWrite))) - /* - * for segments other than conforming code segments, - * both RPL and CPL must be less than or equal to DPL - */ - && ((!GdtEntry.Executable || !GdtEntry.DirConf) - && ((GET_SEGMENT_RPL(Selector) <= GdtEntry.Dpl) - && (Fast486GetCurrentPrivLevel(State) <= GdtEntry.Dpl))) - /* for conforming code segments, DPL must be less than or equal to CPL */ - && ((GdtEntry.Executable && GdtEntry.DirConf) - && (GdtEntry.Dpl <= Fast486GetCurrentPrivLevel(State))); + && GdtEntry.SystemType // must be a segment + && (((ModRegRm.Register == 4) + /* code segments are only readable if the RW bit is set */ + && (!GdtEntry.Executable || GdtEntry.ReadWrite)) + || ((ModRegRm.Register == 5) + /* code segments are never writable, data segments are writable when RW is set */ + && (!GdtEntry.Executable && GdtEntry.ReadWrite))) + /* + * for segments other than conforming code segments, + * both RPL and CPL must be less than or equal to DPL + */ + && (((!GdtEntry.Executable || !GdtEntry.DirConf) + && (GET_SEGMENT_RPL(Selector) <= GdtEntry.Dpl) + && (Fast486GetCurrentPrivLevel(State) <= GdtEntry.Dpl)) + /* for conforming code segments, DPL must be less than or equal to CPL */ + || ((GdtEntry.Executable && GdtEntry.DirConf) + && (GdtEntry.Dpl <= Fast486GetCurrentPrivLevel(State)))); break;