harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r594866 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
Date Wed, 14 Nov 2007 13:13:43 GMT
Author: varlax
Date: Wed Nov 14 05:13:36 2007
New Revision: 594866

URL: http://svn.apache.org/viewvc?rev=594866&view=rev
Log:
Applied HARMONY-5035 [drlvm][jit][JET] Parameters are passed incorrectly to rt_helper_ti_field_modification
stub

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp?rev=594866&r1=594865&r2=594866&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp Wed Nov 14 05:13:36 2007
@@ -123,6 +123,18 @@
     //JVMTI helper takes field handle, method handle, byte code location, pointer
     //to reference for fields or NULL for statics, pointer to field value
 
+#ifndef _EM64T_
+    // Workaround since do_mov do not put jlong on stack in gen_args on ia32
+    const CallSig cs_ti_fmodif(CCONV_HELPERS, jobj, jobj, i32, i32, jobj, jobj);
+    Val vlocation((jlong)m_pc);
+    Val vlocationHi((jlong)0);
+#else
+    const CallSig cs_ti_fmodif(CCONV_HELPERS, jobj, jobj, i64, jobj, jobj);
+    Val vlocation((jlong)m_pc);
+#endif
+
+    rlock(cs_ti_fmodif);
+
     AR fieldValBaseAr = valloc(jobj);
     Val fieldValPtr = Val(jobj, fieldValBaseAr);
     rlock(fieldValPtr);
@@ -141,17 +153,6 @@
         Opnd stackTop(jobj, m_base, voff(m_stack.unused()));
         lea(fieldValPtr.as_opnd(), stackTop);
     }
-    runlock(fieldValPtr);
-
-#ifndef _EM64T_
-    // Workaround since do_mov do not put jlong on stack in gen_args on ia32
-    const CallSig cs_ti_fmodif(CCONV_HELPERS, jobj, jobj, i32, i32, jobj, jobj);
-    Val vlocation((jlong)m_pc);
-    Val vlocationHi((jlong)0);
-#else
-    const CallSig cs_ti_fmodif(CCONV_HELPERS, jobj, jobj, i64, jobj, jobj);
-    Val vlocation((jlong)m_pc);
-#endif
 
     Val vfield(jobj, fld);
     Val vmeth(jobj, m_method);
@@ -173,9 +174,10 @@
     gen_gc_stack(-1, true);
 
     // 3. Call VM
-    rlock(cs_ti_fmodif);
     AR gr = valloc(jobj);
     call( is_set(DBG_CHECK_STACK), gr, rt_helper_ti_field_modification, cs_ti_fmodif, cs_ti_fmodif.count());
+
+    runlock(fieldValPtr);
     runlock(cs_ti_fmodif);
     
     //Restore operand stack state and scratch registers



Mime
View raw message