1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
"""
PyPy PPC Stackframe
OLD FRAME
| BACK CHAIN |
- - - - - --------------------------- - - - - -- - - - - - - - - -
| | | CURRENT FRAME
| FPR SAVE AREA | |>> len(NONVOLATILES_FPR) * DOUBLEWORD
| | |
--------------------------- --
| | |
| GPR SAVE AREA | |>> len(NONVOLATILES) * WORD
| | |
--------------------------- --
| | |
| FLOAT/INT CONVERSION | |>> 1 * WORD
| | |
--------------------------- --
| FORCE INDEX | WORD |>> 1 WORD
--------------------------- --
| | |
| ENCODING AREA | |>> len(MANAGED_REGS) * WORD
| (ALLOCA AREA) | |
SPP -> --------------------------- --
| | |
| SPILLING AREA | |>> regalloc.frame_manager.frame_depth * WORD
| (LOCAL VARIABLE SPACE) | |
--------------------------- --
| | |
| PARAMETER SAVE AREA | |>> max_stack_params * WORD
| | |
--------------------------- --
(64 Bit) | TOC POINTER | WORD |
--------------------------- --
| | |
(64 Bit) | RESERVED FOR COMPILER | |>> 2 * WORD
| AND LINKER | |
--------------------------- --
| SAVED LR | WORD |
--------------------------- |>> 3 WORDS (64 Bit)
(64 Bit) | SAVED CR | WORD | 2 WORDS (32 Bit)
--------------------------- |
| BACK CHAIN | WORD |
SP -> --------------------------- --
Minimum PPC64 ABI stack frame:
OLD FRAME
| BACK CHAIN |
- - - - - --------------------------- - - - - -- - - - - - - - - -
| | | CURRENT FRAME
| PARAMETER SAVE AREA | |>> max_stack_params * WORD
| | |
--------------------------- --
(64 Bit) | TOC POINTER | WORD |
--------------------------- --
| | |
(64 Bit) | RESERVED FOR COMPILER | |>> 2 * WORD
| AND LINKER | |
--------------------------- --
| SAVED LR | WORD |
--------------------------- |>> 3 WORDS (64 Bit)
(64 Bit) | SAVED CR | WORD | 2 WORDS (32 Bit)
--------------------------- |
| BACK CHAIN | WORD |
SP -> --------------------------- --
PARAM AREA = 8 doublewords = 64 bytes
FIXED AREA = 6 doublewords = 48 bytes
TOTAL = 14 doublewords = 112 bytes
*ALL* of the locations may be left empty. Some of the locations may be
written by child function.
TOC POINTER is used to restore addressibility of globals, but may be
restored independently.
SAVED LR is used to restore the return address, but the return address
link register may be preserved using another method or control transferred
in a different manner.
BACK CHAIN stores previous stack pointer to permit walking the stack frames,
but stack may be allocated and deallocated without storing it.
Decrementing the stack pointer by 112 bytes at the beginning of a function
and incrementing the stack pointer by the complementary amount is sufficient
to interact with other ABI-compliant functions.
"""
|