harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r517198 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src: jit/compile.cpp jit/jit_runtime_support.cpp jit/native_overrides.cpp util/em64t/base/jit_lock_rt_support_em64t.cpp
Date Mon, 12 Mar 2007 13:05:33 GMT
Author: gshimansky
Date: Mon Mar 12 06:05:32 2007
New Revision: 517198

URL: http://svn.apache.org/viewvc?view=rev&rev=517198
Log:
Applied HARMONY-3350 [drlvm][winx64] Fixed size of immediate parameters for lil_parse_onto_end()


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp

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=517198&r1=517197&r2=517198
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp Mon Mar 12 06:05:32 2007
@@ -253,7 +253,8 @@
 #endif
 
     // Push M2nFrame
-    cs = lil_parse_onto_end(cs, "push_m2n %0i, %1i, handles; locals 3;", method, FRAME_JNI);
+    cs = lil_parse_onto_end(cs, "push_m2n %0i, %1i, handles; locals 3;",
+                            method, (POINTER_SIZE_INT)FRAME_JNI);
     assert(cs);
 
     // Allocate space for handles
@@ -344,7 +345,7 @@
     assert(cs);
 
     // Loop over arguments proper, setting rest of outputs
-    unsigned arg_base = 1 + (is_static ? 1 : 0);
+    POINTER_SIZE_INT arg_base = 1 + (is_static ? 1 : 0);
     hn = 1;
     for(i=(is_static?0:1); i<num_args; i++) {
         if (is_reference(method_args_get_type_info(msh, i))) {
@@ -357,7 +358,8 @@
                                         ":%g;"
                                         "o%4i=0;"
                                         ":%g;",
-                                        i, VM_Global_State::loader_env->managed_null,
+                                        (POINTER_SIZE_INT)i,
+                                        VM_Global_State::loader_env->managed_null,
                                         arg_base+i, handle_offset, arg_base+i);
             } else {
                 cs = lil_parse_onto_end(cs,
@@ -367,12 +369,13 @@
                                         ":%g;"
                                         "o%3i=0;"
                                         ":%g;",
-                                        i, arg_base+i, handle_offset,
+                                        (POINTER_SIZE_INT)i,
+                                        arg_base+i, handle_offset,
                                         arg_base+i);
             }
             hn++;
         } else {
-            cs = lil_parse_onto_end(cs, "o%0i=i%1i;", arg_base+i, i);
+            cs = lil_parse_onto_end(cs, "o%0i=i%1i;", arg_base+i, (POINTER_SIZE_INT)i);
         }
         assert(cs);
     }
@@ -441,9 +444,9 @@
                                 ":_mex_exn_cont;"
                                 "call %5i;",
                                 (jmethodID)method,
-                                JNI_FALSE,
+                                (POINTER_SIZE_INT)JNI_FALSE,
                                 eoo, eco,
-                                JNI_TRUE,
+                                (POINTER_SIZE_INT)JNI_TRUE,
                                 jvmti_process_method_exit_event);
         assert(cs);
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?view=diff&rev=517198&r1=517197&r2=517198
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Mon Mar 12 06:05:32
2007
@@ -137,7 +137,7 @@
             "call %1i;"
             "pop_m2n;"
             "ret;",
-            FRAME_POPABLE,
+            (POINTER_SIZE_INT)FRAME_POPABLE,
             rth_multianewarrayhelper);
         assert(cs && lil_is_valid(cs));
         
@@ -208,7 +208,7 @@
             "call %1i;"
             "pop_m2n;"
             "ret;",
-            FRAME_POPABLE,
+            (POINTER_SIZE_INT)FRAME_POPABLE,
             p_instantiate_ref);
         assert(cs && lil_is_valid(cs));
         addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -276,8 +276,8 @@
                 vtable_off);            
             assert(cs);
             cs = lil_parse_onto_end(cs,
-                "ld l0,[l0+%1i:pint];"
-                "jc l0!=%2i,failed;",
+                "ld l0,[l0+%0i:pint];"
+                "jc l0!=%1i,failed;",
                 vtable_add+supertable_off+sizeof(Class*)*(type->get_depth()-1), type);
             do_slow = false;
             assert(cs);
@@ -296,7 +296,8 @@
         cs = lil_parse_onto_end(cs,
             "ld l0,[l0+%0i*l1+%1i:pint];"
             "jc l0!=i1,failed;",
-            sizeof(Class*), vtable_add+supertable_off-sizeof(Class*));  // -4/8 because we
want to index with depth-1
+            (POINTER_SIZE_INT)sizeof(Class*),
+            vtable_add+supertable_off-sizeof(Class*));  // -4/8 because we want to index
with depth-1
         assert(cs);
     }
 
