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.
17 ,--memory address rising
19 V >>>> sp in method (after initial sub) <<<<
21 | u4[] v arguments for calling methods \__ rd->memuse slots
22 V u4[] v local variable slots allocated on stack /
24 | u4[1..2] synchronized object / saved return value (only for synched methods)
26 | u8[] ^ callee-saved float registers
27 | u4[] ^ callee-saved integer registers
29 | >>>> sp on method entry, stack base for replacement <<<<
32 | u4[] arguments on stack
40 ,--memory address rising
42 V >>>> sp in method (after initial sub) (16-byte aligned in non-leaf methods) <<<<
44 | u8[] v arguments for calling methods \__ rd->memuse slots
45 V u8[] v local variable slots allocated on stack /
47 | u8 v synchronized object / saved return value (only for synched methods)
48 V u8[0..1] alignment dummy slot (in non-leaf methods to ensure
49 | 16-byte alignment of stack)
50 | u8[] ^ callee-saved float registers
51 V u8[] ^ callee-saved integer registers
53 | >>>> sp on method entry, stack base for replacement (16-byte aligned) <<<<
56 | u8[] arguments on stack
64 XXX currently the stack on alpha is not 16-byte aligned!
66 ,--memory address rising
68 V >>>> sp in method (after initial sub) <<<<
70 | u8[] v arguments for calling methods \__ rd->memuse slots
71 V u8[] v local variable slots allocated on stack /
73 | u8 synchronized object / saved return value (only for synched methods)
75 | u8[] ^ callee-saved float registers
76 | u8[] ^ callee-saved integer registers
78 | >>>> !!!replacement code regards this point as stack base!!! <<<<
80 V u8 ^ saved return address (only for non-leaf methods)
82 | >>>> sp on method entry <<<<
84 | u8[] arguments on stack
92 ,--memory address rising
94 V >>>> sp in method (after initial sub) (16-byte aligned) <<<<
96 | u8[] v arguments for calling methods \__ rd->memuse slots
97 V u8[] v local variable slots allocated on stack /
99 | u8 synchronized object / saved return value (only for synched methods)
100 | u8[0..1] alignment dummy-slot (to ensure 16-byte alignment of sp)
102 | u8[] ^ callee-saved float registers
103 | u8[] ^ callee-saved integer registers
105 | >>>> !!!replacement code regards this point as stack base!!! <<<<
107 V u8 ^ saved return address (only for non-leaf methods)
109 | >>>> sp on method entry (16-byte aligned) <<<<
111 | u8[] arguments on stack