SUGGESTED FIX
The fix is to mirror the code on intel.
*** 1,7 ****
#ifdef USE_PRAGMA_IDENT_SRC
! #pragma ident "@(#)c1_LIRAssembler_sparc.cpp 1.181 05/07/21 12:50:29 JVM"
#endif
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
--- 1,7 ----
#ifdef USE_PRAGMA_IDENT_SRC
! #pragma ident "@(#)c1_LIRAssembler_sparc.cpp 1.182 05/08/10 22:02:08 JVM"
#endif
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
*** 222,256 ****
}
}
}
// Initialize monitors in the compiled activation.
// Note: interpreter uses BasicObjectLock for monitors while compiler1 uses BasicLock
! {
! assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
! int rounded_vm_local_words = ::round_to(frame::interpreter_frame_vm_local_words, WordsPerLong);
int monitor_offset = (locals_offset + BytesPerWord) + (BasicObjectLock::size() * BytesPerWord) * (number_of_locks - 1);
for (int i = 0; i < number_of_locks; i++) {
! Address compiled_monitor_lock_address = frame_map()->address_for_monitor_lock_index(number_of_locks - i - 1);
! Address compiled_monitor_object_address = frame_map()->address_for_monitor_object_index(number_of_locks - i - 1);
! Address interpreter_monitor_address = Address(OSR_buf, 0, monitor_offset - (i * BasicObjectLock::size() * BytesPerWord));
#ifdef ASSERT
// verify the interpreter's monitor has a non-null object
{
Label L;
! load(interpreter_monitor_address, O7, T_OBJECT, NULL, BasicObjectLock::obj_offset_in_bytes());
__ cmp(G0, O7);
__ br(Assembler::notEqual, false, Assembler::pt, L);
__ delayed()->nop();
__ stop("locked object is NULL");
__ bind(L);
}
#endif // ASSERT
// Copy the lock field into the compiled activation.
! load(interpreter_monitor_address, O7, T_ADDRESS, NULL, BasicObjectLock::lock_offset_in_bytes());
! store(O7, compiled_monitor_lock_address, T_ADDRESS, NULL);
! load(interpreter_monitor_address, O7, T_OBJECT, NULL, BasicObjectLock::obj_offset_in_bytes());
! store(O7, compiled_monitor_object_address, T_OBJECT, NULL);
}
}
// Pass the OSR buffer across the save if needed
--- 222,252 ----
}
}
}
// Initialize monitors in the compiled activation.
// Note: interpreter uses BasicObjectLock for monitors while compiler1 uses BasicLock
! { assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
int monitor_offset = (locals_offset + BytesPerWord) + (BasicObjectLock::size() * BytesPerWord) * (number_of_locks - 1);
for (int i = 0; i < number_of_locks; i++) {
! int slot_offset = monitor_offset - ((i * BasicObjectLock::size()) * BytesPerWord);
#ifdef ASSERT
// verify the interpreter's monitor has a non-null object
{
Label L;
! load(Address(OSR_buf, 0, slot_offset + BasicObjectLock::obj_offset_in_bytes()), O7, T_OBJECT, NULL);
__ cmp(G0, O7);
__ br(Assembler::notEqual, false, Assembler::pt, L);
__ delayed()->nop();
__ stop("locked object is NULL");
__ bind(L);
}
#endif // ASSERT
// Copy the lock field into the compiled activation.
! load(Address(OSR_buf, 0, slot_offset + BasicObjectLock::lock_offset_in_bytes()), O7, T_ADDRESS, NULL);
! store(O7, frame_map()->address_for_monitor_lock_index(i), T_ADDRESS, NULL);
! load(Address(OSR_buf, 0, slot_offset + BasicObjectLock::obj_offset_in_bytes()), O7, T_ADDRESS, NULL);
! store(O7, frame_map()->address_for_monitor_object_index(i), T_OBJECT, NULL);
}
}
// Pass the OSR buffer across the save if needed
|