PreviousNext
Utilization of the preloaded W
Help > Appendix > Code Optimization > Utilization of the preloaded W

FLASH-                        RAM                Speed+

 

CC5X is not able to optimize commutative expressions to use the already preloaded variable or W register.

 

uns8 var1, var2;

 

var1 = 1;

if ( var1.0 )

{

  if ( var2 == var1 )

       nop();

}

else

  nop();

uns8 var1, var2;

 

var1 = 1;

if ( var1.0 )

{

  if ( var1 == var2 )

       nop();

}

else

  nop();