< prev index next >
src/cpu/ppc/vm/sharedRuntime_ppc.cpp
Print this page
@@ -2800,11 +2800,11 @@
// call `last_Java_frame()'. The value of the pc in the frame is not
// particularly important. It just needs to identify this blob.
__ set_last_Java_frame(R1_SP, noreg);
// With EscapeAnalysis turned on, this call may safepoint!
- __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info), R16_thread);
+ __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info), R16_thread, exec_mode_reg);
address calls_return_pc = __ last_calls_return_pc();
// Set an oopmap for the call site that describes all our saved registers.
oop_maps->add_gc_map(calls_return_pc - start, map);
__ reset_last_Java_frame();
@@ -2813,10 +2813,12 @@
// Restore only the result registers that have been saved
// by save_volatile_registers(...).
RegisterSaver::restore_result_registers(masm, first_frame_size_in_bytes);
+ // reload the exec mode from the UnrollBlock (it might have changed)
+ __ lwz(exec_mode_reg, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), unroll_block_reg);
// In excp_deopt_mode, restore and clear exception oop which we
// stored in the thread during exception entry above. The exception
// oop will be the return value of this stub.
Label skip_restore_excp;
__ cmpdi(CCR0, exec_mode_reg, Deoptimization::Unpack_exception);
@@ -2943,12 +2945,13 @@
address gc_map_pc = __ get_PC_trash_LR(R11_scratch1);
__ set_last_Java_frame(/*sp*/R1_SP, /*pc*/R11_scratch1);
__ mr(klass_index_reg, R3);
+ __ li(R5, Deoptimization::Unpack_exception);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap),
- R16_thread, klass_index_reg);
+ R16_thread, klass_index_reg, R5);
// Set an oopmap for the call site.
oop_maps->add_gc_map(gc_map_pc - start, map);
__ reset_last_Java_frame();
@@ -2964,10 +2967,16 @@
// Pop the uncommon_trap frame.
__ pop_frame();
// stack: (caller_of_deoptee, ...).
+#ifdef ASSERT
+ __ lwz(R22_tmp2, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), unroll_block_reg);
+ __ cmpdi(CCR0, R22_tmp2, (unsigned)Deoptimization::Unpack_uncommon_trap);
+ __ asm_assert_eq("SharedRuntime::generate_deopt_blob: expected Unpack_uncommon_trap", 0);
+#endif
+
// Allocate new interpreter frame(s) and possibly a c2i adapter
// frame.
push_skeleton_frames(masm, false/*deopt*/,
unroll_block_reg,
R22_tmp2,
< prev index next >