Index: trunk/vm/jitrino/src/jet/cg_meth.cpp =================================================================== --- trunk/vm/jitrino/src/jet/cg_meth.cpp (revision 596570) +++ trunk/vm/jitrino/src/jet/cg_meth.cpp (working copy) @@ -150,13 +150,13 @@ #ifdef _DEBUG // Fill the whole stack frame with a special value // -1 to avoid erasing retAddr - int num_words = frameSize/sizeof(int) - 1; - AR ar = valloc(i32); - Opnd fill(i32, ar); + int num_words = frameSize/STACK_SLOT_SIZE- 1; + AR ar = valloc(iplatf); + Opnd fill(iplatf, ar); rlock(ar); - AR ridx = valloc(i32); + AR ridx = valloc(iplatf); runlock(ar); - Opnd idx(i32, ridx); + Opnd idx(iplatf, ridx); // // When filling up the frame, the regs context is destroyed - preserve // it. @@ -165,10 +165,14 @@ push(idx); } // +#ifdef _EM64T_ + mov(fill, (unsigned long)0xDEADBEEFDEADBEEF); +#else mov(fill, 0xDEADBEEF); +#endif mov(idx, num_words); unsigned _loop = ipoff(); - mov(Opnd(i32, sp, 0, ridx, 4), fill); + mov(Opnd(iplatf, sp, 0, ridx, STACK_SLOT_SIZE), fill); alu(alu_sub, idx, 1); unsigned br_off = br(nz, 0, 0); patch(br_off, ip(_loop)); @@ -230,8 +234,7 @@ // // reload input args into local vars // - - // an initial GC map for local variables which are copied from inputs + ::std::vector locals_map; locals_map.resize(words(m_ci.count())); // an initial GC map for input args @@ -278,28 +281,24 @@ // .. callee-saved GP regs or .. regs_map |= 1<~copy thizh\n");} } // If the local resides on the input arg, then no need to copy it - // from input arg into the frame. - if (vis_arg(local)) { + // from input arg into the frame except JVMTI mode. + if (vis_arg(local) && !g_jvmtiMode) { if (is_wide(jt)) { ++local; } @@ -374,6 +373,7 @@ // // For other local variables, zero the GC map // + unsigned locals_gc_size = words(m_infoBlock.get_num_locals()); if (locals_gc_size != locals_map.size()) { if (is_set(DBG_TRACE_CG)) {dbg(";;>locals.gc_map\n");} @@ -383,6 +383,7 @@ st4(reg.reg(), m_base, voff(m_stack.info_gc_locals()+i*sizeof(int))); } } + // // Store the GC map for input args // Index: trunk/vm/jitrino/src/jet/cg_regs.cpp =================================================================== --- trunk/vm/jitrino/src/jet/cg_regs.cpp (revision 596570) +++ trunk/vm/jitrino/src/jet/cg_regs.cpp (working copy) @@ -527,12 +527,6 @@ bool CodeGen::vis_arg(unsigned local_idx) const { - // Under JVMTI - never use input args as locals. Doing this keeps us - // away from problems with rt_{get|set}_local_var which does not handle - // input args. - if (g_jvmtiMode) { - return false; - } if (local_idx >= m_argSlots)return false; int argid = m_argids[local_idx]; if(argid == -1) return false; Index: trunk/vm/jitrino/src/jet/compiler.cpp =================================================================== --- trunk/vm/jitrino/src/jet/compiler.cpp (revision 596570) +++ trunk/vm/jitrino/src/jet/compiler.cpp (working copy) @@ -719,10 +719,6 @@ if (g_jvmtiMode) { // Do not allocate regs. Only ensure the m_base will be saved. m_global_rusage.set(ar_idx(m_base)); - // Make sure all method args get reloaded into local vars - for (unsigned i=0; i