* src/vm/builtin.c (builtin_trace_args): Renamed to
authortwisti <none@none>
Sat, 10 Feb 2007 19:06:54 +0000 (19:06 +0000)
committertwisti <none@none>
Sat, 10 Feb 2007 19:06:54 +0000 (19:06 +0000)
builtin_verbosecall_enter.
(builtin_trace_args): Renamed to builtin_verbosecall_enter.
(builtin_displaymethodstop): Renamed to builtin_verbosecall_exit and
changed signature.
* src/vm/builtin.h: Likewise.

* src/vm/jit/arm/emit.c (emit_verbosecall_enter): Likewise.
(builtin_verbosecall_exit): Likewise.
* src/vm/jit/alpha/emit.c: Likewise.
* src/vm/jit/i386/emit.c: Likewise.
* src/vm/jit/mips/emit.c: Likewise.
* src/vm/jit/powerpc/emit.c: Likewise.

* src/vm/jit/alpha/md-abi.h (REG_FA0, REG_FA1, REG_FA2): Added.
* src/vm/jit/mips/md-abi.h: Removed multiple defines.
* src/vm/jit/powerpc/linux/md-abi.h (REG_FA0, REG_FA1): Added.
(REG_A0_A1_PACKED): Likewise.

* src/vm/jit/mips/linux/Makefile.am (AM_CPPFLAGS): Added
-I$(top_builddir)/src.
* src/vm/jit/mips/irix/Makefile.am: Likewise.

12 files changed:
src/vm/builtin.c
src/vm/builtin.h
src/vm/jit/alpha/emit.c
src/vm/jit/alpha/md-abi.h
src/vm/jit/arm/emit.c
src/vm/jit/i386/emit.c
src/vm/jit/mips/emit.c
src/vm/jit/mips/irix/Makefile.am
src/vm/jit/mips/linux/Makefile.am
src/vm/jit/mips/md-abi.h
src/vm/jit/powerpc/emit.c
src/vm/jit/powerpc/linux/md-abi.h

