8333 assert (UseCompressedOops, "should only be used for compressed headers"); |
8333 assert (UseCompressedOops, "should only be used for compressed headers"); |
8334 assert (Universe::heap() != NULL, "java heap should be initialized"); |
8334 assert (Universe::heap() != NULL, "java heap should be initialized"); |
8335 // Cannot assert, unverified entry point counts instructions (see .ad file) |
8335 // Cannot assert, unverified entry point counts instructions (see .ad file) |
8336 // vtableStubs also counts instructions in pd_code_size_limit. |
8336 // vtableStubs also counts instructions in pd_code_size_limit. |
8337 // Also do not verify_oop as this is called by verify_oop. |
8337 // Also do not verify_oop as this is called by verify_oop. |
8338 if (Universe::narrow_oop_base() == NULL) { |
8338 if (Universe::narrow_oop_shift() != 0) { |
8339 if (Universe::narrow_oop_shift() != 0) { |
8339 assert (Address::times_8 == LogMinObjAlignmentInBytes && |
8340 assert (LogMinObjAlignmentInBytes == Universe::narrow_oop_shift(), "decode alg wrong"); |
8340 Address::times_8 == Universe::narrow_oop_shift(), "decode alg wrong"); |
8341 shlq(r, LogMinObjAlignmentInBytes); |
8341 // Don't use Shift since it modifies flags. |
8342 } |
|
8343 } else { |
|
8344 assert (Address::times_8 == LogMinObjAlignmentInBytes && |
|
8345 Address::times_8 == Universe::narrow_oop_shift(), "decode alg wrong"); |
|
8346 leaq(r, Address(r12_heapbase, r, Address::times_8, 0)); |
8342 leaq(r, Address(r12_heapbase, r, Address::times_8, 0)); |
|
8343 } else { |
|
8344 assert (Universe::narrow_oop_base() == NULL, "sanity"); |
8347 } |
8345 } |
8348 } |
8346 } |
8349 |
8347 |
8350 void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) { |
8348 void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) { |
8351 assert (UseCompressedOops, "should only be used for compressed headers"); |
8349 assert (UseCompressedOops, "should only be used for compressed headers"); |
8356 if (Universe::narrow_oop_shift() != 0) { |
8354 if (Universe::narrow_oop_shift() != 0) { |
8357 assert (Address::times_8 == LogMinObjAlignmentInBytes && |
8355 assert (Address::times_8 == LogMinObjAlignmentInBytes && |
8358 Address::times_8 == Universe::narrow_oop_shift(), "decode alg wrong"); |
8356 Address::times_8 == Universe::narrow_oop_shift(), "decode alg wrong"); |
8359 leaq(dst, Address(r12_heapbase, src, Address::times_8, 0)); |
8357 leaq(dst, Address(r12_heapbase, src, Address::times_8, 0)); |
8360 } else if (dst != src) { |
8358 } else if (dst != src) { |
|
8359 assert (Universe::narrow_oop_base() == NULL, "sanity"); |
8361 movq(dst, src); |
8360 movq(dst, src); |
8362 } |
8361 } |
8363 } |
8362 } |
8364 |
8363 |
8365 void MacroAssembler::set_narrow_oop(Register dst, jobject obj) { |
8364 void MacroAssembler::set_narrow_oop(Register dst, jobject obj) { |