diff --git a/lib_com/basop32.c b/lib_com/basop32.c index 2a813e15c27a7a0b7ce0b6a337d1320615e1693b..dbdda3aebcaa6963d43fb0d2ffeee54a3a397a70 100644 --- a/lib_com/basop32.c +++ b/lib_com/basop32.c @@ -2825,6 +2825,11 @@ Word16 shr_ro( Word16 var1, Word16 var2, Flag *Overflow ) { var_out = shr_o( var1, var2, Overflow ); +#ifdef FIX_1049_SHR_RO_COMPLEXITY +#ifdef WMOPS + multiCounter[currCounter].shr--; +#endif +#endif if ( var2 > 0 ) { if ( ( var1 & ( (Word16) 1 << ( var2 - 1 ) ) ) != 0 ) @@ -2833,6 +2838,15 @@ Word16 shr_ro( Word16 var1, Word16 var2, Flag *Overflow ) } } } + +#ifdef FIX_1049_SHR_RO_COMPLEXITY +#ifdef WMOPS + multiCounter[currCounter].shr_r++; +#endif + + BASOP_CHECK(); +#endif + return ( var_out ); } Word16 shr_r_sat( Word16 var1, Word16 var2 ) diff --git a/lib_com/options.h b/lib_com/options.h index 03a1b1e92990c525e35793ddc095097cb828ebde..cacefdab4fdb59427afcd30a35fccb3cd3bb7165 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -85,4 +85,5 @@ #define FIX_ISSUE_1062_AND_1068_TON_ENE_EST_FX #define FIX_1054_IF_ELSE_CMPLX /* VA: Fix 1054 incorrect counting of complexity when ELSE-IF sequence is encoutered in two functions */ #define FIX_1052_COPY_CMPLX_DISCREPANCY /* VA: modify IF-ELSE statements used in Copy*() functions to avoid dependency on x[] and y[] in RAM */ +#define FIX_1049_SHR_RO_COMPLEXITY /* VA: fix for issue 1049: incorrect counting of complexity in the shr_ro() function */ #endif