fix dimul flags calculation for corner cases (thanks to bavi)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3649
This commit is contained in:
parent
eff418eaee
commit
2a8b0b397f
1 changed files with 3 additions and 3 deletions
|
@ -798,7 +798,7 @@
|
|||
Bits res=((Bit16s)op2) * ((Bit16s)op3); \
|
||||
save(op1,res & 0xffff); \
|
||||
FillFlagsNoCFOF(); \
|
||||
if ((res> -32768) && (res<32767)) { \
|
||||
if ((res>= -32768) && (res<=32767)) { \
|
||||
SETFLAGBIT(CF,false);SETFLAGBIT(OF,false); \
|
||||
} else { \
|
||||
SETFLAGBIT(CF,true);SETFLAGBIT(OF,true); \
|
||||
|
@ -810,8 +810,8 @@
|
|||
Bit64s res=((Bit64s)((Bit32s)op2))*((Bit64s)((Bit32s)op3)); \
|
||||
save(op1,(Bit32s)res); \
|
||||
FillFlagsNoCFOF(); \
|
||||
if ((res>-((Bit64s)(2147483647)+1)) && \
|
||||
(res<(Bit64s)2147483647)) { \
|
||||
if ((res>=-((Bit64s)(2147483647)+1)) && \
|
||||
(res<=(Bit64s)2147483647)) { \
|
||||
SETFLAGBIT(CF,false);SETFLAGBIT(OF,false); \
|
||||
} else { \
|
||||
SETFLAGBIT(CF,true);SETFLAGBIT(OF,true); \
|
||||
|
|
Loading…
Add table
Reference in a new issue