Index: vm/vmcore/include/object_handles.h =================================================================== --- vm/vmcore/include/object_handles.h (revision 516327) +++ vm/vmcore/include/object_handles.h (working copy) @@ -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 Index: vm/vmcore/src/jit/compile.cpp =================================================================== --- vm/vmcore/src/jit/compile.cpp (revision 516327) +++ vm/vmcore/src/jit/compile.cpp (working copy) @@ -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); icompress_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() && Index: vm/vmcore/src/object/object_handles.cpp =================================================================== --- vm/vmcore/src/object/object_handles.cpp (revision 516327) +++ vm/vmcore/src/object/object_handles.cpp (working copy) @@ -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;