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: E. Weddington
Subject: Re: [avr-libc-dev] [bugs #4101] setjmp/longjmp destroy changes in global registers
Date: Mon, 07 Feb 2005 10:06:47 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

Paul Schlie wrote:

From: Joerg Wunsch <address@hidden>
As Paul Schlie wrote:
- ok, I accept that possibility; please correct my misunderstanding.
We basically implement the ABI you're suggesting.

- which is good, even if only by accident; but it needs to be documented
 which subset of caller-saved registers are safe/prefered to use, if
 desired, and are considered officially not available for asm code use.

If the avr-libc documentation is found lacking in this respect, please submit a patch.

While we do have a lot
of assembler files (I'm not particularly happy with the situation
either, e.g. fplib is rather hard to maintain), they follow the exact
same ABI as the C compiler, so I don't see any difference in that.

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


In practice, the "reserve global registers" feature is a C language extension of GCC.
<http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Global-Reg-Vars.html#Global-Reg-Vars>

The vast majority of people do not use this feature in AVR GCC. And the people who do use this, have been sufficiently warned that they're playing with fire.

avr-libc doesn't have to do anything to accomodate this feature. The return on investment would approach zero.

Eric




reply via email to

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