From da488b3c2bd3cd1fda4efb3fa3b4739176eb5b73 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 20 Feb 2017 15:26:06 -0800 Subject: [PATCH] DS: Fix DIV --- src/ds/ds.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ds/ds.c b/src/ds/ds.c index 5e25b1845..4bda3ce1e 100644 --- a/src/ds/ds.c +++ b/src/ds/ds.c @@ -89,13 +89,10 @@ static void _divide(struct mTiming* timing, void* context, uint32_t cyclesLate) 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) {