[Top][All Lists]

[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: Paul Schlie
Subject: Re: [avr-libc-dev] [bugs #4101] setjmp/longjmp destroy changes in global registers
Date: Sun, 06 Feb 2005 21:11:11 -0500
User-agent: Microsoft-Entourage/

> From: Joerg Wunsch <address@hidden>
>> As Paul Schlie wrote:
>> Upon thinking about things a little further, it appears that the
>> true conflict between the use of set/longjump and the declaration of
>> compile time reserved global registers, isn't with the definition of
>> set/longjump itself, but with the definition of a C function library
>> in which the functions implemented in assembly code presume a fixed
>> call ABI, which precludes the otherwise safe exclusion of
>> caller-saved registers being declared/reserved as being global
>> registers, as would automatically be excluded from allocation during
>> the compilation of C based implementations.
> You're 100 % off here.

- ok, I accept that possibility; please correct my misunderstanding.

  (from the best I can tell, GCC presumes/recommends caller-saved
   registers be specifed when reserved global registers are required,
   as there's no mechanism provided by GCC to enable a set/longjump
   implementation to identify which compile time reserved global (i.e.
   callee-saved) registers should not be save/restored, therefor can't
   be safely specified as being reserved globals; but avr-libc's asm
   coded routines conflict with the recommended strategy, as it's
   not presently specified if it's guaranteed which if any of the
   caller-saved registers asm coded routines are guaranteed not to be
   used (although may be used if not reserved, by compiled routines,
   as the register allocator does know which caller-saved registers may
   have been reserved otherwise).

reply via email to

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