* doc/stack_frames.txt: Added arrows indicating increasing addresses/indices.
[cacao.git] / doc / stack_frames.txt
1 STACK FRAME FORMAT
2 =====================
3 Author: Edwin Steiner
4
5
6 Overview
7 --------
8
9 For the sake of efficiency CACAO uses its own stack frame layout that does
10 not comply with the usual frame layout on the native ABI. This document
11 tries to collect the stack frame layouts used on the various architectures.
12
13
14 i386 stack frames
15 -----------------
16
17 ,--memory address rising
18 |
19 |   >>>> sp in method (after initial sub) <<<<
20 |         v
21 |   u4[]  v  arguments for calling methods              \__ rd->memuse slots
22 V   u4[]  v  local variable slots allocated on stack    /
23 |
24 |   u4[1..2] synchronized object / saved return value       (only for synched methods)
25 |
26 |   u8[]  ^  callee-saved float registers
27 V   u4[]  ^  callee-saved integer registers
28 |         ^
29 |   >>>> sp on method entry <<<<
30 |
31 |   u4       return address
32 V   u4[]     arguments on stack
33 |
34 |
35 |
36 |
37 V
38