295 }
296 return NULL;
297 }
298
299 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
300 // Exception handler checks the nmethod's implicit null checks table
301 // only when this method returns false.
302 #ifdef _LP64
303 if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
304 assert (Universe::heap() != NULL, "java heap should be initialized");
305 // The first page after heap_base is unmapped and
306 // the 'offset' is equal to [heap_base + offset] for
307 // narrow oop implicit null checks.
308 uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
309 if ((uintptr_t)offset >= base) {
310 // Normalize offset for the next check.
311 offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
312 }
313 }
314 #endif
315 return offset < 0 || os::vm_page_size() <= offset;
316 }
|
295 }
296 return NULL;
297 }
298
299 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
300 // Exception handler checks the nmethod's implicit null checks table
301 // only when this method returns false.
302 #ifdef _LP64
303 if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
304 assert (Universe::heap() != NULL, "java heap should be initialized");
305 // The first page after heap_base is unmapped and
306 // the 'offset' is equal to [heap_base + offset] for
307 // narrow oop implicit null checks.
308 uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
309 if ((uintptr_t)offset >= base) {
310 // Normalize offset for the next check.
311 offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
312 }
313 }
314 #endif
315 return (offset < 0 && ((!UseShenandoahGC) || offset != -8)) || os::vm_page_size() <= offset;
316 }
|