Unified variables changes for common/i386.
[cacao.git] / src / vm / jit / replace.c
index 368a630ea91b463688778a88ff886b1bf2a06be0..060203db71d5ee67c3870b24cefaa52b7ab30105 100644 (file)
@@ -82,6 +82,7 @@
 
 bool replace_create_replacement_points(jitdata *jd)
 {
+#if 0
        codeinfo     *code;
        registerdata *rd;
        basicblock *bptr;
@@ -119,7 +120,8 @@ bool replace_create_replacement_points(jitdata *jd)
 
        count = 0;
        alloccount = 0;
-       for (bptr = m->basicblocks; bptr; bptr = bptr->next) {
+
+       for (bptr = jd->new_basicblocks; bptr; bptr = bptr->next) {
                if (!(bptr->bitflags & BBFLAG_REPLACEMENT))
                        continue;
 
@@ -197,7 +199,8 @@ bool replace_create_replacement_points(jitdata *jd)
        /* initialize replacement point structs */
 
        rp = rplpoints;
-       for (bptr = m->basicblocks; bptr; bptr = bptr->next) {
+
+       for (bptr = jd->new_basicblocks; bptr; bptr = bptr->next) {
                if (!(bptr->bitflags & BBFLAG_REPLACEMENT))
                        continue;
 
@@ -228,19 +231,19 @@ bool replace_create_replacement_points(jitdata *jd)
 
        /* store the data in the codeinfo */
 
-       code->rplpoints = rplpoints;
+       code->rplpoints     = rplpoints;
        code->rplpointcount = count;
-       code->regalloc = regalloc;
+       code->regalloc      = regalloc;
        code->regalloccount = alloccount;
-       code->globalcount = globalcount;
+       code->globalcount   = globalcount;
        code->savedintcount = INT_SAV_CNT - rd->savintreguse;
        code->savedfltcount = FLT_SAV_CNT - rd->savfltreguse;
-       code->memuse = rd->memuse;
-       code->isleafmethod = m->isleafmethod; /* XXX will be moved to codeinfo */
+       code->memuse        = rd->memuse;
 
        /* everything alright */
 
        return true;
+#endif
 }
 
 /* replace_free_replacement_points *********************************************
@@ -791,7 +794,7 @@ void replace_me(rplpoint *rp,executionstate *es)
 
        target = rp->target;
 
-       /* XXX DEBUG turn of self-replacement */
+       /* XXX DEBUG turn off self-replacement */
        if (target == rp)
                replace_deactivate_replacement_point(rp);
        
@@ -951,12 +954,14 @@ void replace_executionstate_println(executionstate *es,codeinfo *code)
        printf("\tpc = %p\n",(void*)es->pc);
        printf("\tsp = %p\n",(void*)es->sp);
        printf("\tpv = %p\n",(void*)es->pv);
+#if defined(ENABLE_DISASSEMBLER)
        for (i=0; i<INT_REG_CNT; ++i) {
                printf("\t%-3s = %016llx\n",regs[i],(unsigned long long)es->intregs[i]);
        }
        for (i=0; i<FLT_REG_CNT; ++i) {
                printf("\tfltregs[%2d] = %016llx\n",i,(unsigned long long)es->fltregs[i]);
        }
+#endif
 
 #ifdef HAS_4BYTE_STACKSLOT
        sp = (u4*) es->sp;
@@ -1031,7 +1036,9 @@ void replace_sourcestate_println(sourcestate *ss)
                while (nregdescint[--reg] != REG_SAV)
                        ;
                if (ss->savedintregs[i] != 0x00dead0000dead00ULL) {
+#if defined(ENABLE_DISASSEMBLER)
                        printf("\t%-3s = ",regs[reg]);
+#endif
                        printf("%016llx\n",(unsigned long long) ss->savedintregs[i]);
                }
        }