Commit 3e51437f authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

added asserts in all i_mult BASOP watches, if critical condition (overflow) is true

parent b00ce635
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ static INLINE Word16 i_mult( Word16 a, Word16 b ) /* Weight FF
        {
            printf( "BASOP WATCH i_mult: 0x%08X = 0x%04X * 0x%04X (legacy: 0x%08X <= 16 bit overflow in File: %s, line: %d\n", c, a & 0xFFFF, b & 0xFFFF, (Word32) c1, fname, linenumber );
            BASOP_WATCH_i_mult_Cnt++;
            assert(0);
        }
    }
#endif
@@ -250,6 +251,7 @@ static INLINE Word16 i_mult_o( Word16 a, Word16 b, Flag *Overflow ) /* integer M
                printf( "BASOP WATCH i_mult_o: Overflow == NULL File: %s, line: %d\n", fname, linenumber );
            BASOP_WATCH_i_mult_o_Cnt++;
            // return (Word16) c1;  // Legacy return value to bypass Crash due to NULL pointer
            assert(0);
        }
    }

@@ -317,6 +319,7 @@ static INLINE Word16 i_mult_sat( Word16 a, Word16 b ) /* integer Mpy with satura
        {
            printf( "BASOP WATCH i_mult_sat: 0x%08X = 0x%04X * 0x%04X (legacy: 0x%08X <= 16 bit overflow  File: %s  line %d\n", c, a & 0xFFFF, b & 0xFFFF, (Word32) c1, fname, linenumber );
            BASOP_WATCH_i_mult_sat_Cnt++;
            assert(0);
        }
    }
#endif /* BASOP_WATCH_i_mult_sat */