Re: explaination of trampoline

2006-09-27 Thread Mike Stump
On Sep 27, 2006, at 3:39 AM, kernel coder wrote: Would you please tell me when does the macros INITIALIZE_TRAMPOLINE and TRAMPOLINE_TEMPLATE come in effect.Any practical expample will be helpful. A dejagnu testsuite run also would spot problems in how you define these things.

Re: explaination of trampoline

2006-09-27 Thread Paolo Bonzini
The c code for which i'm observing the effect is as follows. int foo(int (*f)()){ (*f)(); } main(){ int g(){printf("hello");} foo(g); } This one does not need a trampoline, because there would not be any difference if int g() was not a nested function -- g() has no stati

explaination of trampoline

2006-09-27 Thread kernel coder
I was just investigating the trampoline implementation.I have defined following macros in machine.h file. #define TRAMPOLINE_SIZE (32 + GET_MODE_SIZE (ptr_mode) * 2) #define TRAMPOLINE_ALIGNMENT GET_MODE_BITSIZE (ptr_mode) #define INITIALIZE_TRAMPOLINE(ADDR, FUNC, CHAIN)