< prev index next >
src/cpu/sparc/vm/sharedRuntime_sparc.cpp
Print this page
@@ -3034,10 +3034,11 @@
__ sub(G0, 1, L1);
__ st(L1, G2_thread, in_bytes(JavaThread::pending_deoptimization_offset()));
__ mov((int32_t)Deoptimization::Unpack_reexecute, L0deopt_mode);
__ mov(G2_thread, O0);
+ __ mov(L0deopt_mode, O2);
__ call(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap));
__ delayed()->nop();
oop_maps->add_gc_map( __ offset()-start, map->deep_copy());
__ get_thread();
__ add(O7, 8, O7);
@@ -3119,10 +3120,11 @@
__ set_last_Java_frame(SP, noreg);
// do the call by hand so we can get the oopmap
__ mov(G2_thread, L7_thread_cache);
+ __ mov(L0deopt_mode, O1);
__ call(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info), relocInfo::runtime_call_type);
__ delayed()->mov(G2_thread, O0);
// Set an oopmap for the call site this describes all our saved volatile registers
@@ -3144,10 +3146,11 @@
__ mov(O0, O2UnrollBlock->after_save());
RegisterSaver::restore_result_registers(masm);
+ __ ld(O2UnrollBlock, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), G4deopt_mode);
Label noException;
__ 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.
@@ -3267,19 +3270,29 @@
// and call Deoptimization::uncommon_trap to pack the compiled frame into
// vframe array and return the UnrollBlock information
__ save_frame(0);
__ set_last_Java_frame(SP, noreg);
__ mov(I0, O2klass_index);
- __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap), G2_thread, O2klass_index);
+ __ mov(Deoptimization::Unpack_uncommon_trap, O3); // exec mode
+ __ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap), G2_thread, O2klass_index, O3);
__ reset_last_Java_frame();
__ mov(O0, O2UnrollBlock->after_save());
__ restore();
// deallocate the deoptimized frame taking care to preserve the return values
__ mov(O2UnrollBlock, O2UnrollBlock->after_save());
__ restore();
+#ifdef ASSERT
+ { Label L;
+ __ ld(O2UnrollBlock, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), O1);
+ __ cmp_and_br_short(O1, Deoptimization::Unpack_uncommon_trap, Assembler::equal, Assembler::pt, L);
+ __ stop("SharedRuntime::generate_deopt_blob: expected Unpack_uncommon_trap");
+ __ bind(L);
+ }
+#endif
+
// Allocate new interpreter frame(s) and possible c2i adapter frame
make_new_frames(masm, false);
// push a dummy "unpack_frame" taking care of float return values and
< prev index next >