comparison src/share/vm/asm/assembler.cpp @ 368:36ccc817fca4

6747051: Improve code and implicit null check generation for compressed oops Summary: Push DecodeN node below the Null check to the non-null path to use the mach node without 0 test. Reviewed-by: rasbold, never
author kvn
date Tue, 23 Sep 2008 12:29:06 -0700
parents 1fdb98a17101
children eb28cf662f56
comparison
equal deleted inserted replaced
367:194b8e3a2fc4 368:36ccc817fca4
247 } 247 }
248 248
249 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { 249 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
250 // Exception handler checks the nmethod's implicit null checks table 250 // Exception handler checks the nmethod's implicit null checks table
251 // only when this method returns false. 251 // only when this method returns false.
252 #ifndef SPARC
253 // Sparc does not have based addressing
254 if (UseCompressedOops) { 252 if (UseCompressedOops) {
255 // The first page after heap_base is unmapped and 253 // The first page after heap_base is unmapped and
256 // the 'offset' is equal to [heap_base + offset] for 254 // the 'offset' is equal to [heap_base + offset] for
257 // narrow oop implicit null checks. 255 // narrow oop implicit null checks.
258 uintptr_t heap_base = (uintptr_t)Universe::heap_base(); 256 uintptr_t heap_base = (uintptr_t)Universe::heap_base();
259 if ((uintptr_t)offset >= heap_base) { 257 if ((uintptr_t)offset >= heap_base) {
260 // Normalize offset for the next check. 258 // Normalize offset for the next check.
261 offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1)); 259 offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
262 } 260 }
263 } 261 }
264 #endif // SPARC
265 return offset < 0 || os::vm_page_size() <= offset; 262 return offset < 0 || os::vm_page_size() <= offset;
266 } 263 }
267 264
268 #ifndef PRODUCT 265 #ifndef PRODUCT
269 void Label::print_instructions(MacroAssembler* masm) const { 266 void Label::print_instructions(MacroAssembler* masm) const {