* src/vm/jit/powerpc/netbsd/md-abi.c: Blindly ported to
authoredwin <none@none>
Mon, 2 Oct 2006 14:18:04 +0000 (14:18 +0000)
committeredwin <none@none>
Mon, 2 Oct 2006 14:18:04 +0000 (14:18 +0000)
unified_variables.

* src/vm/jit/powerpc/linux/md-abi.c: Cleaned up.
* src/vm/jit/powerpc/darwin/md-abi.c: Likewise.
* src/vm/jit/alpha/md-abi.c: Likewise.
* src/vm/jit/mips/md-abi.c: Likewise.
* src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
* src/vm/jit/x86_64/md-abi.c: Likewise.

--HG--
branch : unified_variables

src/vm/jit/alpha/md-abi.c
src/vm/jit/mips/md-abi.c
src/vm/jit/powerpc/darwin/md-abi.c
src/vm/jit/powerpc/linux/md-abi.c
src/vm/jit/powerpc/netbsd/md-abi.c
src/vm/jit/powerpc64/linux/md-abi.c
src/vm/jit/x86_64/md-abi.c

index 51c501dcb8030e15ab72bcc22a947e4592b1978e..e8ba8c65c373bfab46c618677f9b49c3b895803d 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: md-abi.c 5595 2006-09-30 23:06:36Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -143,15 +143,13 @@ void md_param_alloc(methoddesc *md)
    (SAVEDVAR)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                                                       TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
    
    --- out
    if precoloring was possible:
-   jd->var[stackslot->varnum]->flags       = PREALLOC
-                                        ->regoff      =[REG_RESULT|REG_FRESULT]
+   VAR(stackslot->varnum)->flags       = PREALLOC
+                                    ->vv.regoff   = [REG_RESULT|REG_FRESULT]
    rd->arg[flt|int]reguse   set to a value according the register usage
 
    NOTE: Do not pass a LOCALVAR in stackslot->varnum.
@@ -164,7 +162,7 @@ void md_return_alloc(jitdata *jd, stackptr stackslot)
 
        /* get required compiler data */
 
-       return;
+       return; /* XXX why has this been deactivated? */
 
        m = jd->m;
 
@@ -174,17 +172,12 @@ void md_return_alloc(jitdata *jd, stackptr stackslot)
           not to survive method invokations. */
 
        if (!(stackslot->flags & SAVEDVAR)) {
-/*             stackslot->varkind = ARGVAR; */
-/*             stackslot->varnum  = -1; */
-/*             stackslot->flags   = 0; */
 
                VAR(stackslot->varnum)->flags = PREALLOC;
 
                if (IS_INT_LNG_TYPE(md->returntype.type))
-/*                     stackslot->regoff = REG_RESULT; */
                        VAR(stackslot->varnum)->vv.regoff = REG_RESULT;
                else
-/*                     stackslot->regoff = REG_FRESULT; */
                        VAR(stackslot->varnum)->vv.regoff = REG_FRESULT;
        }
 }
index 59eb4be7b28334901b9bfd90689e076da706db7d..08aa28aa7e6834e748c53fcf7a72e2d50b6db97c 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: md-abi.c 5615 2006-10-01 22:55:11Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -191,9 +191,7 @@ void md_param_alloc(methoddesc *md)
    (SAVEDVAR)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                            TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
    
    --- out
index fcc05576b7eecdd843cbcc214e2523fbf05b3447..812042c810b69605615c820dd39e70e774717db6 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: md-abi.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -211,9 +211,7 @@ void md_param_alloc(methoddesc *md)
    for float/double)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                            TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
    
    --- out
@@ -248,6 +246,7 @@ void md_return_alloc(jitdata *jd, stackptr stackslot)
                   has not to survive method invokations. */
 
                if (!(stackslot->flags & SAVEDVAR)) {
+
                        VAR(stackslot->varnum)->flags = PREALLOC;
 
                        if (IS_INT_LNG_TYPE(md->returntype.type)) {
index c9137502ade67d5c07149f188da86114594063e4..13b64bf9e67244dd61faa742f315131d1e9196f3 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: md-abi.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -205,9 +205,7 @@ void md_param_alloc(methoddesc *md)
    for float/double)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                            TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
 
    --- out
index d1007c04fd46971259e63be4756dbb64981daf53..4f656aeba0c68e7666c5cee688090e56fd1940a1 100644 (file)
@@ -198,56 +198,61 @@ void md_param_alloc(methoddesc *md)
    for float/double)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                            TYPE_VOID is not allowed!
+   jd:                      jitdata of current method
    stackslot:               Java Stackslot to contain the Return Value
 
    --- out
    if precoloring was possible:
-   stackslot->varkind       =ARGVAR
-            ->varnum        =-1
-               ->flags         =0
-               ->regoff        =[REG_RESULT, (REG_RESULT2/REG_RESULT), REG_FRESULT]
+   VAR(stackslot->varnum)->flags  = PREALLOC
+   VAR(stackslot->varnum)->vv.regoff = [REG_RESULT, (REG_RESULT2/REG_RESULT), REG_FRESULT]
    rd->arg[flt|int]reguse   set to a value according the register usage
 
 *******************************************************************************/
 
