< prev index next >

src/share/vm/asm/assembler.cpp

Print this page
rev 9436 : Import from Shenandoah tag aarch64-shenandoah-jdk8u121-b14-shenandoah-merge-2017-03-23


 302   // Exception handler checks the nmethod's implicit null checks table
 303   // only when this method returns false.
 304 #ifdef _LP64
 305   if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
 306     assert (Universe::heap() != NULL, "java heap should be initialized");
 307     // The first page after heap_base is unmapped and
 308     // the 'offset' is equal to [heap_base + offset] for
 309     // narrow oop implicit null checks.
 310     uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
 311     int adj = MIN2(0, UseShenandoahGC ? BrooksPointer::byte_offset() : 0);
 312     if ((uintptr_t)(offset - adj) >= base) {
 313       // Normalize offset for the next check.
 314       offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
 315     }
 316   }
 317 #endif
 318 
 319   if (UseShenandoahGC) {
 320 #ifdef AARCH64
 321     // AArch64 uses 48-bit addresses
 322     const unsigned long address_bits = 0xfffffffffffful;
 323 #elif defined(_LP64)
 324 #ifdef _WINDOWS
 325     const unsigned long long address_bits = 0xffffffffffffffffull;
 326 #else
 327     const unsigned long address_bits = 0xfffffffffffffffful;
 328 #endif // _WINDOWS
 329 #else
 330     // Shenandoah is not implemented on these platforms, make sure we build fine,
 331     // but also crash consistently at runtime.
 332     const unsigned long address_bits = 0;
 333     ShouldNotReachHere();
 334 #endif
 335     if ((offset & address_bits) == (BrooksPointer::byte_offset() & address_bits)) {
 336       return false;
 337     }
 338   }
 339 
 340   return offset < 0 || os::vm_page_size() <= offset;
 341 }


 302   // Exception handler checks the nmethod's implicit null checks table
 303   // only when this method returns false.
 304 #ifdef _LP64
 305   if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
 306     assert (Universe::heap() != NULL, "java heap should be initialized");
 307     // The first page after heap_base is unmapped and
 308     // the 'offset' is equal to [heap_base + offset] for
 309     // narrow oop implicit null checks.
 310     uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
 311     int adj = MIN2(0, UseShenandoahGC ? BrooksPointer::byte_offset() : 0);
 312     if ((uintptr_t)(offset - adj) >= base) {
 313       // Normalize offset for the next check.
 314       offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
 315     }
 316   }
 317 #endif
 318 
 319   if (UseShenandoahGC) {
 320 #ifdef AARCH64
 321     // AArch64 uses 48-bit addresses
 322     const uintptr_t address_bits = (uintptr_t)0xfffffffffffful;
 323 #elif defined(_LP64)
 324     const uintptr_t address_bits = ~(uintptr_t)0;




 325 #else
 326     // Shenandoah is not implemented on these platforms, make sure we build fine,
 327     // but also crash consistently at runtime.
 328     const uintptr_t address_bits = 0;
 329     ShouldNotReachHere();
 330 #endif
 331     if ((offset & address_bits) == (BrooksPointer::byte_offset() & address_bits)) {
 332       return false;
 333     }
 334   }
 335 
 336   return offset < 0 || os::vm_page_size() <= offset;
 337 }
< prev index next >