[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: AW: AW: [avr-gcc-list] avr-gcc bug: global register variable isb
From: |
Erik Christiansen |
Subject: |
Re: AW: AW: AW: [avr-gcc-list] avr-gcc bug: global register variable isbroken |
Date: |
Fri, 3 Dec 2004 12:26:45 +1100 |
User-agent: |
Mutt/1.5.6+20040722i |
On Thu, Dec 02, 2004 at 04:22:21PM +0100, Klaus Rudolph wrote:
> > 2.) Number of registers available for variable passing
[snip]
> And that only every second register is used for chars seems not ok.
> There is a movw instruction which needs that kind of allocation if 16
> Bit ints are used. But this makes only sense on controllers which
> support this. And it make only sense for vars which are 16 bits or
> more I think. In my personal code every second register is gone
> whithout any usage. That is a lot for an embedded system :-)
Yes, however, the reason for this may be one of those "promotion of char
to int before processing" gotchas in the C standard. While lots of libc
functions handle chars as ints, they do so explicitly, e.g.
int putchar(int c);
so I can only think that care has been exercised here, to observe the
standard.
Erik