small corrections for verbosecall
authorcacao <none@none>
Tue, 10 Nov 1998 10:52:59 +0000 (10:52 +0000)
committercacao <none@none>
Tue, 10 Nov 1998 10:52:59 +0000 (10:52 +0000)
alpha/ngen.c
jit.c
jit/parse.c
src/vm/jit/parse.c

index db61e1996a983b6b78ab3e2b2771d50af489a2ba..6c5670eebd20c3fa7b052f0392e8b853dcf16b8c 100644 (file)
@@ -426,14 +426,23 @@ static void gen_mcode()
        */
 
        if (runverbose && isleafmethod) {
-               M_LDA (REG_SP, REG_SP, -(8*8));
+               M_LDA (REG_SP, REG_SP, -(14*8));
                M_AST(REG_RA, REG_SP, 1*8);
-               M_LST(argintregs[0], REG_SP, 2*8);
-               M_LST(argintregs[1], REG_SP, 3*8);
-               M_LST(argintregs[2], REG_SP, 4*8);
-               M_LST(argintregs[3], REG_SP, 5*8);
-               M_LST(argintregs[4], REG_SP, 6*8);
-               M_LST(argintregs[5], REG_SP, 7*8);
+
+               M_LST(argintregs[0], REG_SP,  2*8);
+               M_LST(argintregs[1], REG_SP,  3*8);
+               M_LST(argintregs[2], REG_SP,  4*8);
+               M_LST(argintregs[3], REG_SP,  5*8);
+               M_LST(argintregs[4], REG_SP,  6*8);
+               M_LST(argintregs[5], REG_SP,  7*8);
+
+               M_DST(argfltregs[0], REG_SP,  8*8);
+               M_DST(argfltregs[1], REG_SP,  9*8);
+               M_DST(argfltregs[2], REG_SP, 10*8);
+               M_DST(argfltregs[3], REG_SP, 11*8);
+               M_DST(argfltregs[4], REG_SP, 12*8);
+               M_DST(argfltregs[5], REG_SP, 13*8);
+
                p = dseg_addaddress (method);
                M_ALD(REG_ITMP1, REG_PV, p);
                M_AST(REG_ITMP1, REG_SP, REG);
@@ -442,13 +451,22 @@ static void gen_mcode()
                M_JSR(REG_RA, REG_PV);
                M_LDA(REG_PV, REG_RA, -(int)((u1*) mcodeptr - mcodebase));
                M_ALD(REG_RA, REG_SP, 1*8);
-               M_LLD(argintregs[0], REG_SP, 2*8);
-               M_LLD(argintregs[1], REG_SP, 3*8);
-               M_LLD(argintregs[2], REG_SP, 4*8);
-               M_LLD(argintregs[3], REG_SP, 5*8);
-               M_LLD(argintregs[4], REG_SP, 6*8);
-               M_LLD(argintregs[5], REG_SP, 7*8);
-               M_LDA (REG_SP, REG_SP, 8*8);
+
+               M_LLD(argintregs[0], REG_SP,  2*8);
+               M_LLD(argintregs[1], REG_SP,  3*8);
+               M_LLD(argintregs[2], REG_SP,  4*8);
+               M_LLD(argintregs[3], REG_SP,  5*8);
+               M_LLD(argintregs[4], REG_SP,  6*8);
+               M_LLD(argintregs[5], REG_SP,  7*8);
+
+               M_DLD(argfltregs[0], REG_SP,  8*8);
+               M_DLD(argfltregs[1], REG_SP,  9*8);
+               M_DLD(argfltregs[2], REG_SP, 10*8);
+               M_DLD(argfltregs[3], REG_SP, 11*8);
+               M_DLD(argfltregs[4], REG_SP, 12*8);
+               M_DLD(argfltregs[5], REG_SP, 13*8);
+
+               M_LDA (REG_SP, REG_SP, 14*8);
                }
 
        /* take arguments out of register or stack frame */
