hotspot/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp
changeset 823 9a5271881bc0
parent 670 ddf3e9583f2f
equal deleted inserted replaced
817:cd8b8f500fac 823:9a5271881bc0
    63    if (thread != rax) {
    63    if (thread != rax) {
    64        movq(thread, rax);
    64        movq(thread, rax);
    65        popq(rax);
    65        popq(rax);
    66    }
    66    }
    67 }
    67 }
    68 
       
    69 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
       
    70   // Exception handler checks the nmethod's implicit null checks table
       
    71   // only when this method returns false.
       
    72   if (UseCompressedOops) {
       
    73     // The first page after heap_base is unmapped and
       
    74     // the 'offset' is equal to [heap_base + offset] for
       
    75     // narrow oop implicit null checks.
       
    76     uintptr_t heap_base = (uintptr_t)Universe::heap_base();
       
    77     if ((uintptr_t)offset >= heap_base) {
       
    78       // Normalize offset for the next check.
       
    79       offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
       
    80     }
       
    81   }
       
    82   // Linux kernel guarantees that the first page is always unmapped. Don't
       
    83   // assume anything more than that.
       
    84   bool offset_in_first_page =   0 <= offset  &&  offset < os::vm_page_size();
       
    85   return !offset_in_first_page;
       
    86 }