Tool/software: TI C/C++ Compiler
Hi,
When I call this:
__delay_cycles(1000000ul);
The compiler generates this:
F2416014 movw r0, #0x1614 F2C00005 movt r0, #5 $1_$43: 1E40 subs r0, r0, #1 D1FD bne $1_$43 BF00 nop BF00 nop
Why does the compiler think 333332 × 4 + 2 NOPs would take 1000000 cycles? It takes 1333330! I tried other values and it's always one third too many. O0 or O3 makes no difference.
Please help!
I'm using CCS 10.0, TI compiler v20.2.0.LTS.