@@ -757,7 +758,7 @@
             ":_exn_raised;"
             "out platform::void;"
             "call.noret %5i;",
-            p_is_inited, (FRAME_JNI | FRAME_POPABLE), p_init,
+            p_is_inited, (POINTER_SIZE_INT)(FRAME_JNI | FRAME_POPABLE), p_init,
             OFFSET(VM_thread, thread_exception.exc_object),
             OFFSET(VM_thread, thread_exception.exc_class),
             p_rethrow);
@@ -1598,7 +1599,7 @@
         "call %1i;"
         "pop_m2n;"
         "ret;",
-        (FRAME_POPABLE | FRAME_SAFE_POINT),
+        (POINTER_SIZE_INT)(FRAME_POPABLE | FRAME_SAFE_POINT),
         hythread_safe_point_ptr);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -1708,7 +1709,7 @@
         "call %1i;"
         "pop_m2n;"
         "ret;",
-        FRAME_POPABLE,
+        (POINTER_SIZE_INT)FRAME_POPABLE,
         (void*)&rth_resolve);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -1737,7 +1738,7 @@
         "call %1i;"
         "pop_m2n;"
         "ret;",
-        FRAME_POPABLE,
+        (POINTER_SIZE_INT)FRAME_POPABLE,
         jvmti_method_enter_callback_ptr);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -1768,7 +1769,7 @@
         "call %1i;"
         "pop_m2n;"
         "ret;",
-        FRAME_POPABLE,
+        (POINTER_SIZE_INT)FRAME_POPABLE,
         jvmti_method_exit_callback_ptr);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -1799,7 +1800,7 @@
             "call %1i;"
             "pop_m2n;"
             "ret;",
-            FRAME_POPABLE,
+            (POINTER_SIZE_INT)FRAME_POPABLE,
             jvmti_field_access_callback_ptr);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -1846,7 +1847,7 @@
             "call %1i;"
             "pop_m2n;"
             "ret;",
-            FRAME_POPABLE,
+            (POINTER_SIZE_INT)FRAME_POPABLE,
             jvmti_field_modification_callback_ptr);
     assert(cs && lil_is_valid(cs));
     addr = LilCodeGenerator::get_platform()->compile(cs);
