--- old/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp	Tue May 27 22:58:58 2008
+++ new/src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp	Tue May 27 22:58:58 2008
@@ -66,6 +66,12 @@
    }
 }
 
-bool MacroAssembler::needs_explicit_null_check(int offset) {
-  return offset < 0 || (int)os::vm_page_size() <= offset;
+bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
+  if (UseCompressedOops) {
+    uintptr_t heap_base = (uintptr_t)Universe::heap_base();
+    if ((uintptr_t)offset >= heap_base) {
+      offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
+    }
+  }
+  return offset < 0 || os::vm_page_size() <= offset;
 }
