hotspot/src/share/vm/asm/assembler.cpp
changeset 823 9a5271881bc0
parent 1 489c9b5090e2
child 1217 5eb97f366a6a
child 1400 afd034bb8c2e
equal deleted inserted replaced
817:cd8b8f500fac 823:9a5271881bc0
   244   if (sect() == CodeBuffer::SECT_INSTS) {
   244   if (sect() == CodeBuffer::SECT_INSTS) {
   245     code_section()->outer()->block_comment(offset(), comment);
   245     code_section()->outer()->block_comment(offset(), comment);
   246   }
   246   }
   247 }
   247 }
   248 
   248 
       
   249 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
       
   250   // Exception handler checks the nmethod's implicit null checks table
       
   251   // only when this method returns false.
       
   252 #ifndef SPARC
       
   253   // Sparc does not have based addressing
       
   254   if (UseCompressedOops) {
       
   255     // The first page after heap_base is unmapped and
       
   256     // the 'offset' is equal to [heap_base + offset] for
       
   257     // narrow oop implicit null checks.
       
   258     uintptr_t heap_base = (uintptr_t)Universe::heap_base();
       
   259     if ((uintptr_t)offset >= heap_base) {
       
   260       // Normalize offset for the next check.
       
   261       offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
       
   262     }
       
   263   }
       
   264 #endif // SPARC
       
   265   return offset < 0 || os::vm_page_size() <= offset;
       
   266 }
   249 
   267 
   250 #ifndef PRODUCT
   268 #ifndef PRODUCT
   251 void Label::print_instructions(MacroAssembler* masm) const {
   269 void Label::print_instructions(MacroAssembler* masm) const {
   252   CodeBuffer* cb = masm->code();
   270   CodeBuffer* cb = masm->code();
   253   for (int i = 0; i < _patch_index; ++i) {
   271   for (int i = 0; i < _patch_index; ++i) {