[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Quick test of Björn Haase's relax patch
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] Quick test of Björn Haase's relax patch |
Date: |
Sun, 5 Mar 2006 15:22:50 +1000 |
User-agent: |
KMail/1.5 |
On Saturday 04 March 2006 20:23, you wrote:
> Björn and Dmitry,
> have you tried "program-at-once" compilation (avr-gcc -combine
> -fwhole-program *.c ..)? This may save some more bytes with recent gccs.
In result:
Options: rlx cmb cmb+rlx
---------------------------------------------
flash, bytes 11412 11056 11412 11104
call 198 24 198 46
rcall 143 316 143 294
jmp 34 10 34 14
rjmp 442 467 442 463
Where:
rlx is '--relax'
cmb is '-combine'
('-fwhole-program' is impossible to try a quick,
as the callback C functions called from asm are
broken --> unresolved links).
And another question about replacing '[r]call/ret' to
'[r]jmp/ret'. Whether this optimization is safe?
For example, avr-libc: fplib. Split function pops
two bytes from stack and returns into more high level
in error case. Similar tricks make such optimization
to be erroneous. On the other hand, the GCC x86 port
for a long time is able to optimize such tails. It also
does it more effectively as deletes not necessary
more 'ret'.
Can be add an additional option for obvious inclusion
of this optimization?
Regards,
Dmitry.
P.S. In new fplib (preliminary patch to bug #1929) above
trick is not used.