< prev index next >

src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp

Print this page
rev 50535 : [mq]: rename_IN_ROOT


 312     }
 313   }
 314 }
 315 
 316 inline void MacroAssembler::null_check(Register a, int offset, Label *Lis_null) {
 317   if (!ImplicitNullChecks || needs_explicit_null_check(offset) || !os::zero_page_read_protected()) {
 318     if (TrapBasedNullChecks) {
 319       assert(UseSIGTRAP, "sanity");
 320       trap_null_check(a);
 321     } else if (Lis_null){
 322       Label ok;
 323       cmpdi(CCR0, a, 0);
 324       beq(CCR0, *Lis_null);
 325     }
 326   }
 327 }
 328 
 329 inline void MacroAssembler::access_store_at(BasicType type, DecoratorSet decorators,
 330                                             Register base, RegisterOrConstant ind_or_offs, Register val,
 331                                             Register tmp1, Register tmp2, Register tmp3, bool needs_frame) {
 332   assert((decorators & ~(AS_RAW | IN_HEAP | IN_HEAP_ARRAY | IN_ROOT | OOP_NOT_NULL |
 333                          ON_UNKNOWN_OOP_REF)) == 0, "unsupported decorator");
 334   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 335   bool as_raw = (decorators & AS_RAW) != 0;
 336   decorators = AccessInternal::decorator_fixup(decorators);
 337   if (as_raw) {
 338     bs->BarrierSetAssembler::store_at(this, decorators, type,
 339                                       base, ind_or_offs, val,
 340                                       tmp1, tmp2, tmp3, needs_frame);
 341   } else {
 342     bs->store_at(this, decorators, type,
 343                  base, ind_or_offs, val,
 344                  tmp1, tmp2, tmp3, needs_frame);
 345   }
 346 }
 347 
 348 inline void MacroAssembler::access_load_at(BasicType type, DecoratorSet decorators,
 349                                            Register base, RegisterOrConstant ind_or_offs, Register dst,
 350                                            Register tmp1, Register tmp2, bool needs_frame, Label *L_handle_null) {
 351   assert((decorators & ~(AS_RAW | IN_HEAP | IN_HEAP_ARRAY | IN_ROOT | OOP_NOT_NULL |
 352                          ON_PHANTOM_OOP_REF | ON_WEAK_OOP_REF)) == 0, "unsupported decorator");
 353   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 354   decorators = AccessInternal::decorator_fixup(decorators);
 355   bool as_raw = (decorators & AS_RAW) != 0;
 356   if (as_raw) {
 357     bs->BarrierSetAssembler::load_at(this, decorators, type,
 358                                      base, ind_or_offs, dst,
 359                                      tmp1, tmp2, needs_frame, L_handle_null);
 360   } else {
 361     bs->load_at(this, decorators, type,
 362                 base, ind_or_offs, dst,
 363                 tmp1, tmp2, needs_frame, L_handle_null);
 364   }
 365 }
 366 
 367 inline void MacroAssembler::load_heap_oop(Register d, RegisterOrConstant offs, Register s1,
 368                                           Register tmp1, Register tmp2,
 369                                           bool needs_frame, DecoratorSet decorators, Label *L_handle_null) {
 370   access_load_at(T_OBJECT, IN_HEAP | decorators, s1, offs, d, tmp1, tmp2, needs_frame, L_handle_null);
 371 }




 312     }
 313   }
 314 }
 315 
 316 inline void MacroAssembler::null_check(Register a, int offset, Label *Lis_null) {
 317   if (!ImplicitNullChecks || needs_explicit_null_check(offset) || !os::zero_page_read_protected()) {
 318     if (TrapBasedNullChecks) {
 319       assert(UseSIGTRAP, "sanity");
 320       trap_null_check(a);
 321     } else if (Lis_null){
 322       Label ok;
 323       cmpdi(CCR0, a, 0);
 324       beq(CCR0, *Lis_null);
 325     }
 326   }
 327 }
 328 
 329 inline void MacroAssembler::access_store_at(BasicType type, DecoratorSet decorators,
 330                                             Register base, RegisterOrConstant ind_or_offs, Register val,
 331                                             Register tmp1, Register tmp2, Register tmp3, bool needs_frame) {
 332   assert((decorators & ~(AS_RAW | IN_HEAP | IN_HEAP_ARRAY | IN_NATIVE | OOP_NOT_NULL |
 333                          ON_UNKNOWN_OOP_REF)) == 0, "unsupported decorator");
 334   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 335   bool as_raw = (decorators & AS_RAW) != 0;
 336   decorators = AccessInternal::decorator_fixup(decorators);
 337   if (as_raw) {
 338     bs->BarrierSetAssembler::store_at(this, decorators, type,
 339                                       base, ind_or_offs, val,
 340                                       tmp1, tmp2, tmp3, needs_frame);
 341   } else {
 342     bs->store_at(this, decorators, type,
 343                  base, ind_or_offs, val,
 344                  tmp1, tmp2, tmp3, needs_frame);
 345   }
 346 }
 347 
 348 inline void MacroAssembler::access_load_at(BasicType type, DecoratorSet decorators,
 349                                            Register base, RegisterOrConstant ind_or_offs, Register dst,
 350                                            Register tmp1, Register tmp2, bool needs_frame, Label *L_handle_null) {
 351   assert((decorators & ~(AS_RAW | IN_HEAP | IN_HEAP_ARRAY | IN_NATIVE | OOP_NOT_NULL |
 352                          ON_PHANTOM_OOP_REF | ON_WEAK_OOP_REF)) == 0, "unsupported decorator");
 353   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
 354   decorators = AccessInternal::decorator_fixup(decorators);
 355   bool as_raw = (decorators & AS_RAW) != 0;
 356   if (as_raw) {
 357     bs->BarrierSetAssembler::load_at(this, decorators, type,
 358                                      base, ind_or_offs, dst,
 359                                      tmp1, tmp2, needs_frame, L_handle_null);
 360   } else {
 361     bs->load_at(this, decorators, type,
 362                 base, ind_or_offs, dst,
 363                 tmp1, tmp2, needs_frame, L_handle_null);
 364   }
 365 }
 366 
 367 inline void MacroAssembler::load_heap_oop(Register d, RegisterOrConstant offs, Register s1,
 368                                           Register tmp1, Register tmp2,
 369                                           bool needs_frame, DecoratorSet decorators, Label *L_handle_null) {
 370   access_load_at(T_OBJECT, IN_HEAP | decorators, s1, offs, d, tmp1, tmp2, needs_frame, L_handle_null);
 371 }


< prev index next >