Merge pull request #4 from dmcoles/master
Fixed issue with DIVS instruction with negative values.
This commit is contained in:
commit
28f0dd67d6
1 changed files with 2 additions and 2 deletions
|
|
@ -1063,7 +1063,7 @@ function CPU() {
|
||||||
regs.pc = fault.pc;
|
regs.pc = fault.pc;
|
||||||
return exception(5);
|
return exception(5);
|
||||||
} else {
|
} else {
|
||||||
var quo = Math.floor(d / s);
|
var quo = ~~(d / s);
|
||||||
|
|
||||||
if (quo < 0) quo += 0x10000;
|
if (quo < 0) quo += 0x10000;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue