Author: aandrejevic
Date: Mon Jun  8 15:25:48 2015
New Revision: 68078

URL: http://svn.reactos.org/svn/reactos?rev=68078&view=rev
Log:
[FAST486]
Fix IMUL. MINSHORT and MAXSHORT aren't good constants since they don't have
a (SHORT) cast, and (LONG)((SHORT)MINSHORT) is uglier than just using -32768.


Modified:
    trunk/reactos/lib/fast486/opcodes.c

Modified: trunk/reactos/lib/fast486/opcodes.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/opcodes.c?rev=68078&r1=68077&r2=68078&view=diff
==============================================================================
--- trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] Mon Jun  8 15:25:48 2015
@@ -3532,7 +3532,7 @@
         Product = (LONGLONG)Multiplicand * (LONGLONG)Multiplier;
 
         /* Check for carry/overflow */
-        State->Flags.Cf = State->Flags.Of = ((Product < MINLONG) || (Product > 
MAXLONG));
+        State->Flags.Cf = State->Flags.Of = ((Product < -2147483648LL) || 
(Product > 2147483647LL));
 
         /* Write-back the result */
         Fast486WriteModrmDwordOperands(State,
@@ -3559,7 +3559,7 @@
         Product = (LONG)Multiplicand * (LONG)Multiplier;
 
         /* Check for carry/overflow */
-        State->Flags.Cf = State->Flags.Of = ((Product < MINSHORT) || (Product 
> MAXSHORT));
+        State->Flags.Cf = State->Flags.Of = ((Product < -32768) || (Product > 
32767));
 
         /* Write-back the result */
         Fast486WriteModrmWordOperands(State,


Reply via email to