Loading lib_basop/enh64.c +43 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,49 @@ Word64 W_sub_nosat( Word64 L64_var1, Word64 L64_var2 ) } /*__________________________________________________________________________________ | | | Function Name : W_negate | | | | Purpose : | | | | Negate the 64 bit variable L64_var1 with saturation; saturate in the case | | where input is 0x8000 0000 0000 0000. | | | | Complexity weight : 1 | | | | Inputs : | | | | L64_var1 64 bit long signed integer (Word64) whose value falls in the range: | | 0x8000 0000 0000 0000 <= L64_var1 <= 0x7fff ffff ffff ffff. | | | | Outputs : | | | | none | | | | Return Value : | | | | L64_var_out | | 64 bit long signed integer (Word64) whose value falls in the range: | | 0x8000 0000 0000 0000 <= L_var_out <= 0x7fff ffff ffff ffff. | |_________________________________________________________________________________| */ Word64 W_negate( Word64 L64_var1 ) { Word64 L64_var_out; L64_var_out = ( L64_var1 == MIN_64 ) ? MAX_64 : -L64_var1; #ifdef WMOPS multiCounter[currCounter].W_negate++; #endif BASOP_CHECK(); return ( L64_var_out ); } /*___________________________________________________________________________ | | | Function Name : W_shl | Loading lib_basop/enh64.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #ifdef ENH_64_BIT_OPERATOR Word64 W_add_nosat( Word64 L64_var1, Word64 L64_var2 ); Word64 W_sub_nosat( Word64 L64_var1, Word64 L64_var2 ); Word64 W_negate( Word64 L64_var1 ); Word64 W_shl( Word64 L64_var1, Word16 var2 ); Word64 W_shr( Word64 L64_var1, Word16 var2 ); Word64 W_shl_nosat( Word64 L64_var1, Word16 var2 ); Loading lib_debug/wmc_auto.c +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ static BASIC_OP op_weight = { #ifdef ENH_64_BIT_OPERATOR /* Weights of new 64 bit basops */ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 #endif /* #ifdef ENH_64_BIT_OPERATOR */ #ifdef ENH_32_BIT_OPERATOR Loading lib_debug/wmc_auto.h +1 −0 Original line number Diff line number Diff line Loading @@ -879,6 +879,7 @@ typedef struct unsigned int move64; /* Complexity Weight of 1 */ unsigned int W_add_nosat; /* Complexity Weight of 1 */ unsigned int W_sub_nosat; /* Complexity Weight of 1 */ unsigned int W_negate; /* Complexity Weight of 1 */ unsigned int W_shl; /* Complexity Weight of 1 */ unsigned int W_shr; /* Complexity Weight of 1 */ unsigned int W_shl_nosat; /* Complexity Weight of 1 */ Loading Loading
lib_basop/enh64.c +43 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,49 @@ Word64 W_sub_nosat( Word64 L64_var1, Word64 L64_var2 ) } /*__________________________________________________________________________________ | | | Function Name : W_negate | | | | Purpose : | | | | Negate the 64 bit variable L64_var1 with saturation; saturate in the case | | where input is 0x8000 0000 0000 0000. | | | | Complexity weight : 1 | | | | Inputs : | | | | L64_var1 64 bit long signed integer (Word64) whose value falls in the range: | | 0x8000 0000 0000 0000 <= L64_var1 <= 0x7fff ffff ffff ffff. | | | | Outputs : | | | | none | | | | Return Value : | | | | L64_var_out | | 64 bit long signed integer (Word64) whose value falls in the range: | | 0x8000 0000 0000 0000 <= L_var_out <= 0x7fff ffff ffff ffff. | |_________________________________________________________________________________| */ Word64 W_negate( Word64 L64_var1 ) { Word64 L64_var_out; L64_var_out = ( L64_var1 == MIN_64 ) ? MAX_64 : -L64_var1; #ifdef WMOPS multiCounter[currCounter].W_negate++; #endif BASOP_CHECK(); return ( L64_var_out ); } /*___________________________________________________________________________ | | | Function Name : W_shl | Loading
lib_basop/enh64.h +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #ifdef ENH_64_BIT_OPERATOR Word64 W_add_nosat( Word64 L64_var1, Word64 L64_var2 ); Word64 W_sub_nosat( Word64 L64_var1, Word64 L64_var2 ); Word64 W_negate( Word64 L64_var1 ); Word64 W_shl( Word64 L64_var1, Word16 var2 ); Word64 W_shr( Word64 L64_var1, Word16 var2 ); Word64 W_shl_nosat( Word64 L64_var1, Word16 var2 ); Loading
lib_debug/wmc_auto.c +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ static BASIC_OP op_weight = { #ifdef ENH_64_BIT_OPERATOR /* Weights of new 64 bit basops */ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 #endif /* #ifdef ENH_64_BIT_OPERATOR */ #ifdef ENH_32_BIT_OPERATOR Loading
lib_debug/wmc_auto.h +1 −0 Original line number Diff line number Diff line Loading @@ -879,6 +879,7 @@ typedef struct unsigned int move64; /* Complexity Weight of 1 */ unsigned int W_add_nosat; /* Complexity Weight of 1 */ unsigned int W_sub_nosat; /* Complexity Weight of 1 */ unsigned int W_negate; /* Complexity Weight of 1 */ unsigned int W_shl; /* Complexity Weight of 1 */ unsigned int W_shr; /* Complexity Weight of 1 */ unsigned int W_shl_nosat; /* Complexity Weight of 1 */ Loading