This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dev:crosscompiler:backend:register_allocator [2018/02/28 14:43] – [Releasing of Registers of phi-Functions] ursgraf | dev:crosscompiler:backend:register_allocator [2018/10/31 12:58] – [Locals on the Stack] ursgraf | ||
---|---|---|---|
Line 92: | Line 92: | ||
==== Releasing of Result Registers ==== | ==== Releasing of Result Registers ==== | ||
The result register can be released immediately if the live range already expires. | The result register can be released immediately if the live range already expires. | ||
+ | |||
+ | ===== Locals on the Stack ===== | ||
+ | Local variables which cannot be assigned a register get assigned a stack slot. Stack slots are numbered from 0x100. The code generator will handle the transfer to and from these stack slots. Whenever the code generator tries to translate an SSA instruction and one of the operands is on the stack, the following has to be dones: | ||
+ | |||
+ | * load stack slot into free register | ||
+ | * execute instruction | ||
+ | |||
+ | If the result of the SSA instruction is assigned a stack slot, the code generator will have to save to the stack: | ||
+ | |||
+ | * execute instruction, | ||
+ | * store destination register onto stack | ||
+ | |||
+ | During register allocation of a method a variable // | ||
+ |