X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=doc%2Fstack_frames.txt;h=700c2e54ca31007707e7066b8896f26324b91637;hb=4bf4a7402530f4743387518780fc133038f1e44d;hp=c2223f0764ee520dc1e8f4cb01a4f3c670352506;hpb=4e10d4a9cba173105c25d0aaf2d0de75f3e5a6b4;p=cacao.git diff --git a/doc/stack_frames.txt b/doc/stack_frames.txt index c2223f076..700c2e54c 100644 --- a/doc/stack_frames.txt +++ b/doc/stack_frames.txt @@ -14,16 +14,127 @@ tries to collect the stack frame layouts used on the various architectures. i386 stack frames ----------------- ->>>> sp in method (after initial sub) <<<< +,--memory address rising +| +V >>>> sp in method (after initial sub) <<<< +| +| u4[] v arguments for calling methods \__ rd->memuse slots +V u4[] v local variable slots allocated on stack / +| +| u4[1..2] synchronized object / saved return value (only for synched methods) +V +| u8[] ^ callee-saved float registers +| u4[] ^ callee-saved integer registers +V +| >>>> sp on method entry, stack base for replacement <<<< +| +V u4 return address +| u4[] arguments on stack +| +V -u4[] arguments for calling methods -u4[] local variable slots allocated on stack -u4[] callee-saved registers ->>>> sp on method entry <<<< +x86_64 stack frames +----------------- + +,--memory address rising +| +V >>>> sp in method (after initial sub) (16-byte aligned in non-leaf methods) <<<< +| +| u8[] v arguments for calling methods \__ rd->memuse slots +V u8[] v local variable slots allocated on stack / +| +| u8 v synchronized object / saved return value (only for synched methods) +V u8[0..1] alignment dummy slot (in non-leaf methods to ensure +| 16-byte alignment of stack) +| u8[] ^ callee-saved float registers +V u8[] ^ callee-saved integer registers +| +| >>>> sp on method entry, stack base for replacement (8-byte odd) <<<< +V +| u8 return address +| +V >>>>> (16-byte aligned) <<<< +| +| u8[] arguments on stack +V + + + +alpha stack frames +------------------ + +,--memory address rising +| +V >>>> sp in method (after initial sub) <<<< +| +| u8[] v arguments for calling methods \__ rd->memuse slots +V u8[] v local variable slots allocated on stack / +| +| u8 synchronized object / saved return value (only for synched methods) +| u8[0..1] alignment dummy slot +V +| u8[] ^ callee-saved float registers +| u8[] ^ callee-saved integer registers +V +| >>>> !!!replacement code regards this point as stack base!!! <<<< +| +V u8 ^ saved return address (only for non-leaf methods) +| +| >>>> sp on method entry <<<< +V +| u8[] arguments on stack +| +V + + +mips stack frames +----------------- + +,--memory address rising +| +V >>>> sp in method (after initial sub) (16-byte aligned) <<<< +| +| u8[] v arguments for calling methods \__ rd->memuse slots +V u8[] v local variable slots allocated on stack / +| +| u8 synchronized object / saved return value (only for synched methods) +| u8[0..1] alignment dummy slot (to ensure 16-byte alignment of sp) +V +| u8[] ^ callee-saved float registers +| u8[] ^ callee-saved integer registers +V +| >>>> !!!replacement code regards this point as stack base!!! <<<< +| +V u8 ^ saved return address (only for non-leaf methods) +| +| >>>> sp on method entry (16-byte aligned) <<<< +V +| u8[] arguments on stack +| +V + -u4 return address -u4[] arguments on stack +powerpc stack frames +-------------------- +,--memory address rising +| +V >>>> sp in method (after initial sub) (16-byte aligned) <<<< +| +| u4[] v arguments for calling methods (incl. LA) \__ rd->memuse slots +V u4[] v local variable slots allocated on stack / +| +| u4[2..3] synchronized object / saved return value (only for synched methods) +| u4[0..3] alignment slots +V +| u8[] ^ callee-saved float registers +| u4[] ^ callee-saved integer registers +V +| >>>> sp on method entry, stack base for replacement (16-byte aligned) <<<< +| +| u4[] arguments on stack (inludes LA == linkage area) +| +V