DS: Fix DIV
Vicki Pfau vi@endrift.com
Mon, 20 Feb 2017 15:26:06 -0800
1 files changed,
2 insertions(+),
5 deletions(-)
jump to
M
src/ds/ds.c
→
src/ds/ds.c
@@ -89,13 +89,10 @@ LOAD_64LE(denominator, DS9_REG_DIV_DENOM_0, ds->memory.io9);
bool max = false; switch (ds->memory.io9[DS9_REG_DIVCNT >> 1] & 0x3) { case 0: - denominator &= 0xFFFFFFFFLL; + numerator = (int64_t)(int32_t) numerator; case 1: case 3: - numerator &= 0xFFFFFFFFLL; - if (numerator == INT32_MIN) { - max = true; - } + denominator = (int64_t)(int32_t) denominator; break; } if (numerator == INT64_MIN) {