On Thursday 24 January 2008 12:28, Andrew Hutchinson wrote:
[...]
> I was mistaken, I am using libc  l.6.1
[...]
> Tried Winavr compiler with same setting and not sure what library
> version I have for 4.2
> There is no way to tell after its built but I guess it might be 1.2
> So instead look at  xlib as  size without library function
>
>          text       xlib        cycles
> Os     4540     2276     89824
> O3     5690     3426     79875

My result is:
> >>>  4194   89204    4.2.2  -Os
> >>>  5388   72643    4.2.2  -O3
with command line:
  avr-gcc -mmcu=atmega8 -Os whet.c dummy.c -lm
avr-gcc is 4.2.2 without any patches.

Such big difference (4540 vs. 4194) is strange.
Possible reasons (check, please):
1. Patch for avr-gcc, which forses save/restore all registers
in main, penalty is ~100 bytes.
2. '-fno-unit-at-a-time' option, penalty is ~50 bytes.
3. Another MCU, f.e. with ATmega128:
     penalty for vectors:  ~100 bytes
     penalty for jmp/call: ~150 bytes

Regards,
Dmitry.



_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to