-
Bug
-
Resolution: Unresolved
-
Low
-
Code Generation Tools
-
CODEGEN-8214
-
-
default
The attached file contains this line ...
if (delay >= ( (unsigned short) (20e-3/(1e-3)) ) )
Thus, you would expect the variable delay to be compared with the value 20.
Build it ...
% cl2000 -s try1.c
Then inspect the resulting assembly file to see these lines ...
;---------------------------------------------------------------------- ; 5 | if (delay >= ( (unsigned short) (20e-3/(1e-3)) ) ) ;---------------------------------------------------------------------- MOVW DP,#_delay ; [CPU_ARAU] MOV AL,@_delay ; [CPU_ALU] |5| CMPB AL,#19 ; [CPU_ALU] |5| B $C$L1,LO ; [CPU_ALU] |5|
It is not compared again 20, but 19.