diff --git a/jit.c b/jit.c
index 2d42e9d27642c39ae087a9957984764cc8d4c665..76501880e435eac7373b860298fb5109b6897886 100644 (file)
--- a/jit.c
+++ b/jit.c
@@ -276,9 +276,6 @@ methodptr jit_compile(methodinfo *m)
        local_init();
        mcode_init();
 
-       if (runverbose)
-               allocate_literals();
-
        parse();
 
        analyse_stack();
index 269db0625f92bdc06814606e60038bfee9db8f38..ea00cfae13b90e365ca43754783acb36e9c3d37c 100644 (file)
 
 /* macros for byte code fetching ***********************************************
 
-       fetch a byte code of given size from position pos
+       fetch a byte code of given size from position p in code array jcode
 
 *******************************************************************************/
 
-#define code_get_u1(pos)    jcode[pos]
-#define code_get_s1(pos)    ((s1)jcode[pos])
-#define code_get_u2(pos)    ((((u2)jcode[pos])<<8)+jcode[pos+1])
-#define code_get_s2(pos)    ((s2)((((u2)jcode[pos])<<8)+jcode[pos+1]))
-#define code_get_u4(pos)    ((((u4)jcode[pos])<<24)+(((u4)jcode[pos+1])<<16)+\
-                             (((u4)jcode[pos+2])<<8)+jcode[pos+3])
-#define code_get_s4(pos)    ((s4)((((u4)jcode[pos])<<24)+(((u4)jcode[pos+1])<<16)+\
-                             (((u4)jcode[pos+2])<<8)+jcode[pos+3]))
+#define code_get_u1(p)  jcode[p]
+#define code_get_s1(p)  ((s1)jcode[p])
+#define code_get_u2(p)  ((((u2)jcode[p])<<8)+jcode[p+1])
+#define code_get_s2(p)  ((s2)((((u2)jcode[p])<<8)+jcode[p+1]))
+#define code_get_u4(p)  ((((u4)jcode[p])<<24)+(((u4)jcode[p+1])<<16)\
+                           +(((u4)jcode[p+2])<<8)+jcode[p+3])
+#define code_get_s4(p)  ((s4)((((u4)jcode[p])<<24)+(((u4)jcode[p+1])<<16)\
+                           +(((u4)jcode[p+2])<<8)+jcode[p+3]))
 
 
 /* functionc compiler_addinitclass *********************************************
@@ -156,10 +156,13 @@ static void descriptor2types (methodinfo *m)
 }
 
 
+#ifdef OLD_COMPILER
+
 /* function allocate_literals **************************************************
 
-       Scans the JavaVM code of a method and allocates string literals. Needed
-       to generate the same addresses as the old JIT compiler.
+       Scans the JavaVM code of a method and allocates string literals (in the
+       same order as the old JIT). Needed to generate the same addresses as the
+       old JIT compiler.
        
 *******************************************************************************/
 
@@ -211,7 +214,7 @@ static void allocate_literals()
                        } /* end switch */
                } /* end while */
 }
-
+#endif
 
 
 /*******************************************************************************
@@ -265,11 +268,18 @@ static void parse()
        int  ipc = 0;               /* intermediate instruction counter           */
        int  b_count = 0;           /* basic block counter                        */
        int  s_count = 0;           /* stack element counter                      */
-       bool blockend = false;      /* true if basic block end has reached        */
+       bool blockend = false;      /* true if basic block end has been reached   */
        bool iswide = false;        /* true if last instruction was a wide        */
        instruction *iptr;          /* current pointer into instruction array     */
 
 
+#ifdef OLD_COMPILER
+       /* generate the same addresses as the old JIT compiler */
+
+       if (runverbose)
+               allocate_literals();
+#endif
+
        /* allocate instruction array and block index table */
        
        /* 1 additional for end ipc and 3 for loop unrolling */
@@ -311,10 +321,6 @@ static void parse()
 
        s_count = 1 + exceptiontablelength; /* initialize stack element counter   */
 
