Try to optimize delay in LVP
A normal for loop like for (int i=5; i; --i) { delay_s(); } is unrolled until i=9. This is bad because a loop makes sense starting at i=4. If the loop version (i>8) requires x byte, the unrolled version (i=8) requires x+12 bytes. Due to compiler optimization this assembler implementation requires x+4 bytes, although it just kind of forces no-unroll of the loop. So until we can tell the compiler to improve the jumps this does not help to reduce the binary size.
Showing
Please register or sign in to comment