deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:crosscompiler:backend_arm:register_allocation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:crosscompiler:backend_arm:register_allocation [2018/12/20 17:15] – [Register Usage] ursgrafdev:crosscompiler:backend_arm:register_allocation [2018/12/21 10:00] – [Parameter Passing] ursgraf
Line 31: Line 31:
 For the translation of certain SSA instructions (e.g. of type long) further auxiliary registers are needed. They are assigned and reserved by the register allocator as well.  For the translation of certain SSA instructions (e.g. of type long) further auxiliary registers are needed. They are assigned and reserved by the register allocator as well. 
  
-==== Parameter Passing ====+===== Parameter Passing =====
 Parameters are passed in R0..R5 and D1..D6.\\ Parameters are passed in R0..R5 and D1..D6.\\
-In the interface //arm/Registers// you can find the definitions about which registers are used for volatiles and nonvolatiles and which are used for parameter passing. Important: the number of parameter registers must be smaller or equal than the number of volatiles. +In the interface //arm/Registers// you can find the definitions about which registers are used for volatiles and nonvolatiles and which are used for parameter passing. Important: the number of parameter registers must be smaller or equal than the number of volatiles. Due to the interleaving of D and S registers in the extension registers, parameters must be carefully copied into the parameter registers. D1 to D6 hold the parameters regardless of the parameter being of type single or double. To give an example. For method //m1(float, double, float, double)// the four parameters will be passed as follows:
  
-==== Locals on the Stack ====+ 
 +===== Locals on the Stack =====
 Most SSA instruction have 2 operands and a result. Each of them can reside on the stack. Operands must be fetched into a free register, the result must be stored onto the stack. A single SSA instruction ''sCstoreToArray'' has three operands but no result. Therefore, if stack slots are used, the following registers are reserved and cannot be used freely during register allocation. Most SSA instruction have 2 operands and a result. Each of them can reside on the stack. Operands must be fetched into a free register, the result must be stored onto the stack. A single SSA instruction ''sCstoreToArray'' has three operands but no result. Therefore, if stack slots are used, the following registers are reserved and cannot be used freely during register allocation.
  
dev/crosscompiler/backend_arm/register_allocation.txt · Last modified: 2019/10/03 10:22 by ursgraf