* Sync up to trunk head (r65298).
[reactos.git] / lib / fast486 / extraops.c
index 38dfc3f..1f2fc72 100644 (file)
@@ -301,27 +301,26 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeInvalid)
 {
     DPRINT1("FAST486 -- Extended opcode 0x%02X is INVALID!\n", Opcode);
     Fast486Exception(State, FAST486_EXCEPTION_UD);
-    return FALSE;
+    return;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeUnimplemented)
 {
     DPRINT1("FAST486 -- Extended opcode 0x%02X is UNIMPLEMENTED\n", Opcode);
     // Fast486Exception(State, FAST486_EXCEPTION_UD);
-    return FALSE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcode0F0B)
 {
     /* Reserved opcode (UD2) */
     Fast486Exception(State, FAST486_EXCEPTION_UD);
-    return FALSE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
 {
     BOOLEAN OperandSize, AddressSize;
     FAST486_MOD_REG_RM ModRegRm;
+    BOOLEAN Valid;
     USHORT Selector;
     FAST486_GDT_ENTRY GdtEntry;
     DWORD AccessRights;
@@ -333,7 +332,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
     {
         /* Not recognized */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     NO_LOCK_PREFIX();
@@ -344,7 +343,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -355,7 +354,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     
         Selector = LOWORD(Value);
@@ -366,49 +365,20 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Selector))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
 
-    if (!(Selector & SEGMENT_TABLE_INDICATOR))
+    if (!Fast486ReadDescriptorEntry(State, Selector, &Valid, &GdtEntry))
     {
-        /* Check if the GDT contains the entry */
-        if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1))
-        {
-            State->Flags.Zf = FALSE;
-            return TRUE;
-        }
-
-        /* Read the GDT */
-        if (!Fast486ReadLinearMemory(State,
-                                     State->Gdtr.Address
-                                     + GET_SEGMENT_INDEX(Selector),
-                                     &GdtEntry,
-                                     sizeof(GdtEntry)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        /* Exception occurred */
+        return;
     }
-    else
-    {
-        /* Check if the LDT contains the entry */
-        if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1))
-        {
-            State->Flags.Zf = FALSE;
-            return TRUE;
-        }
 
-        /* Read the LDT */
-        if (!Fast486ReadLinearMemory(State,
-                                     State->Ldtr.Base
-                                     + GET_SEGMENT_INDEX(Selector),
-                                     &GdtEntry,
-                                     sizeof(GdtEntry)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+    if (!Valid)
+    {
+        State->Flags.Zf = FALSE;
+        return;
     }
 
     /* Privilege check */
@@ -416,7 +386,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
         || (Fast486GetCurrentPrivLevel(State) > GdtEntry.Dpl))
     {
         State->Flags.Zf = FALSE;
-        return TRUE;
+        return;
     }
 
     /* Set ZF */
@@ -426,30 +396,15 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar)
     AccessRights = ((PDWORD)&GdtEntry)[1] & 0x00F0FF00;
 
     /* Return the access rights */
-    if (OperandSize)
-    {
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, AccessRights))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-    else
-    {
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(AccessRights)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-
-    return TRUE;
+    if (OperandSize) Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, AccessRights);
+    else Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(AccessRights));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
 {
     BOOLEAN OperandSize, AddressSize;
     FAST486_MOD_REG_RM ModRegRm;
+    BOOLEAN Valid;
     USHORT Selector;
     ULONG Limit;
     FAST486_GDT_ENTRY GdtEntry;
@@ -461,7 +416,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
     {
         /* Not recognized */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     NO_LOCK_PREFIX();
@@ -472,7 +427,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -483,7 +438,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     
         Selector = LOWORD(Value);
@@ -494,49 +449,20 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Selector))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
 
