* src/vm/jit/alpha/codegen.h: Removed M_COPY.
authoredwin <none@none>
Mon, 2 Oct 2006 13:43:15 +0000 (13:43 +0000)
committeredwin <none@none>
Mon, 2 Oct 2006 13:43:15 +0000 (13:43 +0000)
* src/vm/jit/mips/codegen.h: Likewise.
* src/vm/jit/i386/codegen.h: Likewise.
* src/vm/jit/powerpc64/codegen.h: Likewise.
* src/vm/jit/x86_64/codegen.h: Likewise.

* src/vm/jit/powerpc/codegen.c: Unified ICMD_RET with ICMD_GOTO.
* src/vm/jit/alpha/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/intrp/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.

--HG--
branch : unified_variables

12 files changed:
src/vm/jit/alpha/codegen.c
src/vm/jit/alpha/codegen.h
src/vm/jit/i386/codegen.c
src/vm/jit/i386/codegen.h
src/vm/jit/intrp/codegen.c
src/vm/jit/mips/codegen.c
src/vm/jit/mips/codegen.h
src/vm/jit/powerpc/codegen.c
src/vm/jit/powerpc64/codegen.c
src/vm/jit/powerpc64/codegen.h
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/codegen.h

index 66dbd576aebd6ebaa4f81f80f6530717d1bd22ee..12589fb64cc41e0fc6d7d81088d8110f9d17871a 100644 (file)
@@ -32,7 +32,7 @@
             Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -495,7 +495,7 @@ bool codegen(jitdata *jd)
                case ICMD_COPY:
                case ICMD_MOVE:
 
-                       M_COPY(iptr->s1.varindex, iptr->dst.varindex);
+                       emit_copy(jd, iptr, VAROP(iptr->s1), VAROP(iptr->dst));
                        break;
 
 
@@ -2197,6 +2197,8 @@ bool codegen(jitdata *jd)
                        break;
 
                case ICMD_GOTO:         /* ... ==> ...                                */
+               case ICMD_RET:          /* ... ==> ...                                */
+
                        M_BR(0);
                        codegen_addreference(cd, iptr->dst.block);
                        ALIGNCODENOP;
@@ -2208,21 +2210,6 @@ bool codegen(jitdata *jd)
                        codegen_addreference(cd, iptr->sx.s23.s3.jsrtarget.block);
                        break;
                        
-               case ICMD_RET:          /* ... ==> ...                                */
-                                       /* s1.localindex = local variable                       */
-
-                       M_BR(0);
-                       codegen_addreference(cd, iptr->dst.block);
-/*                     var = &(rd->locals[iptr->s1.localindex][TYPE_ADR]); */
-/*                     if (var->flags & INMEMORY) { */
-/*                             M_ALD(REG_ITMP1, REG_SP, 8 * var->vv.regoff); */
-/*                             M_RET(REG_ZERO, REG_ITMP1); */
-/*                             } */
-/*                     else */
-/*                             M_RET(REG_ZERO, var->vv.regoff); */
-                       ALIGNCODENOP;
-                       break;
-
                case ICMD_IFNULL:       /* ..., value ==> ...                         */
 
                        s1 = emit_load_s1(jd, iptr, REG_ITMP1);
index 3f3ca0765ec07adb5bde218cf2dd907099d3c201..89d6e9836ea333f1d43ff74cc1b59574394f969c 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: codegen.h 5595 2006-09-30 23:06:36Z edwin $
+   $Id: codegen.h 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
     } while (0)
 
 
-#define M_COPY(s,d)        emit_copy(jd, iptr, VAR(s), VAR(d))
 #define ICONST(d,c)        emit_iconst(cd, (d), (c))
 #define LCONST(d,c)        emit_lconst(cd, (d), (c))
 
index 2c5f7a8e62b7043f6ea87b5d85f53141defde5eb..b08df63aa9de6deb0ae399b3cf18a18d17b2359e 100644 (file)
@@ -31,7 +31,7 @@
             Christian Ullrich
                        Edwin Steiner
 
-   $Id: codegen.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -708,7 +708,7 @@ bool codegen(jitdata *jd)
                        break;
 
 
-               /* load/store operations **********************************************/
+               /* load/store/copy/move operations ************************************/
 
                case ICMD_ILOAD:
                case ICMD_ALOAD:
@@ -720,11 +720,14 @@ bool codegen(jitdata *jd)
                case ICMD_LSTORE:
                case ICMD_FSTORE:
                case ICMD_DSTORE:
+               case ICMD_COPY:
+               case ICMD_MOVE:
 
                        emit_copy(jd, iptr, VAROP(iptr->s1), VAROP(iptr->dst));
                        break;
 
-               /* pop/copy/move operations *******************************************/
+
+               /* pop operations *****************************************************/
 
                /* attention: double and longs are only one entry in CACAO ICMDs      */
 
@@ -733,11 +736,6 @@ bool codegen(jitdata *jd)
 
                        break;
 
-               case ICMD_COPY:
-               case ICMD_MOVE:
-
-                       M_COPY(iptr->s1.varindex, iptr->dst.varindex);
-                       break;
 
                /* integer operations *************************************************/
 
