avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] 8-bit return values again


From: Wouter van Gulik
Subject: Re: [avr-gcc-list] 8-bit return values again
Date: Thu, 27 Sep 2007 08:53:52 +0200
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Dusan Ferbas schreef:
Hi guys,

when I searched this list for "8-bit return values", I found 2 threads. Described snippets seems to me more about switch/case & expression optimization:
http://lists.gnu.org/archive/html/avr-gcc-list/2003-06/msg00000.html
http://lists.gnu.org/archive/html/avr-gcc-list/2003-06/msg00005.html

------------------
I want to solve case, when a function is declared as u_char(char, int8, etc.). It is compiled in a way, that it returns a value in the R24,R25 register pair. This is true not only with literals (see example below), but also with byte variables. R25 value is never used in a calling code (see assembler listing below).

Any idea ? Any plans for resolving this ?


It seems that (at least some of) this is fixed in gcc 4.3.0
I currently don't have acces to 4.3.0 but Eric Weddington has, and his assembler output shows no clr r25. See:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33050

I don't know if this is always the case or just a lucky example.

HTH

Wouter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]