old ARGVAR handling in stack.c eliminated
authorchristian <none@none>
Tue, 5 Apr 2005 15:42:57 +0000 (15:42 +0000)
committerchristian <none@none>
Tue, 5 Apr 2005 15:42:57 +0000 (15:42 +0000)
src/vm/jit/jit.c
src/vm/jit/reg.h
src/vm/jit/reg.inc

index 5d10b7ed7f369de678e44da222e2574e1029a5e9..f190cfac33f54ca521ef4ea04cf22c533f66d15e 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Edwin Steiner
             Christian Thalinger
 
-   $Id: jit.c 2211 2005-04-04 10:39:36Z christian $
+   $Id: jit.c 2219 2005-04-05 15:42:57Z christian $
 
 */
 
@@ -1428,10 +1428,8 @@ static functionptr jit_compile_intern(methodinfo *m, codegendata *cd,
                optimize_loops(m, cd, ld);
        }
    
-#ifndef INVOKE_NEW
 #ifdef SPECIALMEMUSE
-       preregpass(m, rd);
-#endif
+/*     preregpass(m, rd); */
 #endif
 
        if (compileverbose)
index 51884ee3ce1410f4359457942906ecb520495e7a..c8cf4f725654f3c2c710384a559e37d661e37839 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: reg.h 2211 2005-04-04 10:39:36Z christian $
+   $Id: reg.h 2219 2005-04-05 15:42:57Z christian $
 
 */
 
@@ -34,8 +34,7 @@
 #ifndef _REG_H
 #define _REG_H
 
-/* #define INVOKE_NEW */
-/* #define INVOKE_NEW_DEBUG */
+#define INVOKE_NEW_DEBUG
 
 /* preliminary define for testing of the new creation of ARGVAR Stackslots in stack.c */
 /* Changes affect handling of ARGVAR Stackslots in reg_of_var in codegen.inc          */
@@ -115,6 +114,9 @@ struct registerdata {
        int maxsavadrreguse;            /* max used saved address register count  */
        int freetmpadrtop;              /* free scratch address register count    */
        int freesavadrtop;              /* free saved address register count      */
+#if defined(USE_UNUSED_ARGUMENT_REGISTERS)
+       int ifargadrregcnt;             /* iface argument address register count     */
+#endif
 #endif
 
 #ifdef USETWOREGS
@@ -136,6 +138,10 @@ struct registerdata {
        int ifsavintregcnt;             /* iface saved integer register count     */
        int iftmpfltregcnt;             /* iface scratch float register count     */
        int ifsavfltregcnt;             /* iface saved float register count       */
+#if defined(USE_UNUSED_ARGUMENT_REGISTERS)
+       int ifargintregcnt;             /* iface argument float register count     */
+       int ifargfltregcnt;             /* iface argument float register count       */
+#endif
 
        int argintreguse;               /* used argument integer register count   */
        int tmpintreguse;               /* used scratch integer register count    */
index dc9b8c5f75afaabd2403b3cb5b91c53f88e28d44..639e5176f939c7c52f672b9c414e34f6715b777a 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Stefan Ring
             Christian Thalinger
 
-   $Id: reg.inc 2211 2005-04-04 10:39:36Z christian $
+   $Id: reg.inc 2219 2005-04-05 15:42:57Z christian $
 
 */
 
@@ -280,13 +280,11 @@ void reg_setup(methodinfo *m, registerdata *rd, t_inlining_globals *id)
                v[0][TYPE_ADR].type = -1;
                v[0][TYPE_ADR].flags = 0;
        }
-#ifdef INVOKE_NEW
 #ifdef SPECIALMEMUSE
        rd->ifmemuse = 6;
 #else
        rd->ifmemuse = 0; /* init to zero -> analyse_stack will set it to a higher value, if appropriate */
 #endif
-#endif
 }
 
 
@@ -344,27 +342,7 @@ static void interface_regalloc(methodinfo *m, codegendata *cd, registerdata *rd)
        /* allocate stack space for passing arguments to called methods */
 #ifdef INVOKE_NEW_DEBUG
        int temp;
-#endif
-
-#ifndef INVOKE_NEW
-#if !defined(SPECIALMEMUSE)
-       /* For this to work properly the integer argument register count must be  */
-       /* less or equal the float argument register count (e.g. x86_64).         */
-       /* (arch.h: INT_ARG_CNT <= FLT_ARG_CNT)                                   */
-       if (rd->arguments_num > INT_ARG_CNT) {
-               rd->ifmemuse = rd->arguments_num - INT_ARG_CNT;
 
-       } else {
-               rd->ifmemuse = 0;
-       }
-#endif
-#ifdef INVOKE_NEW_DEBUG
-       if (compileverbose) {
-               printf("ifmemuse by reg.inc: %3i,%3i\n",rd->ifmemuse, rd->maxmemuse);
-       }
-#endif
-#else /* ifndef INVOKE_NEW */
-#ifdef INVOKE_NEW_DEBUG
        if (compileverbose) {
                temp = rd->ifmemuse;
 #if !defined(SPECIALMEMUSE)
@@ -379,14 +357,13 @@ static void interface_regalloc(methodinfo *m, codegendata *cd, registerdata *rd)
                }
 #endif
                if (compileverbose) {
-                       printf("ifmemuse by reg.inc: %3i,%3i\n",rd->ifmemuse, rd->maxmemuse);
+                       printf("ifmemuse by reg.inc: %3i,%3i by stack.c: %3i\n",rd->ifmemuse, rd->maxmemuse,temp);
                        if (temp != rd->ifmemuse)
-                               printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n");
+                               printf("Warning: Difference in ifmemuse calculated the old way and the new way\n");
                }
                rd->ifmemuse = temp;
        }
 #endif
-#endif /* ifndef INVOKE_NEW */
 
        rd->iftmpintregcnt = rd->tmpintregcnt;
        rd->ifsavintregcnt = rd->savintregcnt;
@@ -837,8 +814,6 @@ static void local_regalloc(methodinfo *m, codegendata *cd, registerdata *rd)
        }
 }
 
-
-
 static void reg_init_temp(registerdata *rd)
 {
        rd->freememtop = 0;
@@ -862,12 +837,14 @@ static void reg_init_temp(registerdata *rd)
        rd->savadrreguse = rd->ifsavadrregcnt;
 #endif
 
+#if defined(USE_UNUSED_ARGUMENT_REGISTERS)
        /* all argument registers are available */
        rd->argintreguse = rd->intreg_argnum;
        rd->argfltreguse = rd->fltreg_argnum;
 #ifdef HAS_ADDRESS_REGISTER_FILE
        rd->argadrreguse = rd->adrreg_argnum;
 #endif
+#endif /*defined(USE_UNUSED_ARGUMENT_REGISTERS)*/
 }