Rafael,

I saw you on the list. If you have a few minutes, can you tell me what you think of this proposal / option?

The hidden goal is to properly support setjmp/longjmp and implement a basic task switcher.

The proposal is to shortcut the hardware stack implemented in the PIC.

Sebastien

On Wed, Apr 20, 2011 at 6:35 PM, S├ębastien Lorquet <squalyl@gmail.com> wrote:
replying to myself:

this does not seem to be very difficult. The basic concept is already working, as seen in this patch agaist svn rev 6452.
I'm impressed about the ease of use of the sdcc code!

http://www.unsads.com/~squalyl/sdcc_patch_return_address.patch

It seems to generate coherent code, I have not tested on a real device yet.

I think the only thing that remains to be done is forcing STKPTR to zero to totally avoid the usage of the hardware stack.

What do you think about this?

Sebastien