Merge from subtype.
[cacao.git] / doc / stack_frames.txt
index 16e0abc4966faec84e6776371fb8793cfe8faa2a..700c2e54ca31007707e7066b8896f26324b91637 100644 (file)
@@ -39,7 +39,7 @@ x86_64 stack frames
 
 ,--memory address rising
 |
-V   >>>> sp in method (after initial sub) <<<<
+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    /
@@ -50,9 +50,12 @@ V   u8[0..1] alignment dummy slot                           (in non-leaf methods
 |   u8[]  ^  callee-saved float registers
 V   u8[]  ^  callee-saved integer registers
 |          
-|   >>>> sp on method entry, stack base for replacement  <<<<
+|   >>>> sp on method entry, stack base for replacement  (8-byte odd) <<<<
 V
 |   u8       return address
+|
+V                                                 >>>>> (16-byte aligned) <<<<
+|
 |   u8[]     arguments on stack
 V
 
@@ -69,6 +72,7 @@ V   >>>> sp in method (after initial sub) <<<<
 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
@@ -83,3 +87,54 @@ V
 |
 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
+
+
+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
+
+