comparison src/cpu/ppc/vm/macroAssembler_ppc.inline.hpp @ 14436:b0133e4187d3

8028471: PPC64 (part 215): opto: Extend ImplicitNullCheck optimization. Summary: Fixed Implicit NULL check optimization for AIX, where the page at address '0' is only write-protected. Reviewed-by: kvn
author goetz
date Thu, 21 Nov 2013 18:29:34 -0800
parents ec28f9c041ff
children 67fa91961822
comparison
equal deleted inserted replaced
14435:da862781b584 14436:b0133e4187d3
267 // Either issue a trap instruction that raises SIGTRAP, or do a compare that 267 // Either issue a trap instruction that raises SIGTRAP, or do a compare that
268 // branches to exception_entry. 268 // branches to exception_entry.
269 // No support for compressed oops (base page of heap). Does not distinguish 269 // No support for compressed oops (base page of heap). Does not distinguish
270 // loads and stores. 270 // loads and stores.
271 inline void MacroAssembler::null_check_throw(Register a, int offset, Register temp_reg, address exception_entry) { 271 inline void MacroAssembler::null_check_throw(Register a, int offset, Register temp_reg, address exception_entry) {
272 if (!ImplicitNullChecks || needs_explicit_null_check(offset) NOT_LINUX(|| true) /*!os::zero_page_read_protected()*/) { 272 if (!ImplicitNullChecks || needs_explicit_null_check(offset) || !os::zero_page_read_protected()) {
273 if (TrapBasedNullChecks) { 273 if (TrapBasedNullChecks) {
274 assert(UseSIGTRAP, "sanity"); 274 assert(UseSIGTRAP, "sanity");
275 trap_null_check(a); 275 trap_null_check(a);
276 } else { 276 } else {
277 Label ok; 277 Label ok;
284 } 284 }
285 } 285 }
286 } 286 }
287 287
288 inline void MacroAssembler::ld_with_trap_null_check(Register d, int si16, Register s1) { 288 inline void MacroAssembler::ld_with_trap_null_check(Register d, int si16, Register s1) {
289 if ( NOT_LINUX(true) LINUX_ONLY(false)/*!os::zero_page_read_protected()*/) { 289 if (!os::zero_page_read_protected()) {
290 if (TrapBasedNullChecks) { 290 if (TrapBasedNullChecks) {
291 trap_null_check(s1); 291 trap_null_check(s1);
292 } 292 }
293 } 293 }
294 ld(d, si16, s1); 294 ld(d, si16, s1);
295 } 295 }
296 296
297 // Attention: No null check for loaded uncompressed OOP. Can be used for loading klass field. 297 // Attention: No null check for loaded uncompressed OOP. Can be used for loading klass field.
298 inline void MacroAssembler::load_heap_oop_with_trap_null_check(Register d, RegisterOrConstant si16, 298 inline void MacroAssembler::load_heap_oop_with_trap_null_check(Register d, RegisterOrConstant si16,
299 Register s1) { 299 Register s1) {
300 if ( NOT_LINUX(true)LINUX_ONLY(false) /*!os::zero_page_read_protected()*/) { 300 if ( !os::zero_page_read_protected()) {
301 if (TrapBasedNullChecks) { 301 if (TrapBasedNullChecks) {
302 trap_null_check(s1); 302 trap_null_check(s1);
303 } 303 }
304 } 304 }
305 load_heap_oop_not_null(d, si16, s1); 305 load_heap_oop_not_null(d, si16, s1);