@@ -2280,14 +2281,14 @@
         cs2 = lil_parse_onto_end
             (cs,
             "ld l0, [i0+%0i:g4],zx;",
-            /*OFFSET(ManagedObject, vt_offset)*/object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
     else
     {
         cs2 = lil_parse_onto_end
             (cs, 
             "ld l0, [i0+%0i:ref];",
-            /*OFFSET(ManagedObject, vt_raw)*/object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
 
     cs2 = lil_parse_onto_end
@@ -2341,14 +2342,14 @@
         cs2 = lil_parse_onto_end
             (cs,
             "ld l0, [i0+%0i:g4],zx;",
-            object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
     else
     {
         cs2 = lil_parse_onto_end
             (cs, 
             "ld l0, [i0+%0i:ref];",
-            object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
 
     cs2 = lil_parse_onto_end
@@ -2357,7 +2358,7 @@
          "ld l2, [l0 + %1i*l1 + %2i: pint];"
          "jc i1 != l2, failed;",
          Class::get_offset_of_depth(),
-         sizeof(Class*),
+         (POINTER_SIZE_INT)sizeof(Class*),
          OFFSET(VTable, superclasses) - sizeof(Class*) + (vm_vtable_pointers_are_compressed()
? vm_get_vtable_base() : 0)
          );
 
@@ -2497,14 +2498,14 @@
         cs = lil_parse_onto_end
             (cs,
             "ld l0, [i0+%0i:g4];",
-            object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
     else
     {
         cs = lil_parse_onto_end
             (cs,
             "ld l0, [i0+%0i:ref];",
-            object_get_vtable_offset());
+            (POINTER_SIZE_INT)object_get_vtable_offset());
     }
 
     cs = lil_parse_onto_end

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp?view=diff&rev=517198&r1=517197&r2=517198
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp Mon Mar 12 06:05:32
2007
@@ -124,11 +124,11 @@
         cs = lil_parse_onto_end(cs, "locals 4;");
 
         // Get Class_Handle from java.lang.Class object
-        cs = lil_parse_onto_end(cs, "ld l0,[i0+%0i:pint];", (int)env->vm_class_offset);
+        cs = lil_parse_onto_end(cs, "ld l0,[i0+%0i:pint];", (POINTER_SIZE_INT)env->vm_class_offset);
         
         // Determine if this class supports fast allocation
         size_t offset_is_fast_allocation_possible = env->Void_Class->get_offset_of_fast_allocation_flag();
-        cs = lil_parse_onto_end(cs, "ld l1,[l0+%0i:g1];", (int)offset_is_fast_allocation_possible);
+        cs = lil_parse_onto_end(cs, "ld l1,[l0+%0i:g1];", offset_is_fast_allocation_possible);
         cs = lil_parse_onto_end(cs, "jc l1=0,fallback;");
 
         // Class supports fast allocation, now use frontier allocation technique
@@ -140,8 +140,8 @@
 
         // Get frontier into r, limit into l2, instance size into l3
         cs = lil_parse_onto_end(cs, "l1=ts;");
-        cs = lil_parse_onto_end(cs, "ld r,[l1+%0i:ref];", current_offset);
-        cs = lil_parse_onto_end(cs, "ld l2,[l1+%0i:pint];", limit_offset);
+        cs = lil_parse_onto_end(cs, "ld r,[l1+%0i:ref];", (POINTER_SIZE_INT)current_offset);
+        cs = lil_parse_onto_end(cs, "ld l2,[l1+%0i:pint];", (POINTER_SIZE_INT)limit_offset);
         cs = lil_parse_onto_end(cs, "ld l3,[l0+%0i:g4];", offset_instance_data_size);
 
         // Compute new frontier
@@ -150,7 +150,7 @@
         cs = lil_parse_onto_end(cs, "jc l2<l3,fallback;");
 
         // Yes, store new frontier, initialize vtable
-        cs = lil_parse_onto_end(cs, "st [l1+%0i:pint],l3;", current_offset);
+        cs = lil_parse_onto_end(cs, "st [l1+%0i:pint],l3;", (POINTER_SIZE_INT)current_offset);
         cs = lil_parse_onto_end(cs, "ld l3,[l0+%0i:pint];", offset_allocation_handle);
         cs = lil_parse_onto_end(cs, "l2=r; st [l2+0:pint],l3;");
 
@@ -185,7 +185,7 @@
         "jc r!=%1i,bad;"
         "ret;"
         ":bad;",
-        p_array_copy, ACR_Okay);
+        p_array_copy, (POINTER_SIZE_INT)ACR_Okay);
     return cs;
 }
 
@@ -308,8 +308,9 @@
 LilCodeStub* nso_char_array_copy(LilCodeStub* cs, Method_Handle)
 {
     Global_Env *env = VM_Global_State::loader_env;
-    unsigned length_offset = vector_length_offset();
-    unsigned body_offset = vector_first_element_offset(VM_DATA_TYPE_CHAR);
+    POINTER_SIZE_INT length_offset = (POINTER_SIZE_INT)vector_length_offset();
+    POINTER_SIZE_INT body_offset =
+        (POINTER_SIZE_INT)vector_first_element_offset(VM_DATA_TYPE_CHAR);
     NativeCodePtr custom_stub = fast_array_copy();
 
     // Check all array copy error conditions and that both arrays are [C
@@ -337,8 +338,10 @@
         "jc l0:g4<l1,slowpath;",                   // dst offset + length <= dst length
         VM_Global_State::loader_env->managed_null,
         VM_Global_State::loader_env->managed_null,
-        object_get_vtable_offset(), class_get_vtable(env->ArrayOfChar_Class),
-        object_get_vtable_offset(), length_offset, length_offset);
+        (POINTER_SIZE_INT)object_get_vtable_offset(),
+        class_get_vtable(env->ArrayOfChar_Class),
+        (POINTER_SIZE_INT)object_get_vtable_offset(),
+        length_offset, length_offset);
     assert(cs);
 
     // At this point array copy will happen, now decide how to do it

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp?view=diff&rev=517198&r1=517197&r2=517198
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
Mon Mar 12 06:05:32 2007
@@ -67,7 +67,7 @@
             "pop_m2n;"
             "ret;",
             vm_monitor_try_enter,
-            TM_ERROR_NONE,
+            (POINTER_SIZE_INT)TM_ERROR_NONE,
             vm_monitor_enter);
     }
 }
@@ -199,7 +199,7 @@
             "call %1i;"
             "pop_m2n;"
             "ret;",
-            FRAME_NON_UNWINDABLE,
+            (POINTER_SIZE_INT)FRAME_NON_UNWINDABLE,
             vm_monitor_exit);
     } else {
         return lil_parse_onto_end(cs,
@@ -210,7 +210,7 @@
             "out managed::void;"
             "call.noret %2i;",
             vm_monitor_try_exit,
-            TM_ERROR_NONE,
+            (POINTER_SIZE_INT)TM_ERROR_NONE,
             lil_npc_to_fp(exn_get_rth_throw_illegal_monitor_state()));
     }
 }



Mime
View raw message