src/cpu/sparc/vm/sharedRuntime_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Fri Jul 15 18:49:41 2011
--- new/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Fri Jul 15 18:49:41 2011
*** 598,608 ****
--- 598,608 ----
// Patch the callers callsite with entry to compiled code if it exists.
void AdapterGenerator::patch_callers_callsite() {
Label L;
__ ld_ptr(G5_method, in_bytes(methodOopDesc::code_offset()), G3_scratch);
! __ br_null(G3_scratch, false, __ pt, L);
! __ br_null(G3_scratch, false, Assembler::pt, L);
// Schedule the branch target address early.
__ delayed()->ld_ptr(G5_method, in_bytes(methodOopDesc::interpreter_entry_offset()), G3_scratch);
// Call into the VM to patch the caller, then jump to compiled callee
__ save_frame(4); // Args in compiled layout; do not blow them
*** 1125,1136 ****
--- 1125,1135 ----
__ save_frame(0);
__ mov(G0, L0);
Label loop;
__ bind(loop);
__ sub(L0, 1, L0);
! __ br_null(L0, false, Assembler::pt, loop);
__ delayed()->nop();
! __ br_null_short(L0, Assembler::pt, loop);
__ restore();
}
*** 1200,1210 ****
--- 1199,1209 ----
// Method might have been compiled since the call site was patched to
// interpreted if that is the case treat it as a miss so we can get
// the call site corrected.
__ ld_ptr(G5_method, in_bytes(methodOopDesc::code_offset()), G3_scratch);
__ bind(ok2);
! __ br_null(G3_scratch, false, __ pt, skip_fixup);
! __ br_null(G3_scratch, false, Assembler::pt, skip_fixup);
__ delayed()->ld_ptr(G5_method, in_bytes(methodOopDesc::interpreter_entry_offset()), G3_scratch);
__ jump_to(ic_miss, G3_scratch);
__ delayed()->nop();
}
*** 1777,1789 ****
--- 1776,1786 ----
Label L;
const Register temp_reg = G3_scratch;
AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
__ verify_oop(O0);
__ load_klass(O0, temp_reg);
! __ cmp_and_brx_short(temp_reg, G5_inline_cache_reg, Assembler::equal, Assembler::pt, L);
__ brx(Assembler::equal, true, Assembler::pt, L);
__ delayed()->nop();
__ jump_to(ic_miss, temp_reg);
__ delayed()->nop();
__ align(CodeEntryAlignment);
__ bind(L);
*** 2180,2191 ****
--- 2177,2187 ----
__ reset_last_Java_frame();
#ifdef ASSERT
{ Label L;
__ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0);
! __ br_null(O0, false, Assembler::pt, L);
__ delayed()->nop();
! __ br_null_short(O0, Assembler::pt, L);
__ stop("no pending exception allowed on exit from IR::monitorenter");
__ bind(L);
}
#endif
__ bind(done);
*** 2296,2308 ****
--- 2292,2302 ----
Label L;
Address suspend_state(G2_thread, JavaThread::suspend_flags_offset());
__ br(Assembler::notEqual, false, Assembler::pn, L);
__ delayed()->ld(suspend_state, G3_scratch);
! __ cmp_and_br_short(G3_scratch, 0, Assembler::equal, Assembler::pt, no_block);
__ br(Assembler::equal, false, Assembler::pt, no_block);
__ delayed()->nop();
__ bind(L);
// Block. Save any potential method result value before the operation and
// use a leaf call to leave the last_Java_frame setup undisturbed. Doing this
// lets us share the oopMap we used when we went native rather the create
*** 2326,2338 ****
--- 2320,2330 ----
__ st(G3_scratch, G2_thread, JavaThread::thread_state_offset());
Label no_reguard;
__ ld(G2_thread, JavaThread::stack_guard_state_offset(), G3_scratch);
! __ cmp_and_br_short(G3_scratch, JavaThread::stack_guard_yellow_disabled, Assembler::notEqual, Assembler::pt, no_reguard);
__ br(Assembler::notEqual, false, Assembler::pt, no_reguard);
__ delayed()->nop();
save_native_result(masm, ret_type, stack_slots);
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages));
__ delayed()->nop();
*** 2380,2391 ****
--- 2372,2382 ----
__ restore_thread(L7_thread_cache); // restore G2_thread
#ifdef ASSERT
{ Label L;
__ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0);
! __ br_null(O0, false, Assembler::pt, L);
__ delayed()->nop();
! __ br_null_short(O0, Assembler::pt, L);
__ stop("no pending exception allowed on exit from IR::monitorexit");
__ bind(L);
}
#endif
restore_native_result(masm, ret_type, stack_slots);
*** 2637,2649 ****
--- 2628,2638 ----
Label L;
const Register temp_reg = G3_scratch;
AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
__ verify_oop(O0);
__ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), temp_reg);
! __ cmp_and_brx_short(temp_reg, G5_inline_cache_reg, Assembler::equal, Assembler::pt, L);
__ brx(Assembler::equal, true, Assembler::pt, L);
__ delayed()->nop();
__ jump_to(ic_miss, temp_reg);
__ delayed()->nop();
__ align(CodeEntryAlignment);
__ bind(L);
*** 3141,3152 ****
--- 3130,3140 ----
// allocate a new frame, filling the registers
gen_new_frame(masm, deopt); // allocate an interpreter frame
! __ tst(O4array_size);
__ br(Assembler::notZero, false, Assembler::pn, loop);
! __ cmp_zero_and_br(Assembler::notZero, O4array_size, loop);
__ delayed()->add(O3array, wordSize, O3array);
__ ld_ptr(G3pcs, 0, O7); // load final frame new pc
}
*** 3219,3229 ****
--- 3207,3217 ----
// On entry we have been called by the deoptimized nmethod with a call that
// replaced the original call (or safepoint polling location) so the deoptimizing
// pc is now in O7. Return values are still in the expected places
map = RegisterSaver::save_live_registers(masm, 0, &frame_size_words);
- __ ba(false, cont);
__ delayed()->mov(Deoptimization::Unpack_deopt, L0deopt_mode);
int exception_offset = __ offset() - start;
// restore G2, the trampoline destroyed it
*** 3254,3280 ****
--- 3242,3266 ----
#ifdef ASSERT
{
// verify that there is really an exception oop in exception_oop
Label has_exception;
__ ld_ptr(G2_thread, JavaThread::exception_oop_offset(), Oexception);
! __ br_notnull(Oexception, false, Assembler::pt, has_exception);
__ delayed()-> nop();
! __ br_notnull_short(Oexception, Assembler::pt, has_exception);
__ stop("no exception in thread");
__ bind(has_exception);
// verify that there is no pending exception
Label no_pending_exception;
Address exception_addr(G2_thread, Thread::pending_exception_offset());
__ ld_ptr(exception_addr, Oexception);
! __ br_null(Oexception, false, Assembler::pt, no_pending_exception);
__ delayed()->nop();
! __ br_null_short(Oexception, Assembler::pt, no_pending_exception);
__ stop("must not have pending exception here");
__ bind(no_pending_exception);
}
#endif
- __ ba(false, cont);
__ delayed()->mov(Deoptimization::Unpack_exception, L0deopt_mode);;
//
// Reexecute entry, similar to c2 uncommon trap
//
*** 3311,3323 ****
--- 3297,3307 ----
__ mov(O0, O2UnrollBlock->after_save());
RegisterSaver::restore_result_registers(masm);
Label noException;
! __ cmp(G4deopt_mode, Deoptimization::Unpack_exception); // Was exception pending?
__ br(Assembler::notEqual, false, Assembler::pt, noException);
__ delayed()->nop();
! __ cmp_and_br_short(G4deopt_mode, Deoptimization::Unpack_exception, Assembler::notEqual, Assembler::pt, noException);
// Move the pending exception from exception_oop to Oexception so
// the pending exception will be picked up the interpreter.
__ ld_ptr(G2_thread, in_bytes(JavaThread::exception_oop_offset()), Oexception);
__ st_ptr(G0, G2_thread, in_bytes(JavaThread::exception_oop_offset()));
*** 3357,3369 ****
--- 3341,3351 ----
#if !defined(_LP64) && defined(COMPILER2)
// In 32 bit, C2 returns longs in G1 so restore the saved G1 into
// I0/I1 if the return value is long.
Label not_long;
! __ cmp_and_br_short(O0,T_LONG, Assembler::notEqual, Assembler::pt, not_long);
__ br(Assembler::notEqual, false, Assembler::pt, not_long);
__ delayed()->nop();
__ ldd(saved_Greturn1_addr,I0);
__ bind(not_long);
#endif
__ ret();
__ delayed()->restore();
*** 3532,3544 ****
--- 3514,3524 ----
// Check for exceptions
Label pending;
__ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O1);
! __ tst(O1);
__ brx(Assembler::notEqual, true, Assembler::pn, pending);
__ delayed()->nop();
! __ br_notnull_short(O1, Assembler::pn, pending);
RegisterSaver::restore_live_registers(masm);
// We are back the the original state on entry and ready to go.
*** 3621,3633 ****
--- 3601,3611 ----
// Check for exceptions
Label pending;
__ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O1);
! __ tst(O1);
__ brx(Assembler::notEqual, true, Assembler::pn, pending);
__ delayed()->nop();
! __ br_notnull_short(O1, Assembler::pn, pending);
// get the returned methodOop
__ get_vm_result(G5_method);
__ stx(G5_method, SP, RegisterSaver::G5_offset()+STACK_BIAS);
src/cpu/sparc/vm/sharedRuntime_sparc.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File