From 750bd43ce260b90dc1687b14c26a2de75dfb704a Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 9 Jan 2009 07:54:15 +0000 Subject: [PATCH] fix the sbc assertion. we'll take these out in a few days. --- desmume/src/thumb_instructions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/thumb_instructions.cpp b/desmume/src/thumb_instructions.cpp index 8bf893762..fa539c4ca 100644 --- a/desmume/src/thumb_instructions.cpp +++ b/desmume/src/thumb_instructions.cpp @@ -337,7 +337,7 @@ TEMPLATE static u32 FASTCALL OP_ADC_REG() //the below UNSIGNED_OVERFLOW calculation is the clever way of doing it //but just to keep from making a mistake, lets assert that it matches the precise definition of unsigned overflow - static int passcount = 0; + static long passcount = 0; assert(++passcount); assert( ((((u64)a+(u64)b+cpu->CPSR.bits.C)>>32)&1) @@ -365,10 +365,10 @@ TEMPLATE static u32 FASTCALL OP_SBC_REG() //the below UNSIGNED_UNDERFLOW calculation is the clever way of doing it //but just to keep from making a mistake, lets assert that it matches the precise definition of unsigned overflow - static int passcount = 0; + static long passcount = 0; assert(++passcount); assert( - ((((u64)a+(u64)b+cpu->CPSR.bits.C)>>63)&1) + ((((u64)a-(u64)b-(!cpu->CPSR.bits.C))>>32)&1) == UNSIGNED_UNDERFLOW(a, b, res) );