[Top][All Lists]

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

Re: [avr-libc-dev] RFD: more avr-libc API changes

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] RFD: more avr-libc API changes
Date: Sat, 10 Sep 2005 22:30:41 +0200
User-agent: Mutt/

As Björn Haase wrote:

> In fact, I don't think so. The planned change in the main function
> (so that main() does no longer initialize the stack pointer) should
> not be a problem, IIUC, since the stack pointer is already
> initialized by the device-specific crt.?

Yes, it is, and I recently fixed a problem with GAS that made the
external (link-time) override of __stack possible again, so now both
initializations even agree. ;-)

> One thing, however, that I think that we might want to change some
> day is the __tmp_reg__,__zero_reg__ issue. I assume that the
> original decision to use r0/r1 stems from times when there were no
> hardware multipliers.

That's my guess, too, and would be one thing I'd really see changed.

> IMO it would be better to use r2:r3 instead so that one could, e.g.,
> avoid all of those "clr __zero_reg__" in the multiplication
> operations.

Btw., IAR (optionally) uses r15 as zero register, but doesn't have a
specific alias for that (so assembly programmers will use literal
r15).  If we could agree on that, too, it would ease porting assembly
source code between both compilers (albeit I think featuring their
entire ABI is completely out of scope).  But that's low priority.

Would it make sense to have that on the schedule for GCC 5.x (plus
avr-libc 2.x)?

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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