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 revisionBoth sides next revision
dev:crosscompiler:backend_arm:register_allocation [2018/12/21 10:44] – [Parameter Passing] ursgrafdev:crosscompiler:backend_arm:register_allocation [2018/12/21 11:01] – [Parameter Passing] ursgraf
Line 34: Line 34:
 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. 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 a, double b, float c, double d)// the four parameters will be passed as follows: 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 a, double b, float c, double d)// the four parameters will be passed as follows:
-^S0^S1^S2^S3^S4^S5^S6^S7^S8^S9^ +|S0|S1|S2|S3|S4|S5|S6|S7|S8|S9| 
- D0  ^^  D1  ^^  D2  ^^  D3  ^^  D4  ^^ + D0  ||  D1  ||  D2  ||  D3  ||  D4  || 
- ^^a^  b  ^^c^  d  ^^+ ^^a^  b  ^^c^  d  ^^
  
 ===== Locals on the Stack ===== ===== Locals on the Stack =====
dev/crosscompiler/backend_arm/register_allocation.txt · Last modified: 2019/10/03 10:22 by ursgraf