avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [bugs #4101] setjmp/longjmp destroy changes in global


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [bugs #4101] setjmp/longjmp destroy changes in global registers
Date: Mon, 7 Feb 2005 17:47:50 +0100
User-agent: Mutt/1.4.2.1i

As Paul Schlie wrote:

> - almost, the compiler can/will avoid using compile-time declared
> reserved global registers; asm routines can't, therefore must
> restrict their their use in anticipation of the possibility,
> regardless if they're used or not. (as in fact the ABI is actually
> somewhat soft, not hard)

This cannot work when linking against *any* pre-compiled object from
the library, as these files always risk to use one of the registers
the application might use as a fixed register variable.  I don't see
where it would make the slightest difference whether these library
objects result from C or asm source files.  Both source files follow
exactly the same ABI, and there's exactly the same policy which
registers need to be saved, and which don't.  If the compiler needs
more registers in C code than it could use freely, it needs to push
them onto the stack, the same is implemented in the asm files.

If you don't link against any external object files, no need to worry
at all, as you don't have any external files it must not bother you
whether you don't have files compiled from C nor from assembler code.
;-)

-- 
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]