286 }
287
288 void AbstractAssembler::block_comment(const char* comment) {
289 if (sect() == CodeBuffer::SECT_INSTS) {
290 code_section()->outer()->block_comment(offset(), comment);
291 }
292 }
293
294 const char* AbstractAssembler::code_string(const char* str) {
295 if (sect() == CodeBuffer::SECT_INSTS || sect() == CodeBuffer::SECT_STUBS) {
296 return code_section()->outer()->code_string(str);
297 }
298 return NULL;
299 }
300
301 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
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 if ((uintptr_t)offset >= base) {
312 // Normalize offset for the next check.
313 offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
314 }
315 }
316 #endif
317 return offset < 0 || os::vm_page_size() <= offset;
318 }
|
286 }
287
288 void AbstractAssembler::block_comment(const char* comment) {
289 if (sect() == CodeBuffer::SECT_INSTS) {
290 code_section()->outer()->block_comment(offset(), comment);
291 }
292 }
293
294 const char* AbstractAssembler::code_string(const char* str) {
295 if (sect() == CodeBuffer::SECT_INSTS || sect() == CodeBuffer::SECT_STUBS) {
296 return code_section()->outer()->code_string(str);
297 }
298 return NULL;
299 }
300
301 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
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 (GC::gc()->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 if ((uintptr_t)offset >= base) {
312 // Normalize offset for the next check.
313 offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
314 }
315 }
316 #endif
317 return offset < 0 || os::vm_page_size() <= offset;
318 }
|