< prev index next >

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Print this page

 28 #include "c1/c1_Runtime1.hpp"
 29 #include "gc/shared/collectedHeap.hpp"
 30 #include "gc/shared/tlab_globals.hpp"
 31 #include "interpreter/interpreter.hpp"
 32 #include "oops/arrayOop.hpp"
 33 #include "oops/markWord.hpp"
 34 #include "runtime/basicLock.hpp"
 35 #include "runtime/os.hpp"
 36 #include "runtime/sharedRuntime.hpp"
 37 #include "runtime/stubRoutines.hpp"
 38 #include "utilities/align.hpp"
 39 #include "utilities/macros.hpp"
 40 #include "utilities/powerOfTwo.hpp"
 41 
 42 
 43 void C1_MacroAssembler::explicit_null_check(Register base) {
 44   Unimplemented();
 45 }
 46 
 47 
 48 void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_bytes) {



 49   const Register return_pc = R20;
 50   mflr(return_pc);
 51 
 52   // Make sure there is enough stack space for this method's activation.
 53   assert(bang_size_in_bytes >= frame_size_in_bytes, "stack bang size incorrect");
 54   generate_stack_overflow_check(bang_size_in_bytes);
 55 
 56   std(return_pc, _abi0(lr), R1_SP);     // SP->lr = return_pc
 57   push_frame(frame_size_in_bytes, R0); // SP -= frame_size_in_bytes
 58 
 59   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 60   bs->nmethod_entry_barrier(this, R20);
 61 }
 62 
 63 
 64 void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
 65   if (breakAtEntry) illtrap();
 66   // build frame
 67 }
 68 

315   Label not_null;
316   cmpdi(CR0, r, 0);
317   bne(CR0, not_null);
318   stop("non-null oop required");
319   bind(not_null);
320   verify_oop(r, FILE_AND_LINE);
321 }
322 
323 #endif // PRODUCT
324 
325 void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
326   if (TrapBasedNullChecks) { // SIGTRAP based
327     trap_null_check(r);
328   } else { // explicit
329     //const address exception_entry = Runtime1::entry_for(StubId::c1_throw_null_pointer_exception_id);
330     assert(Lnull != nullptr, "must have Label for explicit check");
331     cmpdi(CR0, r, 0);
332     bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), *Lnull);
333   }
334 }






 28 #include "c1/c1_Runtime1.hpp"
 29 #include "gc/shared/collectedHeap.hpp"
 30 #include "gc/shared/tlab_globals.hpp"
 31 #include "interpreter/interpreter.hpp"
 32 #include "oops/arrayOop.hpp"
 33 #include "oops/markWord.hpp"
 34 #include "runtime/basicLock.hpp"
 35 #include "runtime/os.hpp"
 36 #include "runtime/sharedRuntime.hpp"
 37 #include "runtime/stubRoutines.hpp"
 38 #include "utilities/align.hpp"
 39 #include "utilities/macros.hpp"
 40 #include "utilities/powerOfTwo.hpp"
 41 
 42 
 43 void C1_MacroAssembler::explicit_null_check(Register base) {
 44   Unimplemented();
 45 }
 46 
 47 
 48 void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_bytes,
 49                                     int sp_offset_for_orig_pc,
 50                                     bool needs_stack_repair, bool has_scalarized_args,
 51                                     Label* verified_inline_entry_label) {
 52   const Register return_pc = R20;
 53   mflr(return_pc);
 54 
 55   // Make sure there is enough stack space for this method's activation.
 56   assert(bang_size_in_bytes >= frame_size_in_bytes, "stack bang size incorrect");
 57   generate_stack_overflow_check(bang_size_in_bytes);
 58 
 59   std(return_pc, _abi0(lr), R1_SP);     // SP->lr = return_pc
 60   push_frame(frame_size_in_bytes, R0); // SP -= frame_size_in_bytes
 61 
 62   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 63   bs->nmethod_entry_barrier(this, R20);
 64 }
 65 
 66 
 67 void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
 68   if (breakAtEntry) illtrap();
 69   // build frame
 70 }
 71 

318   Label not_null;
319   cmpdi(CR0, r, 0);
320   bne(CR0, not_null);
321   stop("non-null oop required");
322   bind(not_null);
323   verify_oop(r, FILE_AND_LINE);
324 }
325 
326 #endif // PRODUCT
327 
328 void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
329   if (TrapBasedNullChecks) { // SIGTRAP based
330     trap_null_check(r);
331   } else { // explicit
332     //const address exception_entry = Runtime1::entry_for(StubId::c1_throw_null_pointer_exception_id);
333     assert(Lnull != nullptr, "must have Label for explicit check");
334     cmpdi(CR0, r, 0);
335     bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), *Lnull);
336   }
337 }
338 
339 int C1_MacroAssembler::scalarized_entry(const CompiledEntrySignature* ces, int frame_size_in_bytes, int bang_size_in_bytes, int sp_offset_for_orig_pc, Label& verified_inline_entry_label, bool is_inline_ro_entry) {
340   Unimplemented();
341 }
342 
< prev index next >