-    if (!(Selector & SEGMENT_TABLE_INDICATOR))
+    if (!Fast486ReadDescriptorEntry(State, Selector, &Valid, &GdtEntry))
     {
-        /* Check if the GDT contains the entry */
-        if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1))
-        {
-            State->Flags.Zf = FALSE;
-            return TRUE;
-        }
-
-        /* Read the GDT */
-        if (!Fast486ReadLinearMemory(State,
-                                     State->Gdtr.Address
-                                     + GET_SEGMENT_INDEX(Selector),
-                                     &GdtEntry,
-                                     sizeof(GdtEntry)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        /* Exception occurred */
+        return;
     }
-    else
-    {
-        /* Check if the LDT contains the entry */
-        if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1))
-        {
-            State->Flags.Zf = FALSE;
-            return TRUE;
-        }
 
-        /* Read the LDT */
-        if (!Fast486ReadLinearMemory(State,
-                                     State->Ldtr.Base
-                                     + GET_SEGMENT_INDEX(Selector),
-                                     &GdtEntry,
-                                     sizeof(GdtEntry)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+    if (!Valid)
+    {
+        State->Flags.Zf = FALSE;
+        return;
     }
 
     /* Privilege check */
@@ -544,36 +470,24 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl)
         || (Fast486GetCurrentPrivLevel(State) > GdtEntry.Dpl))
     {
         State->Flags.Zf = FALSE;
-        return TRUE;
+        return;
     }
 
     /* Calculate the limit */
     Limit = GdtEntry.Limit | (GdtEntry.LimitHigh << 16);
-    if (GdtEntry.Granularity) Limit <<= 12;
-
-    /* Set ZF */
-    State->Flags.Zf = TRUE;
 
-    if (OperandSize)
-    {
-        /* Return the limit */
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, Limit))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-    else
+    if (GdtEntry.Granularity)
     {
-        /* Return the limit */
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(Limit)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Limit <<= 12;
+        Limit |= 0x00000FFF;
     }
 
-    return TRUE;
+    /* Set ZF */
+    State->Flags.Zf = TRUE;
+
+    /* Return the limit */
+    if (OperandSize) Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, Limit);
+    else Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(Limit));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeClts)
@@ -584,13 +498,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeClts)
     if (Fast486GetCurrentPrivLevel(State) != 0)
     {
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     /* Clear the task switch bit */
     State->ControlRegisters[FAST486_REG_CR0] &= ~FAST486_CR0_TS;
-
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreControlReg)
@@ -605,21 +517,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreControlReg)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* The current privilege level must be zero */
     if (Fast486GetCurrentPrivLevel(State) != 0)
     {
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     if ((ModRegRm.Register == 1) || (ModRegRm.Register > 3))
     {
         /* CR1, CR4, CR5, CR6 and CR7 don't exist */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     if (ModRegRm.Register != 0)
@@ -630,9 +542,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreControlReg)
 
     /* Store the value of the control register */
     State->GeneralRegs[ModRegRm.SecondRegister].Long = State->ControlRegisters[ModRegRm.Register];
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreDebugReg)
@@ -647,14 +556,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreDebugReg)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* The current privilege level must be zero */
     if (Fast486GetCurrentPrivLevel(State) != 0)
     {
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     if ((ModRegRm.Register == 6) || (ModRegRm.Register == 7))
@@ -667,14 +576,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreDebugReg)
     {
         /* Disallow access to debug registers */
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     /* Store the value of the debug register */
     State->GeneralRegs[ModRegRm.SecondRegister].Long = State->DebugRegisters[ModRegRm.Register];
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadControlReg)
@@ -690,21 +596,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadControlReg)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* The current privilege level must be zero */
     if (Fast486GetCurrentPrivLevel(State) != 0)
     {
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     if ((ModRegRm.Register == 1) || (ModRegRm.Register > 3))
     {
         /* CR1, CR4, CR5, CR6 and CR7 don't exist */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     if (ModRegRm.Register != 0)
@@ -725,15 +631,23 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadControlReg)
         {
             /* Invalid value */
             Fast486Exception(State, FAST486_EXCEPTION_GP);
-            return FALSE;
+            return;
         }
     }
 
