You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/03/09 16:27:23 UTC

svn commit: r516432 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/object_handles.h src/jit/compile.cpp src/object/object_handles.cpp

Author: gshimansky
Date: Fri Mar  9 07:27:22 2007
New Revision: 516432

URL: http://svn.apache.org/viewvc?view=rev&rev=516432
Log:
Applied HARMONY-3344 [drlvm][winx64] LIL uses 32-bit unsigned instead of POINTER_SIZE_INT


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_handles.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_handles.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_handles.h?view=diff&rev=516432&r1=516431&r2=516432
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_handles.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_handles.h Fri Mar  9 07:27:22 2007
@@ -207,7 +207,7 @@
 
 // Calculate the offset of the base of a previously allocated structure to a particular handle
 // The base variable (see oh_gen_allocate_handles) plus this offset is the value to use for the handle
-unsigned oh_get_handle_offset(unsigned handle_indx);
+POINTER_SIZE_INT oh_get_handle_offset(unsigned handle_indx);
 
 // Initialise a handle in a previously allocated structure
 //   base_var    - LIL variable that points to the base of the handles structure

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp?view=diff&rev=516432&r1=516431&r2=516432
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp Fri Mar  9 07:27:22 2007
@@ -338,7 +338,9 @@
                             "l1=ts;"
                             "ld o0,[l1 + %1i:pint];"
                             "o1=l0+%2i;",
-                            method, APR_OFFSETOF(VM_thread, jni_env), oh_get_handle_offset(0));
+                            method,
+                            (POINTER_SIZE_INT)APR_OFFSETOF(VM_thread, jni_env),
+                            oh_get_handle_offset(0));
     assert(cs);
 
     // Loop over arguments proper, setting rest of outputs
@@ -346,7 +348,7 @@
     hn = 1;
     for(i=(is_static?0:1); i<num_args; i++) {
         if (is_reference(method_args_get_type_info(msh, i))) {
-            unsigned handle_offset = oh_get_handle_offset(hn);
+            POINTER_SIZE_INT handle_offset = oh_get_handle_offset(hn);
             if (VM_Global_State::loader_env->compress_references) {
                 cs = lil_parse_onto_end(cs,
                                         "jc i%0i=%1i:ref,%n;"
@@ -414,8 +416,8 @@
     assert(cs);
 
     // Exception offsets
-    unsigned eoo = (unsigned)(POINTER_SIZE_INT)&((VM_thread*)0)->thread_exception.exc_object;
-    unsigned eco = (unsigned)(POINTER_SIZE_INT)&((VM_thread*)0)->thread_exception.exc_class;
+    POINTER_SIZE_INT eoo = (POINTER_SIZE_INT)&((VM_thread*)0)->thread_exception.exc_object;
+    POINTER_SIZE_INT eco = (POINTER_SIZE_INT)&((VM_thread*)0)->thread_exception.exc_class;
 
     //***** Call JVMTI MethodExit
     if (ti->isEnabled() &&

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp?view=diff&rev=516432&r1=516431&r2=516432
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp Fri Mar  9 07:27:22 2007
@@ -524,23 +524,24 @@
     return cs;
 }
 
-unsigned oh_get_handle_offset(unsigned handle_indx)
+POINTER_SIZE_INT oh_get_handle_offset(unsigned handle_indx)
 {
-    const unsigned refs_off = (unsigned)(POINTER_SIZE_INT)&((ObjectHandlesNew*)0)->refs;
+    const POINTER_SIZE_INT refs_off = (POINTER_SIZE_INT)&((ObjectHandlesNew*)0)->refs;
     return refs_off+handle_indx*sizeof(ManagedObject*);
 }
 
 LilCodeStub* oh_gen_init_handle(LilCodeStub* cs, char* base_var, unsigned handle_indx, char* val, bool null_check)
 {
     char buf[200];
-    unsigned offset = oh_get_handle_offset(handle_indx);
+    POINTER_SIZE_INT offset = oh_get_handle_offset(handle_indx);
     if (null_check && VM_Global_State::loader_env->compress_references) {
         sprintf(buf,
-                "jc %s=%p:ref,%%n; st [%s+%d:ref],%s; j %%o; :%%g; st [%s+%d:ref],0; :%%g;",
-                val, VM_Global_State::loader_env->heap_base, base_var, offset,
+                "jc %s=0x%"PI_FMT"X:ref,%%n; st [%s+%"PI_FMT"d:ref],%s; j %%o; :%%g; st [%s+%"PI_FMT"d:ref],0; :%%g;",
+                val, (POINTER_SIZE_INT)VM_Global_State::loader_env->heap_base,
+                base_var, offset,
                 val, base_var, offset);
     } else {
-        sprintf(buf, "st [%s+%d:ref],%s;", base_var, offset, val);
+        sprintf(buf, "st [%s+%"PI_FMT"d:ref],%s;", base_var, offset, val);
     }
     cs = lil_parse_onto_end(cs, buf);
     return cs;