hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp
changeset 34173 01bb07d23a5b
parent 33198 b37ad9fbf681
child 34185 ee71c590a456
equal deleted inserted replaced
34172:19299c8b7c81 34173:01bb07d23a5b
  2800   // call `last_Java_frame()'. The value of the pc in the frame is not
  2800   // call `last_Java_frame()'. The value of the pc in the frame is not
  2801   // particularly important. It just needs to identify this blob.
  2801   // particularly important. It just needs to identify this blob.
  2802   __ set_last_Java_frame(R1_SP, noreg);
  2802   __ set_last_Java_frame(R1_SP, noreg);
  2803 
  2803 
  2804   // With EscapeAnalysis turned on, this call may safepoint!
  2804   // With EscapeAnalysis turned on, this call may safepoint!
  2805   __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info), R16_thread);
  2805   __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info), R16_thread, exec_mode_reg);
  2806   address calls_return_pc = __ last_calls_return_pc();
  2806   address calls_return_pc = __ last_calls_return_pc();
  2807   // Set an oopmap for the call site that describes all our saved registers.
  2807   // Set an oopmap for the call site that describes all our saved registers.
  2808   oop_maps->add_gc_map(calls_return_pc - start, map);
  2808   oop_maps->add_gc_map(calls_return_pc - start, map);
  2809 
  2809 
  2810   __ reset_last_Java_frame();
  2810   __ reset_last_Java_frame();
  2813 
  2813 
  2814   // Restore only the result registers that have been saved
  2814   // Restore only the result registers that have been saved
  2815   // by save_volatile_registers(...).
  2815   // by save_volatile_registers(...).
  2816   RegisterSaver::restore_result_registers(masm, first_frame_size_in_bytes);
  2816   RegisterSaver::restore_result_registers(masm, first_frame_size_in_bytes);
  2817 
  2817 
       
  2818   // reload the exec mode from the UnrollBlock (it might have changed)
       
  2819   __ lwz(exec_mode_reg, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), unroll_block_reg);
  2818   // In excp_deopt_mode, restore and clear exception oop which we
  2820   // In excp_deopt_mode, restore and clear exception oop which we
  2819   // stored in the thread during exception entry above. The exception
  2821   // stored in the thread during exception entry above. The exception
  2820   // oop will be the return value of this stub.
  2822   // oop will be the return value of this stub.
  2821   Label skip_restore_excp;
  2823   Label skip_restore_excp;
  2822   __ cmpdi(CCR0, exec_mode_reg, Deoptimization::Unpack_exception);
  2824   __ cmpdi(CCR0, exec_mode_reg, Deoptimization::Unpack_exception);
  2943   address gc_map_pc = __ get_PC_trash_LR(R11_scratch1);
  2945   address gc_map_pc = __ get_PC_trash_LR(R11_scratch1);
  2944 
  2946 
  2945   __ set_last_Java_frame(/*sp*/R1_SP, /*pc*/R11_scratch1);
  2947   __ set_last_Java_frame(/*sp*/R1_SP, /*pc*/R11_scratch1);
  2946 
  2948 
  2947   __ mr(klass_index_reg, R3);
  2949   __ mr(klass_index_reg, R3);
       
  2950   __ li(R5, Deoptimization::Unpack_exception);
  2948   __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap),
  2951   __ call_VM_leaf(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap),
  2949                   R16_thread, klass_index_reg);
  2952                   R16_thread, klass_index_reg, R5);
  2950 
  2953 
  2951   // Set an oopmap for the call site.
  2954   // Set an oopmap for the call site.
  2952   oop_maps->add_gc_map(gc_map_pc - start, map);
  2955   oop_maps->add_gc_map(gc_map_pc - start, map);
  2953 
  2956 
  2954   __ reset_last_Java_frame();
  2957   __ reset_last_Java_frame();
  2963 
  2966 
  2964   // Pop the uncommon_trap frame.
  2967   // Pop the uncommon_trap frame.
  2965   __ pop_frame();
  2968   __ pop_frame();
  2966 
  2969 
  2967   // stack: (caller_of_deoptee, ...).
  2970   // stack: (caller_of_deoptee, ...).
       
  2971 
       
  2972 #ifdef ASSERT
       
  2973   __ lwz(R22_tmp2, Deoptimization::UnrollBlock::unpack_kind_offset_in_bytes(), unroll_block_reg);
       
  2974   __ cmpdi(CCR0, R22_tmp2, (unsigned)Deoptimization::Unpack_uncommon_trap);
       
  2975   __ asm_assert_eq("SharedRuntime::generate_deopt_blob: expected Unpack_uncommon_trap", 0);
       
  2976 #endif
  2968 
  2977 
  2969   // Allocate new interpreter frame(s) and possibly a c2i adapter
  2978   // Allocate new interpreter frame(s) and possibly a c2i adapter
  2970   // frame.
  2979   // frame.
  2971   push_skeleton_frames(masm, false/*deopt*/,
  2980   push_skeleton_frames(masm, false/*deopt*/,
  2972                        unroll_block_reg,
  2981                        unroll_block_reg,