smulh: Fixed mul with 0 acting like it had a negative result.
This commit is contained in:
parent
658e3fe24a
commit
560001e02b
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ namespace ChocolArm64.Instruction
|
|||
|
||||
long Result = (long)UMulHi128((ulong)(LSign ? -LHS : LHS), (ulong)(RSign ? -RHS : RHS));
|
||||
|
||||
if (LSign != RSign)
|
||||
if (LSign != RSign && LHS != 0 && RHS != 0)
|
||||
return (-Result) - 1; //for negative results, hi 64-bits start at 0xFFF... and count back
|
||||
return Result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue