src/base/condcodes.hh
/**
 * Calculate the overflow flag from an addition.
 *
 * @ingroup api_base_utils
 */
Calculate the overflow flag from an addition.
Calculate the overflow flag from an addition .
static inline bool
findOverflow(int width, uint64_t dest, uint64_t src1, uint64_t src2)
{
    int shift = width - 1;
    return ((src1 ^ ~src2) & (src1 ^ dest)) & (1ULL << shift);
}
static inline bool findOverflow ( int width , uint64_t dest , uint64_t src1 , uint64_t src2 ) { int shift = width - 1 ; return ( ( src1 ^ ~ src2 ) & ( src1 ^ dest ) ) & ( 1ULL << shift ) ; }
Calculate the overflow flag from an addition.
Calculate the overflow flag from an addition .