[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.


svn path=/trunk/; revision=68078
This commit is contained in:
Aleksandar Andrejevic 2015-06-08 15:25:48 +00:00
parent d87b37c078
commit ea6ec077c9

View file

@ -3532,7 +3532,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeImulModrmImm)
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 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeImulModrmImm)
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,