< 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 

329   Label not_null;
330   cmpdi(CR0, r, 0);
331   bne(CR0, not_null);
332   stop("non-null oop required");
333   bind(not_null);
334   verify_oop(r, FILE_AND_LINE);
335 }
336 
337 #endif // PRODUCT
338 
339 void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
340   if (TrapBasedNullChecks) { // SIGTRAP based
341     trap_null_check(r);
342   } else { // explicit
343     //const address exception_entry = Runtime1::entry_for(StubId::c1_throw_null_pointer_exception_id);
344     assert(Lnull != nullptr, "must have Label for explicit check");
345     cmpdi(CR0, r, 0);
346     bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), *Lnull);
347   }
348 }






 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 

332   Label not_null;
333   cmpdi(CR0, r, 0);
334   bne(CR0, not_null);
335   stop("non-null oop required");
336   bind(not_null);
337   verify_oop(r, FILE_AND_LINE);
338 }
339 
340 #endif // PRODUCT
341 
342 void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
343   if (TrapBasedNullChecks) { // SIGTRAP based
344     trap_null_check(r);
345   } else { // explicit
346     //const address exception_entry = Runtime1::entry_for(StubId::c1_throw_null_pointer_exception_id);
347     assert(Lnull != nullptr, "must have Label for explicit check");
348     cmpdi(CR0, r, 0);
349     bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), *Lnull);
350   }
351 }
352 
353 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) {
354   Unimplemented();
355 }
356 
< prev index next >