@@ -2689,6 +2687,7 @@ bool codegen(jitdata *jd)
                        /* FALLTHROUGH! */
 
                case ICMD_GOTO:         /* ... ==> ...                                */
+               case ICMD_RET:          /* ... ==> ...                                */
 
 #if defined(ENABLE_SSA)
                        if ( ls != NULL ) {
@@ -2709,12 +2708,6 @@ bool codegen(jitdata *jd)
                        codegen_addreference(cd, iptr->sx.s23.s3.jsrtarget.block);
                        break;
                        
-               case ICMD_RET:          /* ... ==> ...                                */
-
-                       M_JMP_IMM(0);
-                       codegen_addreference(cd, iptr->dst.block);
-                       break;
-
                case ICMD_IFNULL:       /* ..., value ==> ...                         */
 
                        s1 = emit_load_s1(jd, iptr, REG_ITMP1);
index 356e14a42508d8856e0ae00c6fa18d88a54cc7fe..0a1ca77f36fe2183a890b6b470e51906373bf5c3 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes:
 
-   $Id: codegen.h 5595 2006-09-30 23:06:36Z edwin $
+   $Id: codegen.h 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
     } while (0)
 
 
-#if defined(ENABLE_SSA)
-#define M_COPY(from,to)                                                   \
-        { \
-        if ((ls==NULL) || (to->varkind != TEMPVAR) || \
-                (ls->lifetime[-to->varnum-1].type != -1)) \
-                       { _M_COPY((from),(to));     } }
-#else
-#define M_COPY(from,to) _M_COPY((from),(to));
-#endif
-
-#define _M_COPY(s,d)    emit_copy(jd, iptr, VAR(s), VAR(d))
-
 #define ICONST(d,c) \
     do { \
         if ((c) == 0) \
index 1f5cd44623c9cc6121ce905664125daa588d468f..141d3c2c71cef2ba64e35a14eebf0c2c68afd3ce 100644 (file)
@@ -29,7 +29,7 @@
                        
    Changes: Edwin Steiner
 
-   $Id: codegen.c 5488 2006-09-13 00:21:40Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -1315,6 +1315,7 @@ bool intrp_codegen(jitdata *jd)
                        break;
 
                case ICMD_GOTO:         /* ... ==> ...                                */
+               case ICMD_RET:          /* ... ==> ...                                */
                                        /* op1 = target JavaVM pc                     */
                        gen_branch(GOTO);
                        break;
@@ -1324,12 +1325,6 @@ bool intrp_codegen(jitdata *jd)
                        gen_branch(JSR);
                        break;
                        
-               case ICMD_RET:          /* ... ==> ...                                */
-                                       /* op1 = local variable                       */
-
-                       gen_RET(cd, index2offset(iptr->op1));
-                       break;
-
                case ICMD_IFNULL:       /* ..., value ==> ...                         */
                                        /* op1 = target JavaVM pc                     */
 
index 4d2035a86733315564d14126e57d21afdc2beca5..a182d3b7ae083ce9a1439e8f695d588f300e490c 100644 (file)
@@ -35,7 +35,7 @@
    This module generates MIPS machine code for a sequence of
    intermediate code commands (ICMDs).
 
-   $Id: codegen.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -495,9 +495,8 @@ bool codegen(jitdata *jd)
                case ICMD_DSTORE:     /* ..., value  ==> ...                          */
                case ICMD_COPY:
                case ICMD_MOVE:
-               case ICMD_DUP:
 
-                       M_COPY(iptr->s1.varindex, iptr->dst.varindex);
+                       emit_copy(jd, iptr, VAROP(iptr->s1), VAROP(iptr->dst));
                        break;
 
 
index 79b324bdc31735de1cc39dec692d03504398eb73..dec9c43ea1ea4db8bdb9ac7a4005af1b1ce69ac0 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Andreas Krall
 
-   $Id: codegen.h 5615 2006-10-01 22:55:11Z edwin $
+   $Id: codegen.h 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
             M_DMOV(a, b); \
     } while (0)
 
-#define M_COPY(s,d)                     emit_copy(jd, iptr, VAR(s), VAR(d))
 #define ICONST(r,c)                     emit_iconst(cd, (r), (c))
 #define LCONST(r,c)                     emit_lconst(cd, (r), (c))
 
index de60bdcb1ca306bb5760884b85d891b4e342278a..068233be7b2ccf54269c7a3bf8f9a78d650ac35b 100644 (file)
@@ -31,7 +31,7 @@
             Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen.c 5631 2006-10-02 13:26:39Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -1995,6 +1995,8 @@ bool codegen(jitdata *jd)
                        break;
 
                case ICMD_GOTO:         /* ... ==> ...                                */
+               case ICMD_RET:          /* ... ==> ...                                */
+
                        M_BR(0);
                        codegen_addreference(cd, iptr->dst.block);
                        ALIGNCODENOP;
@@ -2016,14 +2018,6 @@ bool codegen(jitdata *jd)
                        codegen_addreference(cd, iptr->sx.s23.s3.jsrtarget.block);
                        break;
                        