+#ifndef FAST486_NO_PREFETCH
+    /* Changing CR0 or CR3 can interfere with prefetching (because of paging) */
+    State->PrefetchValid = FALSE;
+#endif
+
+    if (State->Tlb && (ModRegRm.Register == (INT)FAST486_REG_CR3))
+    {
+        /* Flush the TLB */
+        RtlZeroMemory(State->Tlb, NUM_TLB_ENTRIES * sizeof(ULONG));
+    }
+
     /* Load a value to the control register */
     State->ControlRegisters[ModRegRm.Register] = Value;
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadDebugReg)
@@ -748,14 +662,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadDebugReg)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* The current privilege level must be zero */
     if (Fast486GetCurrentPrivLevel(State) != 0)
     {
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     if ((ModRegRm.Register == 6) || (ModRegRm.Register == 7))
@@ -768,7 +682,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadDebugReg)
     {
         /* Disallow access to debug registers */
         Fast486Exception(State, FAST486_EXCEPTION_GP);
-        return FALSE;
+        return;
     }
 
     /* Load a value to the debug register */
@@ -784,15 +698,12 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLoadDebugReg)
         /* The reserved bits are 0 */
         State->DebugRegisters[ModRegRm.Register] &= ~FAST486_DR5_RESERVED;
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodePushFs)
 {
     /* Call the internal API */
-    return Fast486StackPush(State, State->SegmentRegs[FAST486_REG_FS].Selector);
+    Fast486StackPush(State, State->SegmentRegs[FAST486_REG_FS].Selector);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopFs)
@@ -802,11 +713,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopFs)
     if (!Fast486StackPop(State, &NewSelector))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Call the internal API */
-    return Fast486LoadSegment(State, FAST486_REG_FS, LOWORD(NewSelector));
+    Fast486LoadSegment(State, FAST486_REG_FS, LOWORD(NewSelector));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest)
@@ -828,7 +739,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Get the bit number */
@@ -855,7 +766,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -869,15 +780,12 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
         State->Flags.Cf = (Value >> BitNumber) & 1;
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
@@ -897,7 +805,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (Opcode == 0xA4)
@@ -906,7 +814,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
         if (!Fast486FetchByte(State, &Count))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
     else
@@ -919,7 +827,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
     Count &= 0x1F;
 
     /* Do nothing if the count is zero */
-    if (Count == 0) return TRUE;
+    if (Count == 0) return;
 
     if (OperandSize)
     {
@@ -928,7 +836,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -943,7 +851,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
         State->Flags.Pf = Fast486CalculateParity(Result);
 
         /* Write back the result */
-        return Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result);
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result);
     }
     else
     {
@@ -953,7 +861,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         DoubleSource = Source | (Source << 16);
@@ -972,14 +880,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
         State->Flags.Pf = Fast486CalculateParity(Result);
 
         /* Write back the result */
-        return Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result);
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result);
     }
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodePushGs)
 {
     /* Call the internal API */
-    return Fast486StackPush(State, State->SegmentRegs[FAST486_REG_GS].Selector);
+    Fast486StackPush(State, State->SegmentRegs[FAST486_REG_GS].Selector);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopGs)
@@ -989,11 +897,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopGs)
     if (!Fast486StackPop(State, &NewSelector))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Call the internal API */
-    return Fast486LoadSegment(State, FAST486_REG_GS, LOWORD(NewSelector));
+    Fast486LoadSegment(State, FAST486_REG_GS, LOWORD(NewSelector));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
@@ -1015,7 +923,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Get the bit number */
@@ -1042,7 +950,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1052,11 +960,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
         Value |= 1 << BitNumber;
 
         /* Write back the result */
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value);
     }
     else
     {
@@ -1066,7 +970,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1076,15 +980,8 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts)
         Value |= 1 << BitNumber;
 
         /* Write back the result */
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value);
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
@@ -1104,7 +1001,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (Opcode == 0xAC)
@@ -1113,7 +1010,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
         if (!Fast486FetchByte(State, &Count))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
     else
