Loading lib_com/enh40.h +3 −5 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ #ifndef _ENH40_H #define _ENH40_H #include "stl.h" #if defined( BASOP_NOGLOB ) || defined( _MSC_VER ) Loading @@ -62,11 +61,9 @@ #define MIN_40 ( 0xffffff8000000000 ) #endif #define L40_OVERFLOW_OCCURED( L40_var1 ) ( Overflow = 1, exit( 1 ), L40_var1 ) #define L40_UNDERFLOW_OCCURED( L40_var1 ) ( Overflow = 1, exit( 2 ), L40_var1 ) /***************************************************************************** * * Prototypes for enhanced 40 bit arithmetic operators Loading Loading @@ -114,7 +111,6 @@ Word40 L40_max( Word40 L40_var1, Word40 L40_var2 ); Word40 L40_min( Word40 L40_var1, Word40 L40_var2 ); Word32 L_saturate40( Word40 L40_var1 ); Word16 norm_L40( Word40 L40_var1 ); #ifdef BASOP_NOGLOB /* * Overflowing operators Loading @@ -124,7 +120,6 @@ Word40 L40_add_o( Word40 L40_var1, Word40 L40_var2, Flag *Overflow ); Word40 L40_sub_o( Word40 L40_var1, Word40 L40_var2, Flag *Overflow ); Word32 L_saturate40_o( Word40 L40_var1, Flag *Overflow ); #endif /* BASOP_NOGLOB */ /*#ifdef _MSC_VER*/ static __inline Word40 L40_set( Word40 L40_var1 ) { Loading Loading @@ -362,6 +357,9 @@ static __inline Word40 L40_mac( Word40 L40_var1, Word16 var2, Word16 var3 ) L40_var_out = L40_mult( var2, var3 ); L40_var_out = L40_add( L40_var1, L40_var_out ); #ifdef WMOPS multiCounter[currCounter].L40_mac++; #endif return ( L40_var_out ); } Loading lib_debug/wmc_auto.c +13 −7 Original line number Diff line number Diff line Loading @@ -297,6 +297,7 @@ void pop_wmops( void ) current_record = -1; } return; } Loading Loading @@ -374,6 +375,7 @@ void update_wmops( void ) wmops[i].max_cnt = wmops[i].current_cnt; } if ( wmops[i].current_cnt < wmops[i].min_cnt ) { wmops[i].min_cnt = wmops[i].current_cnt; Loading Loading @@ -2057,7 +2059,7 @@ int funcId_where_last_call_to_else_occurred; long funcid_total_wmops_at_last_call_to_else; int call_occurred = 1; const BASIC_OP op_weight = { BASIC_OP op_weight = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, Loading Loading @@ -2097,21 +2099,24 @@ void Set_BASOP_WMOPS_counter( int counterId ) call_occurred = 1; } extern int32_t frame; long TotalWeightedOperation() { int i; const long *ptr, *ptr2; unsigned int *ptr, *ptr2; long tot; tot = 0; ptr = (const long *) &multiCounter[currCounter]; ptr2 = (const long *) &op_weight; for ( i = 0; i < ( int )( sizeof( multiCounter[currCounter] ) / sizeof( long ) ); i++ ) ptr = (unsigned int *) &multiCounter[currCounter]; ptr2 = (unsigned int *) &op_weight; for ( i = 0; i < ( int )( sizeof( multiCounter[currCounter] ) / sizeof( unsigned int ) ); i++ ) { tot += ( ( *ptr++ ) * ( *ptr2++ ) ); } return ( (long) tot ); return ( tot ); } long DeltaWeightedOperation( void ) Loading @@ -2119,6 +2124,7 @@ long DeltaWeightedOperation( void ) long NewWOper, delta; NewWOper = TotalWeightedOperation(); delta = NewWOper - wmops[currCounter].LastWOper; wmops[currCounter].LastWOper = NewWOper; Loading Loading
lib_com/enh40.h +3 −5 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ #ifndef _ENH40_H #define _ENH40_H #include "stl.h" #if defined( BASOP_NOGLOB ) || defined( _MSC_VER ) Loading @@ -62,11 +61,9 @@ #define MIN_40 ( 0xffffff8000000000 ) #endif #define L40_OVERFLOW_OCCURED( L40_var1 ) ( Overflow = 1, exit( 1 ), L40_var1 ) #define L40_UNDERFLOW_OCCURED( L40_var1 ) ( Overflow = 1, exit( 2 ), L40_var1 ) /***************************************************************************** * * Prototypes for enhanced 40 bit arithmetic operators Loading Loading @@ -114,7 +111,6 @@ Word40 L40_max( Word40 L40_var1, Word40 L40_var2 ); Word40 L40_min( Word40 L40_var1, Word40 L40_var2 ); Word32 L_saturate40( Word40 L40_var1 ); Word16 norm_L40( Word40 L40_var1 ); #ifdef BASOP_NOGLOB /* * Overflowing operators Loading @@ -124,7 +120,6 @@ Word40 L40_add_o( Word40 L40_var1, Word40 L40_var2, Flag *Overflow ); Word40 L40_sub_o( Word40 L40_var1, Word40 L40_var2, Flag *Overflow ); Word32 L_saturate40_o( Word40 L40_var1, Flag *Overflow ); #endif /* BASOP_NOGLOB */ /*#ifdef _MSC_VER*/ static __inline Word40 L40_set( Word40 L40_var1 ) { Loading Loading @@ -362,6 +357,9 @@ static __inline Word40 L40_mac( Word40 L40_var1, Word16 var2, Word16 var3 ) L40_var_out = L40_mult( var2, var3 ); L40_var_out = L40_add( L40_var1, L40_var_out ); #ifdef WMOPS multiCounter[currCounter].L40_mac++; #endif return ( L40_var_out ); } Loading
lib_debug/wmc_auto.c +13 −7 Original line number Diff line number Diff line Loading @@ -297,6 +297,7 @@ void pop_wmops( void ) current_record = -1; } return; } Loading Loading @@ -374,6 +375,7 @@ void update_wmops( void ) wmops[i].max_cnt = wmops[i].current_cnt; } if ( wmops[i].current_cnt < wmops[i].min_cnt ) { wmops[i].min_cnt = wmops[i].current_cnt; Loading Loading @@ -2057,7 +2059,7 @@ int funcId_where_last_call_to_else_occurred; long funcid_total_wmops_at_last_call_to_else; int call_occurred = 1; const BASIC_OP op_weight = { BASIC_OP op_weight = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, Loading Loading @@ -2097,21 +2099,24 @@ void Set_BASOP_WMOPS_counter( int counterId ) call_occurred = 1; } extern int32_t frame; long TotalWeightedOperation() { int i; const long *ptr, *ptr2; unsigned int *ptr, *ptr2; long tot; tot = 0; ptr = (const long *) &multiCounter[currCounter]; ptr2 = (const long *) &op_weight; for ( i = 0; i < ( int )( sizeof( multiCounter[currCounter] ) / sizeof( long ) ); i++ ) ptr = (unsigned int *) &multiCounter[currCounter]; ptr2 = (unsigned int *) &op_weight; for ( i = 0; i < ( int )( sizeof( multiCounter[currCounter] ) / sizeof( unsigned int ) ); i++ ) { tot += ( ( *ptr++ ) * ( *ptr2++ ) ); } return ( (long) tot ); return ( tot ); } long DeltaWeightedOperation( void ) Loading @@ -2119,6 +2124,7 @@ long DeltaWeightedOperation( void ) long NewWOper, delta; NewWOper = TotalWeightedOperation(); delta = NewWOper - wmops[currCounter].LastWOper; wmops[currCounter].LastWOper = NewWOper; Loading