[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Unused registers?
From: |
Thomas Pircher |
Subject: |
[avr-gcc-list] Unused registers? |
Date: |
Wed, 21 Oct 2009 09:59:22 +0100 (BST) |
User-agent: |
SquirrelMail/1.4.15 |
Hi all,
I came across a strange behaviour of avr-gcc. In one of our programs (4k
in Flash) the assembler code shows that the registers r2, r3, r5 and r6
are not used at all. Since we are (as everyone, I guess) short in code
space, I am wondering if there are some tricks that can make avr-gcc use
those registers, too.
I'm not saying avr-gcc has a bug, as those registers are used when I
compile other code.
Ideally, what I would like to know is if there is some special magic to
make avr-gcc use all available registers and reduce the code size enough
that we can squeeze in all the features asked for by marketing ;)
I'm using WinAVR 20071221 but 20090313 shows the same behaviour.
avr-size prog.elf
text data bss dec hex filename
4092 0 80 4172 104c prog.elf
Cheers,
Thomas
- [avr-gcc-list] Unused registers?,
Thomas Pircher <=