@@ -1126,7 +1023,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
     Count &= 0x1F;
 
     /* Do nothing if the count is zero */
-    if (Count == 0) return TRUE;
+    if (Count == 0) return;
 
     if (OperandSize)
     {
@@ -1135,7 +1032,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -1150,7 +1047,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
         State->Flags.Pf = Fast486CalculateParity(Result);
 
         /* Write back the result */
-        return Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result);
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result);
     }
     else
     {
@@ -1159,7 +1056,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -1178,7 +1075,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
         State->Flags.Pf = Fast486CalculateParity(Result);
 
         /* Write back the result */
-        return Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result);
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result);
     }
 }
 
@@ -1196,7 +1093,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -1211,7 +1108,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul)
                                            (PULONG)&Source))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -1221,7 +1118,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul)
         State->Flags.Cf = State->Flags.Of = ((Result < -2147483648LL) || (Result > 2147483647LL));
 
         /* Write back the result */
-        return Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, (ULONG)((LONG)Result));
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, (ULONG)((LONG)Result));
     }
     else
     {
@@ -1235,7 +1132,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul)
                                           (PUSHORT)&Source))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -1245,7 +1142,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul)
         State->Flags.Cf = State->Flags.Of = ((Result < -32768) || (Result > 32767));
 
         /* Write back the result */
-        return Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, (USHORT)((SHORT)Result));
+        Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, (USHORT)((SHORT)Result));
     }
 }
 
@@ -1262,14 +1159,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchgByte)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the operands */
     if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Source, &Destination))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Compare AL with the destination */
@@ -1287,16 +1184,13 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchgByte)
     if (State->Flags.Zf)
     {
         /* Load the source operand into the destination */
-        return Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Source);
+        Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Source);
     }
     else
     {
         /* Load the destination into AL */
         State->GeneralRegs[FAST486_REG_EAX].LowByte = Destination;
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
@@ -1313,7 +1207,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -1325,7 +1219,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Compare EAX with the destination */
@@ -1343,7 +1237,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         if (State->Flags.Zf)
         {
             /* Load the source operand into the destination */
-            return Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Source);
+            Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Source);
         }
         else
         {
@@ -1360,7 +1254,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Source, &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Compare AX with the destination */
@@ -1378,7 +1272,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
         if (State->Flags.Zf)
         {
             /* Load the source operand into the destination */
-            return Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Source);
+            Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Source);
         }
         else
         {
@@ -1386,9 +1280,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg)
             State->GeneralRegs[FAST486_REG_EAX].LowWord = Destination;
         }
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss)
@@ -1409,14 +1300,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (!ModRegRm.Memory)
     {
         /* Invalid */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     if (!Fast486ReadMemory(State,
@@ -1428,7 +1319,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss)
                            OperandSize ? 6 : 4))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -1440,9 +1331,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss)
         State->GeneralRegs[ModRegRm.Register].Long = Offset;
 
         /* Load the segment */
-        return Fast486LoadSegment(State,
-                                  FAST486_REG_SS,
-                                  Segment);
+        Fast486LoadSegment(State, FAST486_REG_SS, Segment);
     }
     else
     {
@@ -1453,9 +1342,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss)
         State->GeneralRegs[ModRegRm.Register].LowWord = Offset;
 
         /* Load the segment */
-        return Fast486LoadSegment(State,
-                                  FAST486_REG_SS,
-                                  Segment);
+        Fast486LoadSegment(State, FAST486_REG_SS, Segment);
     }
 }
 
@@ -1478,7 +1365,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Get the bit number */
@@ -1505,7 +1392,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1515,11 +1402,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr)
         Value &= ~(1 << BitNumber);
 
         /* Write back the result */
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value);
     }
     else
     {
@@ -1529,7 +1412,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1539,15 +1422,8 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr)
         Value &= ~(1 << BitNumber);
 
         /* Write back the result */
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value);
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs)
@@ -1568,14 +1444,14 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (!ModRegRm.Memory)
     {
         /* Invalid */
         Fast486Exception(State, FAST486_EXCEPTION_UD);
-        return FALSE;
+        return;
     }
 
     if (!Fast486ReadMemory(State,
@@ -1587,7 +1463,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs)
                            OperandSize ? 6 : 4))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (OperandSize)