-               case ICMD_RET:          /* ... ==> ...                                */
-                                       /* s1.localindex = local variable             */
-
-                       M_BR(0);
-                       codegen_addreference(cd, iptr->dst.block);
-                       ALIGNCODENOP;
-                       break;
-
                case ICMD_IFNULL:       /* ..., value ==> ...                         */
 
                        s1 = emit_load_s1(jd, iptr, REG_ITMP1);
index 46ff24cb792fa9385a1a1ad8c29eb2183e972687..62ed26322ed1362f2850eead6152cadf2041804d 100644 (file)
@@ -31,7 +31,7 @@
             Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -524,9 +524,8 @@ bool codegen(jitdata *jd)
                case ICMD_DSTORE:     /* ..., value  ==> ...                          */
                case ICMD_COPY:
                case ICMD_MOVE:
-               case ICMD_DUP:        /* ..., a ==> ..., a, a                         */
 
-                       M_COPY(iptr->s1.varindex, iptr->dst.varindex);
+                       emit_copy(jd, iptr, VAROP(iptr->s1), VAROP(iptr->dst));
                        break;
 
 
@@ -1771,6 +1770,7 @@ bool codegen(jitdata *jd)
 
                case ICMD_GOTO:         /* ... ==> ...                                */
                case ICMD_RET:          /* ... ==> ...                                */
+
                        M_BR(0);
                        codegen_addreference(cd, iptr->dst.block);
                        ALIGNCODENOP;
index 317c0f6c9410ed9f0ce58e94553bc0795326d040..b89c80012ab517332b2d960eff3ee3e646156b41 100644 (file)
@@ -31,7 +31,7 @@
    Changes: Christian Thalinger
             Christian Ullrich
 
-   $Id: codegen.h 5618 2006-10-01 23:37:04Z edwin $
+   $Id: codegen.h 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
     } while (0)
 
 
-#define M_COPY(s,d)                     emit_copy(jd, iptr, VAR(s), VAR(d))
 #define ICONST(d,c)                     emit_iconst(cd, (d), (c))
 #define LCONST(reg,c)                  ICONST(reg,c)
 
index 4d4209536a7e8ea8aeb92710b8cdd45be3b3b883..907202d9b74b9d82e4f3ff2eab3d88b83acd6b27 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen.c 5630 2006-10-02 13:16:20Z edwin $
+   $Id: codegen.c 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
@@ -520,7 +520,7 @@ bool codegen(jitdata *jd)
                        break;
 
 
-               /* load/store operations **********************************************/
+               /* load/store/copy/move operations ************************************/
 
                case ICMD_ILOAD:      /* ...  ==> ..., content of local variable      */
                case ICMD_ALOAD:      /* s1 = local variable                          */
@@ -532,11 +532,14 @@ bool codegen(jitdata *jd)
                case ICMD_LSTORE:
                case ICMD_FSTORE:
                case ICMD_DSTORE: 
+               case ICMD_COPY:
+               case ICMD_MOVE:
                        
                        emit_copy(jd, iptr, VAROP(iptr->s1), VAROP(iptr->dst));
                        break;
 
-               /* pop/copy/move operations *******************************************/
+
+               /* pop operations *****************************************************/
 
                /* attention: double and longs are only one entry in CACAO ICMDs      */
 
@@ -545,11 +548,6 @@ bool codegen(jitdata *jd)
 
                        break;
 
-               case ICMD_COPY:
-               case ICMD_MOVE:
-
-                       M_COPY(iptr->s1.varindex, iptr->dst.varindex);
-                       break;
 
                /* integer operations *************************************************/
 
@@ -2309,6 +2307,7 @@ bool codegen(jitdata *jd)
                        break;
 
                case ICMD_GOTO:         /* ... ==> ...                                */
+               case ICMD_RET:          /* ... ==> ...                                */
 
                        M_JMP_IMM(0);
                        codegen_addreference(cd, iptr->dst.block);
@@ -2320,13 +2319,6 @@ bool codegen(jitdata *jd)
                        codegen_addreference(cd, iptr->sx.s23.s3.jsrtarget.block);
                        break;
                        
-               case ICMD_RET:          /* ... ==> ...                                */
-                                       /* s1.localindex = local variable             */
-
-                       M_JMP_IMM(0);
-                       codegen_addreference(cd, iptr->dst.block);
-                       break;
-
                case ICMD_IFNULL:       /* ..., value ==> ...                         */
 
                        s1 = emit_load_s1(jd, iptr, REG_ITMP1);
index 320f76a7c9c57fd1e7560f48712b5c0a59e3aa0c..47da823c694347443d0dc778f2ac066a6d964c6c 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes:
 
-   $Id: codegen.h 5595 2006-09-30 23:06:36Z edwin $
+   $Id: codegen.h 5632 2006-10-02 13:43:15Z edwin $
 
 */
 
     } while (0)
 
 
-#define M_COPY(s,d)    emit_copy(jd, iptr, VAR(s), VAR(d))
-
 #define ICONST(r,c) \
     do { \
         if ((c) == 0) \