OK, thanks. ld a, (0x06, sp) ld (0x01, sp), a - saving copy of <size> on stack looks unnecessary to me.</size>
Another interesting case: static void memcpy1(unsigned char* dst, unsigned char* src, unsigned char size) { do { *dst++ = *src++; } while(--size); } static void memcpy2(unsigned char* dst, unsigned char* src, unsigned char size) { if (!size) return; do { *dst++ = *src++; } while(--size); } the difference of loop code between these two functions.
Another one: SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/r800/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502/mos65c02 TD- 4.4.0 #14620 (Linux) sdcc -mstm8 --opt-code-speed test01.c
Hi, I used sdcc-win64 4.4.0 rc3. Options: --opt-code-speed or --opt-code-size
I mean Z flag.
STM8. Not very good code generation
16bit - 1