@@ -1599,10 +1475,10 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs)
         State->GeneralRegs[ModRegRm.Register].Long = Offset;
 
         /* Load the segment */
-        return Fast486LoadSegment(State,
-                                  (Opcode == 0xB4)
-                                  ? FAST486_REG_FS : FAST486_REG_GS,
-                                  Segment);
+        Fast486LoadSegment(State,
+                           (Opcode == 0xB4)
+                           ? FAST486_REG_FS : FAST486_REG_GS,
+                           Segment);
     }
     else
     {
@@ -1613,10 +1489,10 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs)
         State->GeneralRegs[ModRegRm.Register].LowWord = Offset;
 
         /* Load the segment */
-        return Fast486LoadSegment(State,
-                                  (Opcode == 0xB4)
-                                  ? FAST486_REG_FS : FAST486_REG_GS,
-                                  Segment);
+        Fast486LoadSegment(State,
+                           (Opcode == 0xB4)
+                           ? FAST486_REG_FS : FAST486_REG_GS,
+                           Segment);
     }
 }
 
@@ -1635,21 +1511,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxByte)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the operands */
     if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Write back the zero-extended value */
-    return Fast486WriteModrmDwordOperands(State,
-                                          &ModRegRm,
-                                          TRUE,
-                                          (ULONG)Value);
+    Fast486WriteModrmDwordOperands(State,
+                                   &ModRegRm,
+                                   TRUE,
+                                   (ULONG)Value);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxWord)
@@ -1667,21 +1543,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxWord)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the operands */
     if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Write back the zero-extended value */
-    return Fast486WriteModrmDwordOperands(State,
-                                          &ModRegRm,
-                                          TRUE,
-                                          (ULONG)Value);
+    Fast486WriteModrmDwordOperands(State,
+                                   &ModRegRm,
+                                   TRUE,
+                                   (ULONG)Value);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
@@ -1703,7 +1579,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Get the bit number */
@@ -1730,7 +1606,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1740,11 +1616,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
         Value ^= 1 << BitNumber;
 
         /* Write back the result */
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Value);
     }
     else
     {
@@ -1754,7 +1626,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
         if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Set CF to the bit value */
@@ -1764,15 +1636,8 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
         Value ^= 1 << BitNumber;
 
         /* Write back the result */
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Value);
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
@@ -1799,7 +1664,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the value */
@@ -1808,7 +1673,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
     else
@@ -1819,17 +1684,17 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
                                           (PUSHORT)&Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
 
     /* Set ZF */
     State->Flags.Zf = (Value == 0);
-    if (State->Flags.Zf) return TRUE;
+    if (State->Flags.Zf) return;
 
     for (i = 0; i < DataSize; i++)
     {
-        if(Value & (1 << i))
+        if (Value & (1 << i))
         {
             /* Save the bit number */
             BitNumber = i;
@@ -1840,24 +1705,8 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
     }
 
     /* Write back the result */
-    if (OperandSize)
-    {
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, BitNumber))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-    else
-    {
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(BitNumber)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-
-    return TRUE;
+    if (OperandSize) Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, BitNumber);
+    else Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(BitNumber));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr)
@@ -1884,7 +1733,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the value */
@@ -1893,7 +1742,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr)
         if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
     else
@@ -1904,17 +1753,17 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr)
                                           (PUSHORT)&Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
 
     /* Set ZF according to the value */
     State->Flags.Zf = (Value == 0);
-    if (State->Flags.Zf) return TRUE;
+    if (State->Flags.Zf) return;
 
     for (i = DataSize - 1; i >= 0; i--)
     {
-        if(Value & (1 << i))
+        if (Value & (1 << i))
         {
             /* Save the bit number */
             BitNumber = i;
@@ -1925,24 +1774,8 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr)
     }
 
     /* Write back the result */