-void md_return_alloc(methodinfo *m, registerdata *rd, s4 return_type,
-                                        stackptr stackslot)
+void md_return_alloc(jitdata *jd, stackptr stackslot)
 {
+       methodinfo   *m;
+       registerdata *rd;
+       methoddesc   *md;
+
+       /* get required compiler data */
+
+       m  = jd->m;
+       rd = jd->rd;
+
+       md = m->parseddesc;
+
        /* In Leafmethods Local Vars holding parameters are precolored to
           their argument register -> so leafmethods with paramcount > 0
           could already use R3 == a00! */
 
-       if (!m->isleafmethod || (m->parseddesc->paramcount == 0)) {
+       if (!m->isleafmethod || (md->paramcount == 0)) {
                /* Only precolor the stackslot, if it is not a SAVEDVAR <->
                   has not to survive method invokations. */
 
                if (!(stackslot->flags & SAVEDVAR)) {
-                       stackslot->varkind = ARGVAR;
-                       stackslot->varnum = -1;
-                       stackslot->flags = 0;
 
-                       if (IS_INT_LNG_TYPE(return_type)) {
-                               if (!IS_2_WORD_TYPE(return_type)) {
+                       VAR(stackslot->varnum)->flags = PREALLOC;
+
+                       if (IS_INT_LNG_TYPE(md->returntype.type)) {
+                               if (!IS_2_WORD_TYPE(md->returntype.type)) {
                                        if (rd->argintreguse < 1)
                                                rd->argintreguse = 1;
 
-                                       stackslot->regoff = REG_RESULT;
+                                       VAR(stackslot->varnum)->vv.regoff = REG_RESULT;
 
                                } else {
                                        if (rd->argintreguse < 2)
                                                rd->argintreguse = 2;
 
-                                       stackslot->regoff = PACK_REGS(REG_RESULT2, REG_RESULT);
+                                       VAR(stackslot->varnum)->vv.regoff = PACK_REGS(REG_RESULT2, REG_RESULT);
                                }
 
                        } else { /* float/double */
                                if (rd->argfltreguse < 1)
                                        rd->argfltreguse = 1;
 
-                               stackslot->regoff = REG_FRESULT;
+                               VAR(stackslot->varnum)->vv.regoff = REG_FRESULT;
                        }
                }
        }
index 7053f2ddae5d34901df8e39335940e0fc5e45126..6f2dc48b9f291dddf52bdc71eafb8895011668e4 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: 
 
-   $Id: md-abi.c 5618 2006-10-01 23:37:04Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -190,9 +190,7 @@ void md_param_alloc(methoddesc *md)
    for float/double)
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                            TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
 
    --- out
index 47b9a965740f49d5b61fbd5d51af957e0a0abd78..0c8ec109a2ddacb4a13a5fb78e9dddbab31df92f 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: md-abi.c 5595 2006-09-30 23:06:36Z edwin $
+   $Id: md-abi.c 5634 2006-10-02 14:18:04Z edwin $
 
 */
 
@@ -142,15 +142,13 @@ void md_param_alloc(methoddesc *md)
    return register.
 
    --- in
-   m:                       Methodinfo of current method
-   return_type:             Return Type of the Method (TYPE_INT.. TYPE_ADR)
-                                                       TYPE_VOID is not allowed!
+   jd:                      jitdata of the current method
    stackslot:               Java Stackslot to contain the Return Value
 
    --- out
    if precoloring was possible:
-   jd->var[stackslot->varnum]->flags       = PREALLOC
-                                        ->regoff      =[REG_RESULT|REG_FRESULT]
+   VAR(stackslot->varnum)->flags     = PREALLOC
+                                    ->vv.regoff = [REG_RESULT|REG_FRESULT]
    rd->arg[flt|int]reguse   set to a value according the register usage
 
    NOTE: Do not pass a LOCALVAR in stackslot->varnum.
@@ -185,16 +183,13 @@ void md_return_alloc(jitdata *jd, stackptr stackslot)
                           <-> has not to survive method invokations */
 
                        if (!(stackslot->flags & SAVEDVAR)) {
-/*                             stackslot->varkind = ARGVAR; */
-/*                             stackslot->varnum  = -1; */
-/*                             stackslot->flags   = 0; */
+
+                               VAR(stackslot->varnum)->flags = PREALLOC;
 
                            /* float/double */
                                if (rd->argfltreguse < 1)
                                        rd->argfltreguse = 1;
 
-/*                             stackslot->regoff = REG_FRESULT; */
-                               VAR(stackslot->varnum)->flags = PREALLOC;
                                VAR(stackslot->varnum)->vv.regoff = REG_FRESULT;
                        }
                }