23b2b8c2ec49181a93a87d4bd7a844da0f341f5d
[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 >>>> sp in method (after initial sub) <<<<
18
19 u4[]     arguments for calling methods              \__ rd->memuse slots
20 u4[]     local variable slots allocated on stack    /
21
22 u4[1..2] synchronized object / saved return value       (only for synched methods)
23
24 u8[]     callee-saved float registers
25 u4[]     callee-saved integer registers
26
27 >>>> sp on method entry <<<<
28
29 u4    return address
30 u4[]  arguments on stack
31
32
33