-    if (OperandSize)
-    {
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, BitNumber))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-    else
-    {
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(BitNumber)))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
-    }
-
-    return TRUE;
+    if (OperandSize) Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, BitNumber);
+    else Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(BitNumber));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxByte)
@@ -1960,21 +1793,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxByte)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the operands */
     if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, (PUCHAR)&Value))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Write back the sign-extended value */
-    return Fast486WriteModrmDwordOperands(State,
-                                          &ModRegRm,
-                                          TRUE,
-                                          (ULONG)((LONG)Value));
+    Fast486WriteModrmDwordOperands(State,
+                                   &ModRegRm,
+                                   TRUE,
+                                   (ULONG)((LONG)Value));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxWord)
@@ -1992,21 +1825,21 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxWord)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Read the operands */
     if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Write back the sign-extended value */
-    return Fast486WriteModrmDwordOperands(State,
-                                          &ModRegRm,
-                                          TRUE,
-                                          (ULONG)((LONG)Value));
+    Fast486WriteModrmDwordOperands(State,
+                                   &ModRegRm,
+                                   TRUE,
+                                   (ULONG)((LONG)Value));
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalJmp)
@@ -2027,7 +1860,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalJmp)
         if (!Fast486FetchDword(State, (PULONG)&Offset))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
     }
     else
@@ -2037,7 +1870,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalJmp)
         if (!Fast486FetchWord(State, (PUSHORT)&Value))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Sign-extend */
@@ -2114,9 +1947,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalJmp)
         /* Move the instruction pointer */
         State->InstPtr.Long += Offset;
     }
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalSet)
@@ -2131,7 +1961,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalSet)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Make sure this is the right instruction */
@@ -2203,7 +2033,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeConditionalSet)
     }
 
     /* Write back the result */
-    return Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Value);
+    Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Value);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXaddByte)
@@ -2221,7 +2051,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXaddByte)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     if (!Fast486ReadModrmByteOperands(State,
@@ -2230,7 +2060,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXaddByte)
                                       &Destination))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Calculate the result */
@@ -2249,17 +2079,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXaddByte)
     if (!Fast486WriteModrmByteOperands(State, &ModRegRm, FALSE, Result))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Write the old value of the destination to the source */
-    if (!Fast486WriteModrmByteOperands(State, &ModRegRm, TRUE, Destination))
-    {
-        /* Exception occurred */
-        return FALSE;
-    }
-
-    return TRUE;
+    Fast486WriteModrmByteOperands(State, &ModRegRm, TRUE, Destination);
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
@@ -2279,7 +2103,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Check the operand size */
@@ -2293,7 +2117,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
                                            &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -2312,15 +2136,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
         if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Write the sum to the destination */
-        if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result);
     }
     else
     {
@@ -2332,7 +2152,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
                                           &Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Calculate the result */
@@ -2351,18 +2171,12 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeXadd)
         if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, Destination))
         {
             /* Exception occurred */
-            return FALSE;
+            return;
         }
 
         /* Write the sum to the destination */
-        if (!Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result))
-        {
-            /* Exception occurred */
-            return FALSE;
-        }
+        Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result);
     }
-
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBswap)
@@ -2377,9 +2191,6 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBswap)
     /* Swap the byte order */
     SWAP(Pointer[0], Pointer[3]);
     SWAP(Pointer[1], Pointer[2]);
-
-    /* Return success */
-    return TRUE;
 }
 
 FAST486_OPCODE_HANDLER(Fast486OpcodeExtended)
@@ -2390,11 +2201,11 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeExtended)
     if (!Fast486FetchByte(State, &SecondOpcode))
     {
         /* Exception occurred */
-        return FALSE;
+        return;
     }
 
     /* Call the extended opcode handler */
-    return Fast486ExtendedHandlers[SecondOpcode](State, SecondOpcode);
+    Fast486ExtendedHandlers[SecondOpcode](State, SecondOpcode);
 }
 
 /* EOF */