index adee582c23d31bdf3fbcf89bb0a77cb298b641ed..719d9daf0109603d1f9684ea711734fd39ccdfe0 100644 (file)
@@ -28,7 +28,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 7280 2007-02-03 19:34:10Z twisti $
+   $Id: builtin.c 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
@@ -1440,7 +1440,7 @@ static char *builtin_print_argument(char *logtext, s4 *logtextlen,
 #endif /* !defined(NDEBUG) */
 
 
-/* builtin_trace_args **********************************************************
+/* builtin_verbosecall_enter ***************************************************
 
    Print method call with arguments for -verbose:call.
 
@@ -1449,17 +1449,17 @@ static char *builtin_print_argument(char *logtext, s4 *logtextlen,
 #if !defined(NDEBUG)
 
 #ifdef TRACE_ARGS_NUM
-void builtin_trace_args(s8 a0, s8 a1,
-#if TRACE_ARGS_NUM >= 4
-                                               s8 a2, s8 a3,
-#endif /* TRACE_ARGS_NUM >= 4 */
-#if TRACE_ARGS_NUM >= 6
-                                               s8 a4, s8 a5,
-#endif /* TRACE_ARGS_NUM >= 6 */
-#if TRACE_ARGS_NUM == 8
-                                               s8 a6, s8 a7,
-#endif /* TRACE_ARGS_NUM == 8 */
-                                               methodinfo *m)
+void builtin_verbosecall_enter(s8 a0, s8 a1,
+# if TRACE_ARGS_NUM >= 4
+                                                          s8 a2, s8 a3,
+# endif
+# if TRACE_ARGS_NUM >= 6
+                                                          s8 a4, s8 a5,
+# endif
+# if TRACE_ARGS_NUM == 8
+                                                          s8 a6, s8 a7,
+# endif
+                                                          methodinfo *m)
 {
        methoddesc *md;
        char       *logtext;
@@ -1622,14 +1622,14 @@ void builtin_trace_args(s8 a0, s8 a1,
 #endif /* !defined(NDEBUG) */
 
 
-/* builtin_displaymethodstop ***************************************************
+/* builtin_verbosecall_exit ****************************************************
 
    Print method exit for -verbose:call.
 
 *******************************************************************************/
 
 #if !defined(NDEBUG)
-void builtin_displaymethodstop(methodinfo *m, s8 l, double d, float f)
+void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m)
 {
        methoddesc *md;
        char       *logtext;
index c41ca6bd13cef4be47fac0646390cc6a74d16ece..a1e9b983963b8f5cf271c7c2b80e64f2b44a2806 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: builtin.h 7246 2007-01-29 18:49:05Z twisti $
+   $Id: builtin.h 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
@@ -169,21 +169,21 @@ s4 builtin_canstore(java_objectarray *oa, java_objectheader *o);
 #define BUILTIN_canstore (functionptr) builtin_canstore
 
 #if defined(TRACE_ARGS_NUM)
-void builtin_trace_args(s8 a0, s8 a1,
-#if TRACE_ARGS_NUM >= 4
-                                               s8 a2, s8 a3,
-#endif /* TRACE_ARGS_NUM >= 4 */
-#if TRACE_ARGS_NUM >= 6
-                                               s8 a4, s8 a5,
-#endif /* TRACE_ARGS_NUM >= 6 */
-#if TRACE_ARGS_NUM == 8
-                                               s8 a6, s8 a7,
-#endif /* TRACE_ARGS_NUM == 8 */
-                                               methodinfo *m);
+void builtin_verbosecall_enter(s8 a0, s8 a1,
+# if TRACE_ARGS_NUM >= 4
+                                                          s8 a2, s8 a3,
+# endif
+# if TRACE_ARGS_NUM >= 6
+                                                          s8 a4, s8 a5,
+# endif
+# if TRACE_ARGS_NUM == 8
+                                                          s8 a6, s8 a7,
+# endif
+                                                          methodinfo *m);
 /* NOT AN OP */
 #endif /* defined(TRACE_ARGS_NUM) */
 
-void builtin_displaymethodstop(methodinfo *m, s8 l, double d, float f);
+void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
 /* NOT AN OP */
 
 s4 builtin_idiv(s4 a, s4 b);
index 6d6f8fd514bb87ea2569e75ab8c7c932e1f7b7f0..dd0743e9dee072f8213f0b27150bb3e003c9c316 100644 (file)
@@ -595,7 +595,7 @@ void emit_verbosecall_enter(jitdata *jd)
        disp = dseg_add_address(cd, m);
        M_ALD(REG_ITMP1, REG_PV, disp);
        M_AST(REG_ITMP1, REG_SP, 0 * 8);
-       disp = dseg_add_functionptr(cd, builtin_trace_args);
+       disp = dseg_add_functionptr(cd, builtin_verbosecall_enter);
        M_ALD(REG_PV, REG_PV, disp);
        M_JSR(REG_RA, REG_PV);
        disp = (s4) (cd->mcodeptr - cd->mcodebase);
@@ -633,6 +633,8 @@ void emit_verbosecall_enter(jitdata *jd)
 
    Generates the code for the call trace.
 
+   void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
+
 *******************************************************************************/
 
 #if !defined(NDEBUG)
@@ -653,20 +655,20 @@ void emit_verbosecall_exit(jitdata *jd)
 
        M_NOP;
 
-       M_LDA(REG_SP, REG_SP, -4 * 8);
+       M_ASUB_IMM(REG_SP, 4 * 8, REG_SP);
        M_AST(REG_RA, REG_SP, 0 * 8);
 
        M_LST(REG_RESULT, REG_SP, 1 * 8);
        M_DST(REG_FRESULT, REG_SP, 2 * 8);
 
-       disp = dseg_add_address(cd, m);
-       M_ALD(rd->argintregs[0], REG_PV, disp);
+       M_MOV(REG_RESULT, REG_A0);
+       M_FMOV(REG_FRESULT, REG_FA1);
+       M_FMOV(REG_FRESULT, REG_FA2);
 
-       M_MOV(REG_RESULT, rd->argintregs[1]);
-       M_FLTMOVE(REG_FRESULT, rd->argfltregs[2]);
-       M_FLTMOVE(REG_FRESULT, rd->argfltregs[3]);
+       disp = dseg_add_address(cd, m);
+       M_ALD(REG_A3, REG_PV, disp);
 
-       disp = dseg_add_functionptr(cd, builtin_displaymethodstop);
+       disp = dseg_add_functionptr(cd, builtin_verbosecall_exit);
        M_ALD(REG_PV, REG_PV, disp);
        M_JSR(REG_RA, REG_PV);
        disp = (cd->mcodeptr - cd->mcodebase);
@@ -676,7 +678,7 @@ void emit_verbosecall_exit(jitdata *jd)
        M_LLD(REG_RESULT, REG_SP, 1 * 8);
 
        M_ALD(REG_RA, REG_SP, 0 * 8);
-       M_LDA(REG_SP, REG_SP, 4 * 8);
+       M_AADD_IMM(REG_SP, 4 * 8, REG_SP);
 
        /* mark trace code */
 
index ad058d1861e066eee4d00e6082a462cc7aa0d9b3..7361ac96670ee0224478f2eafe9b22ec342c2c46 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/alpha/md-abi.h - defines for Alpha ABI
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
    J. Wenninger, Institut f. Computersprachen - TU Wien
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   Changes: Christian Ullrich
-
-   $Id: md-abi.h 5387 2006-09-06 22:16:48Z twisti $
+   $Id: md-abi.h 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
   
 #define REG_RESULT      0    /* to deliver method results                     */
 
+#define REG_A0          16   /* define some argument registers                */
+#define REG_A1          17
+#define REG_A2          18
+#define REG_A3          19
+
 #define REG_RA          26   /* return address                                */
 #define REG_PV          27   /* procedure vector, must be provided by caller  */
 #define REG_METHODPTR   28   /* pointer to the place from where the procedure */
 #define REG_SP          30   /* stack pointer                                 */
 #define REG_ZERO        31   /* always zero                                   */
 
-#define REG_A0          16   /* define some argument registers                */
-#define REG_A1          17
-#define REG_A2          18
-#define REG_A3          19
 
 /* floating point registers */
 
 #define REG_FRESULT     0    /* to deliver floating point method results      */
 
+#define REG_FA0         16   /* define some argument registers                */
+#define REG_FA1         17
+#define REG_FA2         18
+
 #define REG_FTMP1       28   /* temporary floating point register             */
 #define REG_FTMP2       29   /* temporary floating point register             */
 #define REG_FTMP3       30   /* temporary floating point register             */
index d446136cb68a682997bf8aafbff365913f4fd75b..0a1b471f3d8293398995159135d37188ea1be6f7 100644 (file)
@@ -721,7 +721,7 @@ void emit_verbosecall_enter(jitdata *jd)
 
        /* call tracer here (we use a long branch) */
 
-       M_LONGBRANCH(builtin_trace_args);
+       M_LONGBRANCH(builtin_verbosecall_enter);
 
        /* restore argument registers from stack */
 
@@ -739,6 +739,8 @@ void emit_verbosecall_enter(jitdata *jd)
 
    Generates the code for the call trace.
 
+   void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
+
 *******************************************************************************/
 
 #if !defined(NDEBUG)
@@ -763,32 +765,32 @@ void emit_verbosecall_exit(jitdata *jd)
        M_NOP;
 
        M_STMFD(BITMASK_RESULT | (1<<REG_LR) | (1<<REG_PV), REG_SP);
-       M_SUB_IMM(REG_SP, REG_SP, (1 + 1) * 4);    /* space for d[high reg] and f */
+       M_SUB_IMM(REG_SP, REG_SP, (1 + 1) * 4);              /* space for f and m */
 
        switch (md->returntype.type) {
        case TYPE_ADR:
        case TYPE_INT:
-               M_INTMOVE(REG_RESULT, GET_LOW_REG(REG_A1_A2_PACKED));
-               M_MOV_IMM(GET_HIGH_REG(REG_A1_A2_PACKED), 0);
+               M_INTMOVE(REG_RESULT, GET_LOW_REG(REG_A0_A1_PACKED));
+               M_MOV_IMM(GET_HIGH_REG(REG_A0_A1_PACKED), 0);
                break;
 
        case TYPE_LNG:
-               M_LNGMOVE(REG_RESULT_PACKED, REG_A1_A2_PACKED);
+               M_LNGMOVE(REG_RESULT_PACKED, REG_A0_A1_PACKED);
                break;
 
        case TYPE_FLT:
-               M_IST(REG_RESULT, REG_SP, 1 * 4);
+               M_IST(REG_RESULT, REG_SP, 0 * 4);
                break;
 
        case TYPE_DBL:
-               M_INTMOVE(REG_RESULT, REG_A3);
-               M_IST(REG_RESULT2, REG_SP, 0 * 4);
+               M_LNGMOVE(REG_RESULT_PACKED, REG_A2_A3_PACKED);
                break;
        }
 
        disp = dseg_add_address(cd, m);
-       M_DSEG_LOAD(REG_A0, disp);
-       M_LONGBRANCH(builtin_displaymethodstop);
+       M_DSEG_LOAD(REG_ITMP1, disp);
+       M_AST(REG_ITMP1, REG_SP, 1 * 4);
+       M_LONGBRANCH(builtin_verbosecall_exit);
 
        M_ADD_IMM(REG_SP, REG_SP, (1 + 1) * 4);            /* free argument stack */
        M_LDMFD(BITMASK_RESULT | (1<<REG_LR) | (1<<REG_PV), REG_SP);
index d6cbb88eae1219d0d5c214ec5d8e3932133347e7..215b53643d27fe1afe79f8d0b8b0ac9831d29b24 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 7255 2007-01-29 21:39:38Z twisti $
+   $Id: emit.c 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
@@ -672,7 +672,7 @@ void emit_verbosecall_enter(jitdata *jd)
        
        M_AST_IMM(m, REG_SP, TRACE_ARGS_NUM * 8);
 
-       M_MOV_IMM(builtin_trace_args, REG_ITMP1);
+       M_MOV_IMM(builtin_verbosecall_enter, REG_ITMP1);
        M_CALL(REG_ITMP1);
 
        /* restore temporary registers for leaf methods */
@@ -693,6 +693,8 @@ void emit_verbosecall_enter(jitdata *jd)
 
    Generates the code for the call trace.
 
+   void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
+
 *******************************************************************************/
 
 #if !defined(NDEBUG)
@@ -715,21 +717,21 @@ void emit_verbosecall_exit(jitdata *jd)
 
        M_NOP;
 
-       M_ASUB_IMM(4 + 8 + 8 + 4 + 8, REG_SP);  /* +8: keep stack 16-byte aligned */
+       M_ASUB_IMM(8 + 8 + 4 + 4 + 8, REG_SP);  /* +8: keep stack 16-byte aligned */
 
-       M_AST_IMM(m, REG_SP, 0 * 4);
+       M_LST(REG_RESULT_PACKED, REG_SP, 0 * 8);
 
-       M_LST(REG_RESULT_PACKED, REG_SP, 1 * 4);
+       M_DSTNP(REG_NULL, REG_SP, 1 * 8);
+       M_FSTNP(REG_NULL, REG_SP, 2 * 8);
 
-       M_DSTNP(REG_NULL, REG_SP, 1 * 4 + 1 * 8);
-       M_FSTNP(REG_NULL, REG_SP, 1 * 4 + 2 * 8);
+       M_AST_IMM(m, REG_SP, 2 * 8 + 1 * 4);
 
-       M_MOV_IMM(builtin_displaymethodstop, REG_ITMP1);
+       M_MOV_IMM(builtin_verbosecall_exit, REG_ITMP1);
        M_CALL(REG_ITMP1);
 
-       M_LLD(REG_RESULT_PACKED, REG_SP, 1 * 4);
+       M_LLD(REG_RESULT_PACKED, REG_SP, 0 * 4);
 
-       M_AADD_IMM(4 + 8 + 8 + 4 + 8, REG_SP);
+       M_AADD_IMM(8 + 8 + 4 + 4 + 8, REG_SP);
 
        /* mark trace code */
 
index 60e45e3f51d34ba073fb9df5753b9cf587dca8c6..b60a361d67b074c38f7fd1ebdc8fbc2c52632741 100644 (file)
@@ -958,7 +958,7 @@ void emit_verbosecall_enter(jitdata *jd)
        disp = dseg_add_address(cd, m);
        M_ALD(REG_ITMP1, REG_PV, disp);
        M_AST(REG_ITMP1, REG_SP, PA_SIZE + 0 * 8);
-       disp = dseg_add_functionptr(cd, builtin_trace_args);
+       disp = dseg_add_functionptr(cd, builtin_verbosecall_enter);
        M_ALD(REG_ITMP3, REG_PV, disp);
        M_JSR(REG_RA, REG_ITMP3);
        M_NOP;
@@ -995,6 +995,8 @@ void emit_verbosecall_enter(jitdata *jd)
 
    Generates the code for the call trace.
 
+   void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
+
 *******************************************************************************/
 
 #if !defined(NDEBUG)
@@ -1019,52 +1021,48 @@ void emit_verbosecall_exit(jitdata *jd)
        M_NOP;
 
 #if SIZEOF_VOID_P == 8
-       M_LDA(REG_SP, REG_SP, -4 * 8);              /* keep stack 16-byte aligned */
+       M_ASUB_IMM(REG_SP, 4 * 8, REG_SP);          /* keep stack 16-byte aligned */
        M_AST(REG_RA, REG_SP, 0 * 8);
 
        M_LST(REG_RESULT, REG_SP, 1 * 8);
        M_DST(REG_FRESULT, REG_SP, 2 * 8);
+
+       M_MOV(REG_RESULT, REG_A0);
+       M_DMOV(REG_FRESULT, REG_FA1);
+       M_FMOV(REG_FRESULT, REG_FA2);
+
+       disp = dseg_add_address(cd, m);
+       M_ALD(REG_A4, REG_PV, disp);
 #else
-       M_LDA(REG_SP, REG_SP, -(8*4 + 4 * 8));
+       M_ASUB_IMM(REG_SP, (8*4 + 4 * 8), REG_SP);
        M_AST(REG_RA, REG_SP, 8*4 + 0 * 8);
 
        M_LST(REG_RESULT_PACKED, REG_SP, 8*4 + 1 * 8);
        M_DST(REG_FRESULT, REG_SP, 8*4 + 2 * 8);
-#endif
-
-       disp = dseg_add_address(cd, m);
-       M_ALD(rd->argintregs[0], REG_PV, disp);
 
-#if SIZEOF_VOID_P == 8
-       M_MOV(REG_RESULT, rd->argintregs[1]);
-       M_DMOV(REG_FRESULT, rd->argfltregs[2]);
-       M_FMOV(REG_FRESULT, rd->argfltregs[3]);
-#else
        switch (md->returntype.type) {
        case TYPE_LNG:
-# if WORDS_BIGENDIAN == 1
-               M_MOV(REG_RESULT, rd->argintregs[2]);
-               M_MOV(REG_RESULT2, rd->argintregs[3]);
-# else
-               M_MOV(REG_RESULT2, rd->argintregs[2]);
-               M_MOV(REG_RESULT, rd->argintregs[3]);
-# endif
+               M_LNGMOVE(REG_RESULT_PACKED, REG_A0_A1_PACKED);
                break;
+
        default:
 # if WORDS_BIGENDIAN == 1
-               M_MOV(REG_ZERO, rd->argintregs[2]);
-               M_MOV(REG_RESULT, rd->argintregs[3]);
+               M_MOV(REG_ZERO, REG_A0);
+               M_MOV(REG_RESULT, REG_A1);
 # else
-               M_MOV(REG_RESULT, rd->argintregs[2]);
-               M_MOV(REG_ZERO, rd->argintregs[3]);
+               M_MOV(REG_RESULT, REG_A0);
+               M_MOV(REG_ZERO, REG_A1);
 # endif
        }
 
        M_DST(REG_FRESULT, REG_SP, 4*4);
        M_FST(REG_FRESULT, REG_SP, 4*4 + 2 * 4);
+
+       disp = dseg_add_address(cd, m);
+       M_ALD(REG_ITMP1, REG_PV, disp);
 #endif
 
-       disp = dseg_add_functionptr(cd, builtin_displaymethodstop);
+       disp = dseg_add_functionptr(cd, builtin_verbosecall_exit);
        M_ALD(REG_ITMP3, REG_PV, disp);
        M_JSR(REG_RA, REG_ITMP3);
        M_NOP;
@@ -1074,13 +1072,13 @@ void emit_verbosecall_exit(jitdata *jd)
        M_LLD(REG_RESULT, REG_SP, 1 * 8);
 
        M_ALD(REG_RA, REG_SP, 0 * 8);
-       M_LDA(REG_SP, REG_SP, 4 * 8);
+       M_AADD_IMM(REG_SP, 4 * 8, REG_SP);
 #else
        M_DLD(REG_FRESULT, REG_SP, 8*4 + 2 * 8);
        M_LLD(REG_RESULT_PACKED, REG_SP, 8*4 + 1 * 8);
 
        M_ALD(REG_RA, REG_SP, 8*4 + 0 * 8);
-       M_LDA(REG_SP, REG_SP, 8*4 + 4 * 8);
+       M_AADD_IMM(REG_SP, 8*4 + 4 * 8, REG_SP);
 #endif
 
        /* mark trace code */
index 349b05ee9533f356a1332e56757869d0889a4d16..3380eb7c4536b7a237b79e6cd838299f3a42533f 100644 (file)
@@ -1,6 +1,6 @@
 ## src/vm/jit/mips/irix/Makefile.am
 ##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
 ## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
 ## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
 ## J. Wenninger, Institut f. Computersprachen - TU Wien
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 ##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
+## $Id: Makefile.am 7316 2007-02-10 19:06:54Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
 LIBS =
 
 noinst_HEADERS =
 
-noinst_LTLIBRARIES = libmd.la
+noinst_LTLIBRARIES = \
+       libmd.la
 
 libmd_la_SOURCES = \
        md-os.c
index e6974c3a84c4b4dd11509f7f78919df3596fa167..881c5803249a136fbb5a610793eb6b122dd74d91 100644 (file)
@@ -1,6 +1,6 @@
 ## src/vm/jit/mips/linux/Makefile.am
 ##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
 ## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
 ## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
 ## J. Wenninger, Institut f. Computersprachen - TU Wien
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 ##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
+## $Id: Makefile.am 7316 2007-02-10 19:06:54Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
 LIBS =
 
 noinst_HEADERS =
 
-noinst_LTLIBRARIES = libmd.la
+noinst_LTLIBRARIES = \
+       libmd.la
 
 libmd_la_SOURCES = \
        md-os.c
index 0c190e2ea639bdac73c64eadca63713637d3022e..b97c9a5695f3070f556cb7750721fce01c593b92 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/mips/md-abi.h - defines for MIPS ABI
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
    J. Wenninger, Institut f. Computersprachen - TU Wien
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   Changes: Christian Ullrich
-
-   $Id: md-abi.h 7206 2007-01-11 22:39:52Z twisti $
+   $Id: md-abi.h 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
 
 #if SIZEOF_VOID_P == 4
 # if WORDS_BIGENDIAN == 1
-#  define REG_ITMP12_PACKED    PACK_REGS(REG_ITMP2, REG_ITMP1)
-#  define REG_ITMP23_PACKED    PACK_REGS(REG_ITMP3, REG_ITMP2)
 #  define REG_RESULT_PACKED    PACK_REGS(REG_RESULT2, REG_RESULT)
-# else
-#  define REG_ITMP12_PACKED    PACK_REGS(REG_ITMP1, REG_ITMP2)
-#  define REG_ITMP23_PACKED    PACK_REGS(REG_ITMP2, REG_ITMP3)
-#  define REG_RESULT_PACKED    PACK_REGS(REG_RESULT, REG_RESULT2)
-# endif
-#endif
 
+#  define REG_A0_A1_PACKED     PACK_REGS(REG_A1, REG_A0)
 
-/* ABI defines ****************************************************************/
-
-#if SIZEOF_VOID_P == 8
-# define PA_SIZE    0                   /* we don't have a parameter area     */
-#else
-# define PA_SIZE    4 * 4               /* parameter area is max. 4 * 4 bytes */
-#endif
-
-
-/* packed register defines ****************************************************/
-
-#if SIZEOF_VOID_P == 4
-# if WORDS_BIGENDIAN == 1
 #  define REG_ITMP12_PACKED    PACK_REGS(REG_ITMP2, REG_ITMP1)
 #  define REG_ITMP23_PACKED    PACK_REGS(REG_ITMP3, REG_ITMP2)
-#  define REG_RESULT_PACKED    PACK_REGS(REG_RESULT2, REG_RESULT)
 # else
+#  define REG_RESULT_PACKED    PACK_REGS(REG_RESULT, REG_RESULT2)
+
+#  define REG_A0_A1_PACKED     PACK_REGS(REG_A0, REG_A1)
+
 #  define REG_ITMP12_PACKED    PACK_REGS(REG_ITMP1, REG_ITMP2)
 #  define REG_ITMP23_PACKED    PACK_REGS(REG_ITMP2, REG_ITMP3)
-#  define REG_RESULT_PACKED    PACK_REGS(REG_RESULT, REG_RESULT2)
 # endif
 #endif
 
index 86b57d782e367a603249a6a7e59975e7097935e4..62ad7f1abe899cf3a81a3827e5896862cba91129 100644 (file)
@@ -759,7 +759,7 @@ void emit_verbosecall_enter(jitdata *jd)
 #else
        M_AST(REG_ITMP1, REG_SP, LA_SIZE + 4 * 8);
 #endif
-       p = dseg_add_functionptr(cd, builtin_trace_args);
+       p = dseg_add_functionptr(cd, builtin_verbosecall_enter);
        M_ALD(REG_ITMP2, REG_PV, p);
        M_MTCTR(REG_ITMP2);
        M_JSR;
@@ -810,6 +810,8 @@ void emit_verbosecall_enter(jitdata *jd)
 
    Generates the code for the call trace.
 
+   void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
+
 *******************************************************************************/
 
 void emit_verbosecall_exit(jitdata *jd)
@@ -849,33 +851,22 @@ void emit_verbosecall_exit(jitdata *jd)
        switch (md->returntype.type) {
        case TYPE_INT:
        case TYPE_ADR:
-#if defined(__DARWIN__)
-               M_MOV(REG_RESULT, rd->argintregs[2]);
-               M_CLR(rd->argintregs[1]);
-#else
-               M_MOV(REG_RESULT, rd->argintregs[3]);
-               M_CLR(rd->argintregs[2]);
-#endif
+               M_INTMOVE(REG_RESULT, REG_A1);
+               M_CLR(REG_A0);
                break;
 
        case TYPE_LNG:
-#if defined(__DARWIN__)
-               M_MOV(REG_RESULT2, rd->argintregs[2]);
-               M_MOV(REG_RESULT, rd->argintregs[1]);
-#else
-               M_MOV(REG_RESULT2, rd->argintregs[3]);
-               M_MOV(REG_RESULT, rd->argintregs[2]);
-#endif
+               M_LNGMOVE(REG_RESULT_PACKED, REG_A0_A1_PACKED);
                break;
        }
 
-       M_FLTMOVE(REG_FRESULT, rd->argfltregs[0]);
-       M_FLTMOVE(REG_FRESULT, rd->argfltregs[1]);
+       M_FLTMOVE(REG_FRESULT, REG_FA0);
+       M_FLTMOVE(REG_FRESULT, REG_FA1);
 
        disp = dseg_add_address(cd, m);
-       M_ALD(rd->argintregs[0], REG_PV, disp);
+       M_ALD(REG_A2, REG_PV, disp);
 
-       disp = dseg_add_functionptr(cd, builtin_displaymethodstop);
+       disp = dseg_add_functionptr(cd, builtin_verbosecall_exit);
        M_ALD(REG_ITMP2, REG_PV, disp);
        M_MTCTR(REG_ITMP2);
        M_JSR;
index 1b306953965db97254e33ec8ef80f8d8953f42ce..7feedca2795a952fe52fef592fa256dcf27a0e37 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: md-abi.h 5382 2006-09-06 21:17:00Z twisti $
+   $Id: md-abi.h 7316 2007-02-10 19:06:54Z twisti $
 
 */
 
@@ -70,6 +70,9 @@
 
 #define REG_IFTMP       16   /* temporary integer and floating point register */
 
+#define REG_FA0          1   /* define some argument registers                */
+#define REG_FA1          2
+
 
 #define INT_REG_CNT     32   /* number of integer registers                   */
 #define INT_SAV_CNT     10   /* number of int callee saved registers          */
 
 /* packed register defines ****************************************************/
 
+#define REG_RESULT_PACKED    PACK_REGS(REG_RESULT2, REG_RESULT)
+
+#define REG_A0_A1_PACKED     PACK_REGS(REG_A1, REG_A0)
+
 #define REG_ITMP12_PACKED    PACK_REGS(REG_ITMP2, REG_ITMP1)
 #define REG_ITMP23_PACKED    PACK_REGS(REG_ITMP3, REG_ITMP2)
-#define REG_RESULT_PACKED    PACK_REGS(REG_RESULT2, REG_RESULT)
 
 
 /* ABI defines ****************************************************************/