On Sun, Mar 13, 2005 at 09:24:19PM +0100, Øyvind Harboe wrote:
> Trampolines are strange things... :-)
> 
> - Are nested functions part of the C standard or a GCC extension?
>   I believe the answer is a GCC extension. I have seen evidence,
>   but no proof to this effect.

That is right.

> - AFAICT, the cris target is saving the value of the
>   static chain register in the trampoline. How can that work
>   with recursive functions? Does the cris target PASS or FAIL
>   gcc.dg/trampoline-1.c?
> - Lately e.g. the AMD CPU has added support for making it impossible
>   to execute code on the stack. The town isn't big enough for
>   both stack based trampolines and stack code execution protection. 
>   What happens now? 

Search for PT_GNU_STACK in the list archives.

> - Are trampolines used for anything else but nested functions
>   in C? I believe they are used by Ada.

Nested functions in other languages, presumably.

> - Many backends do not support trampolines. Are trampolines 
>   something that is ultimately being added to the backends?
> - Do (theoretical?) alternatives to trampolines exist? I.e. something
>   that does not generate code runtime.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

Reply via email to