Trampoline implementation for MIPS

Andrew Haley aph@redhat.com
Fri Sep 29 08:17:00 GMT 2006


kernel coder writes:
 > hi,
 >     I'm having some trouble while understanding the generated assembly
 > code for trampoline by mips back-end.
 > 
 > Following is the code for which i'm trying to undertsand the generated
 > trampoline code.
 > 
 > int foo(int (*f)()){
 >         (*f)();
 > }
 > main(){
 >         int i;
 >         int g(){printf("hello,%d",i);}
 >         foo(g);
 > }
 > 
 > Parts of generated assembly code which are confusing are
 > 

That looks like all of it!  The trouble is that we don't know what
you don't know.  Firstly, did you read
http://people.debian.org/~aaronl/Usenix88-lexic.pdf

I have redirected this reply to gcc-help.

Andrew.



More information about the Gcc-help mailing list