-       if (runverbose) {
-/*             isleafmethod=false; */
-               }
-
 #ifdef USE_THREADS
        if (checksync && (method->flags & ACC_SYNCHRONIZED)) {
                isleafmethod=false;
index 269db0625f92bdc06814606e60038bfee9db8f38..ea00cfae13b90e365ca43754783acb36e9c3d37c 100644 (file)
 
 /* macros for byte code fetching ***********************************************
 
-       fetch a byte code of given size from position pos
+       fetch a byte code of given size from position p in code array jcode
 
 *******************************************************************************/
 
-#define code_get_u1(pos)    jcode[pos]
-#define code_get_s1(pos)    ((s1)jcode[pos])
-#define code_get_u2(pos)    ((((u2)jcode[pos])<<8)+jcode[pos+1])
-#define code_get_s2(pos)    ((s2)((((u2)jcode[pos])<<8)+jcode[pos+1]))
-#define code_get_u4(pos)    ((((u4)jcode[pos])<<24)+(((u4)jcode[pos+1])<<16)+\
-                             (((u4)jcode[pos+2])<<8)+jcode[pos+3])
-#define code_get_s4(pos)    ((s4)((((u4)jcode[pos])<<24)+(((u4)jcode[pos+1])<<16)+\
-                             (((u4)jcode[pos+2])<<8)+jcode[pos+3]))
+#define code_get_u1(p)  jcode[p]
+#define code_get_s1(p)  ((s1)jcode[p])
+#define code_get_u2(p)  ((((u2)jcode[p])<<8)+jcode[p+1])
+#define code_get_s2(p)  ((s2)((((u2)jcode[p])<<8)+jcode[p+1]))
+#define code_get_u4(p)  ((((u4)jcode[p])<<24)+(((u4)jcode[p+1])<<16)\
+                           +(((u4)jcode[p+2])<<8)+jcode[p+3])
+#define code_get_s4(p)  ((s4)((((u4)jcode[p])<<24)+(((u4)jcode[p+1])<<16)\
+                           +(((u4)jcode[p+2])<<8)+jcode[p+3]))
 
 
 /* functionc compiler_addinitclass *********************************************
@@ -156,10 +156,13 @@ static void descriptor2types (methodinfo *m)
 }
 
 
+#ifdef OLD_COMPILER
+
 /* function allocate_literals **************************************************
 
-       Scans the JavaVM code of a method and allocates string literals. Needed
-       to generate the same addresses as the old JIT compiler.
+       Scans the JavaVM code of a method and allocates string literals (in the
+       same order as the old JIT). Needed to generate the same addresses as the
+       old JIT compiler.
        
 *******************************************************************************/
 
@@ -211,7 +214,7 @@ static void allocate_literals()
                        } /* end switch */
                } /* end while */
 }
-
+#endif
 
 
 /*******************************************************************************
@@ -265,11 +268,18 @@ static void parse()
        int  ipc = 0;               /* intermediate instruction counter           */
        int  b_count = 0;           /* basic block counter                        */
        int  s_count = 0;           /* stack element counter                      */
-       bool blockend = false;      /* true if basic block end has reached        */
+       bool blockend = false;      /* true if basic block end has been reached   */
        bool iswide = false;        /* true if last instruction was a wide        */
        instruction *iptr;          /* current pointer into instruction array     */
 
 
+#ifdef OLD_COMPILER
+       /* generate the same addresses as the old JIT compiler */
+
+       if (runverbose)
+               allocate_literals();
+#endif
+
        /* allocate instruction array and block index table */
        
        /* 1 additional for end ipc and 3 for loop unrolling */
@@ -311,10 +321,6 @@ static void parse()
 
        s_count = 1 + exceptiontablelength; /* initialize stack element counter   */
 
-       if (runverbose) {
-/*             isleafmethod=false; */
-               }
-
 #ifdef USE_THREADS
        if (checksync && (method->flags & ACC_SYNCHRONIZED)) {
                isleafmethod=false;