This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:crosscompiler:backend:register_allocator [2018/02/28 14:43] – [Determine Used Parameters] ursgraf | dev:crosscompiler:backend:register_allocator [2018/10/31 12:19] – [Locals on the Stack] ursgraf | ||
---|---|---|---|
Line 71: | Line 71: | ||
Some instruction need 1 or 2 additional (auxiliary) registers. These will be reserved and stored in //regAux1// and // | Some instruction need 1 or 2 additional (auxiliary) registers. These will be reserved and stored in //regAux1// and // | ||
==== Releasing of Operand Registers ==== | ==== Releasing of Operand Registers ==== | ||
- | Registers of operands, whose live range expires, must be released. If they are of type //Long//, this step must happen at the very end. | + | Registers of operands, whose live range expires, must be released. If they are of type //long//, this step must happen at the very end. |
==== Reservation of a Result Register ==== | ==== Reservation of a Result Register ==== | ||
The register pool will be searched for a free register for the result. The result type determines if 1 or 2 GPR's or a FPR must be reserved. The following two cases must be considered. | The register pool will be searched for a free register for the result. The result type determines if 1 or 2 GPR's or a FPR must be reserved. The following two cases must be considered. | ||
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 these stack slots. | ||
+ | |||
+ |