Tabs expanded
authorstefan <none@none>
Tue, 10 Dec 2002 14:09:54 +0000 (14:09 +0000)
committerstefan <none@none>
Tue, 10 Dec 2002 14:09:54 +0000 (14:09 +0000)
alpha/calling.doc

index b223fe650a7921519524456ab25aea3392136fbe..ca2325d062e042f24d7f6eb46bb970487f51c01d 100644 (file)
@@ -1,15 +1,15 @@
 /* calling.doc *****************************************************************
 
-       Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
+    Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
 
-       See file COPYRIGHT for information on usage and disclaimer of warranties
+    See file COPYRIGHT for information on usage and disclaimer of warranties
 
-       A short description of Alpha calling conventions and register usage.
+    A short description of Alpha calling conventions and register usage.
 
-       Authors: Andreas  Krall          EMAIL: cacao@complang.tuwien.ac.at
-                        Reinhard Grafl          EMAIL: cacao@complang.tuwien.ac.at
+    Authors: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
+             Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1998/11/05
+    Last Change: 1998/11/05
 
 *******************************************************************************/
 
@@ -22,12 +22,12 @@ The calling conventions basically follow the conventions for normal C
 functions. However, the R28 register has a special meaning:
 
 R28 ..... contains a pointer to the correct 'methodinfo' structure for this
-                 method, in case it has to be passed on to the JIT compiler.
+          method, in case it has to be passed on to the JIT compiler.
 
-                 If Java methods call C functions directly (C functions don't have
-                 'methodinfo' structures associated naturally), the value of this
-                 register is undefined. Every function called by the JavaVM
-                 (builtin_new, etc.) is called this way.
+          If Java methods call C functions directly (C functions don't have
+          'methodinfo' structures associated naturally), the value of this
+          register is undefined. Every function called by the JavaVM
+          (builtin_new, etc.) is called this way.
 
 The other registers are used according to the standard Alpha calling
 conventions. Here is a summary of the usage:
@@ -42,8 +42,8 @@ R1-R8 ..... temporary registers (destroyed by called method)
 R9-R15 .... saved registers (left unchanged by called method)
 
 R16-R21 ... argument registers 0 - 5 (contain the first six method arguments
-                       of type INT, LONG and ADDRESS. Argument registers are destroyed
-                       by called method)
+            of type INT, LONG and ADDRESS. Argument registers are destroyed
+            by called method)
 
 R22-R24 ... temporary registers (destroyed by called method)
 
@@ -52,14 +52,14 @@ R25 ....... code generator temporary register (destroyed by called method)
 R26 (ra) .. return address (left unchanged by called method)
 
 R27 (pv) .. procedure vector, points to the first instruction of the called
-                       method. This vector is used for addressing the entries in the
-                       data segment. The ov of the caller is recomputed from the ra.
-                       Therefore it is necessary that a return is always done using ra.
+            method. This vector is used for addressing the entries in the
+            data segment. The ov of the caller is recomputed from the ra.
+            Therefore it is necessary that a return is always done using ra.
 
 R28 ....... pointer to 'methodinfo' structure. This register has to be set
-                       correctly, because it is needed in the case the jit is invoked.
-                       Also used as code generator temporary register. It isdestroyed
-                       by called method)
+            correctly, because it is needed in the case the jit is invoked.
+            Also used as code generator temporary register. It isdestroyed
+            by called method)
 
 R29 ....... code generator temporary register (destroyed by called method)
 
@@ -73,14 +73,14 @@ floating point registers:
 F0 ........ method result value for types FLOAT and DOUBLE
 
 F1 ........ temporary register (destroyed by called method)
-                                                               
+                                
 F2-F9 ..... saved registers (left unchanged by called method)
 
 F10-F15 ... temporary registers (destroyed by called method)
 
 F16-F21 ... argument registers 0 - 5 (contain the first six method arguments
-                       of type FLOAT and DOUBLE. Argument registers are destroyed
-                       by called method)
+            of type FLOAT and DOUBLE. Argument registers are destroyed
+            by called method)
 F22-F27 ... temporary registers (destroyed by called method)
 
 F28-F30 ... code generator temporary register (destroyed by called method)
@@ -97,14 +97,14 @@ from the seventh needs to use the stack, according to the following
 conventions:
 
 
-                                 | .....                                                                                  |
-                                 --------------------------------------------------
-                                 |      Parameter 9  ( 64 bit regardless of type)         |
-                                 --------------------------------------------------
-                                 |      Parameter 8  ( 64 bit regardless of type)         |
-                                 --------------------------------------------------
-   R30 (sp) --->  |     Parameter 7  ( 64 bit regardless of type)         |
-                                 --------------------------------------------------
+                  | .....                                          |
+                  --------------------------------------------------
+                  |  Parameter 9  ( 64 bit regardless of type)     |
+                  --------------------------------------------------
+                  |  Parameter 8  ( 64 bit regardless of type)     |
+                  --------------------------------------------------
+   R30 (sp) --->  |  Parameter 7  ( 64 bit regardless of type)     |
+                  --------------------------------------------------
   
 The stack pointer points at the bottom of the parameter passing area.
 
@@ -121,27 +121,27 @@ six parameters requires stack space as well.
 
 An entire stack frame looks like this (each entry is exactly 64 bits long,
 sizes are given in multiples of 64 bit units):
-       
-                       ---------------------------------------------
-                       |  parameter n (passed from caller)                     |
-                       ---------------------------------------------   
-                       |  parameter n-1                                                        |
-                       ---------------------------------------------
-                       | ...                                                                           |
-                       ---------------------------------------------
-                       |  parameter 7                                                          |
+    
+            ---------------------------------------------
+            |  parameter n (passed from caller)         |
+            ---------------------------------------------   
+            |  parameter n-1                            |
+            ---------------------------------------------
+            | ...                                       |
+            ---------------------------------------------
+            |  parameter 7                              |
 old SP ---> ============================================= --- parentargs_base
-                       |  saved RA                                                                     |
-                       ---------------------------------------------     savedregs_num
-                       |  others saved registers                                       |
-                       ============================================= --- maxmemuse + 1
-                       |  optional monitor_exit argument                       |
-                       ============================================= --- maxmemuse
-                       |  area for spilled registers                           |
-                       =============================================
-                       |  ....                                                                         |
-                       ---------------------------------------------
-                       |  parameter 8                                                          |
-                       ---------------------------------------------
-                       |  parameter 7 (passed to called method)        |
+            |  saved RA                                 |
+            ---------------------------------------------     savedregs_num
+            |  others saved registers                   |
+            ============================================= --- maxmemuse + 1
+            |  optional monitor_exit argument           |
+            ============================================= --- maxmemuse
+            |  area for spilled registers               |
+            =============================================
+            |  ....                                     |
+            ---------------------------------------------
+            |  parameter 8                              |
+            ---------------------------------------------
+            |  parameter 7 (passed to called method)    |
 new SP ---> =============================================