harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r598998 - in /harmony/enhanced/drlvm/trunk/vm: jitrino/src/jet/cg_meth.cpp jitrino/src/jet/cg_regs.cpp jitrino/src/jet/compiler.cpp vmcore/src/jvmti/jvmti_capability.cpp
Date Wed, 28 Nov 2007 13:40:57 GMT
Author: varlax
Date: Wed Nov 28 05:40:57 2007
New Revision: 598998

URL: http://svn.apache.org/viewvc?rev=598998&view=rev
Log:
Applied HARMONY-5063 [drlvm][jit][encoder] Assertion in encoder

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_capability.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp?rev=598998&r1=598997&r2=598998&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp Wed Nov 28 05:40:57 2007
@@ -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<unsigned> 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<<ar_idx(m_ra[local]);
             }
-            else if (vis_arg(local) || storeWholeContext) {
+            else if (vis_arg(local)) {
                 // .. local vars that are kept on the input slots or
                 // when we need to keep input args valid during enumeration
                 // (for example for JVMTI PopFrame needs) ...
-                assert(m_ci.reg(i) == ar_x || storeWholeContext);
-                assert(0 == m_ci.off(i)%STACK_SLOT_SIZE);
-                int inVal = m_ci.off(i)/STACK_SLOT_SIZE;
-                // TODO: With storeWholeContext it only works with
-                // stack-based parameters. On Intel64 with register-based
-                // calling convention, need to track the registers that are
-                // spilled separately from spill area (see above how the
-                // storeWholeContext is processed).
+                assert(m_ci.reg(i) == ar_x);
+                assert(0 == (m_ci.off(i) % STACK_SLOT_SIZE));
+                int inVal = m_ci.off(i) / STACK_SLOT_SIZE;
                 args_map[word_no(inVal)] =
                             args_map[word_no(inVal)] | (1 <<bit_no(inVal));
-                if (storeWholeContext) {
+                if (g_jvmtiMode) {
                     // .. a 'regular' GC map for locals - must report
-                    // together with input args in case of storeWholeContext
+                    // together with input args in case of JVMTI
                     locals_map[word_no(local)] =
                                 locals_map[word_no(local)] | (1 <<bit_no(local));
                 }
             }
             else {
+                assert(m_ci.reg(i) != ar_x);
                 // .. a 'regular' GC map for locals.
                 locals_map[word_no(local)] = 
                             locals_map[word_no(local)] | (1 <<bit_no(local));
@@ -319,8 +318,8 @@
             if (is_set(DBG_TRACE_CG)) {dbg(";;>~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
     //

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp?rev=598998&r1=598997&r2=598998&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp Wed Nov 28 05:40:57 2007
@@ -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;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?rev=598998&r1=598997&r2=598998&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Wed Nov 28 05:40:57 2007
@@ -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<m_argids.size(); i++) {
-            m_argids[i] = -1;
-        }
         return;
     }
     const unsigned vars = m_infoBlock.get_num_locals();

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_capability.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_capability.cpp?rev=598998&r1=598997&r2=598998&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_capability.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_capability.cpp Wed Nov 28 05:40:57
2007
@@ -79,7 +79,7 @@
     1, // can_get_owned_monitor_info
     1, // can_get_current_contended_monitor
     1, // can_get_monitor_info
-    0, // can_pop_frame
+    1, // can_pop_frame
     0, // can_redefine_classes
     1, // can_signal_thread
     1, // can_get_source_file_name



Mime
View raw message