< prev index next >
src/hotspot/share/asm/assembler.cpp
Print this page
rev 52354 : 8213199: GC abstraction for Assembler::needs_explicit_null_check()
@@ -24,10 +24,11 @@
#include "precompiled.hpp"
#include "asm/codeBuffer.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
+#include "gc/shared/barrierSetAssembler.hpp"
#include "runtime/atomic.hpp"
#include "runtime/icache.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"
@@ -306,22 +307,7 @@
}
return NULL;
}
bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
- // Exception handler checks the nmethod's implicit null checks table
- // only when this method returns false.
-#ifdef _LP64
- if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
- assert (Universe::heap() != NULL, "java heap should be initialized");
- // The first page after heap_base is unmapped and
- // the 'offset' is equal to [heap_base + offset] for
- // narrow oop implicit null checks.
- uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
- if ((uintptr_t)offset >= base) {
- // Normalize offset for the next check.
- offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
- }
- }
-#endif
- return offset < 0 || os::vm_page_size() <= offset;
+ return BarrierSet::barrier_set()->barrier_set_assembler()->needs_explicit_null_check(offset);
}
< prev index next >