7641 if (!VerifyOops) return; |
7641 if (!VerifyOops) return; |
7642 |
7642 |
7643 // Pass register number to verify_oop_subroutine |
7643 // Pass register number to verify_oop_subroutine |
7644 char* b = new char[strlen(s) + 50]; |
7644 char* b = new char[strlen(s) + 50]; |
7645 sprintf(b, "verify_oop: %s: %s", reg->name(), s); |
7645 sprintf(b, "verify_oop: %s: %s", reg->name(), s); |
|
7646 #ifdef _LP64 |
|
7647 push(rscratch1); // save r10, trashed by movptr() |
|
7648 #endif |
7646 push(rax); // save rax, |
7649 push(rax); // save rax, |
7647 push(reg); // pass register argument |
7650 push(reg); // pass register argument |
7648 ExternalAddress buffer((address) b); |
7651 ExternalAddress buffer((address) b); |
7649 // avoid using pushptr, as it modifies scratch registers |
7652 // avoid using pushptr, as it modifies scratch registers |
7650 // and our contract is not to modify anything |
7653 // and our contract is not to modify anything |
7651 movptr(rax, buffer.addr()); |
7654 movptr(rax, buffer.addr()); |
7652 push(rax); |
7655 push(rax); |
7653 // call indirectly to solve generation ordering problem |
7656 // call indirectly to solve generation ordering problem |
7654 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); |
7657 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); |
7655 call(rax); |
7658 call(rax); |
|
7659 // Caller pops the arguments (oop, message) and restores rax, r10 |
7656 } |
7660 } |
7657 |
7661 |
7658 |
7662 |
7659 RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr, |
7663 RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr, |
7660 Register tmp, |
7664 Register tmp, |
7765 // Address adjust(addr.base(), addr.index(), addr.scale(), addr.disp() + BytesPerWord); |
7769 // Address adjust(addr.base(), addr.index(), addr.scale(), addr.disp() + BytesPerWord); |
7766 // Pass register number to verify_oop_subroutine |
7770 // Pass register number to verify_oop_subroutine |
7767 char* b = new char[strlen(s) + 50]; |
7771 char* b = new char[strlen(s) + 50]; |
7768 sprintf(b, "verify_oop_addr: %s", s); |
7772 sprintf(b, "verify_oop_addr: %s", s); |
7769 |
7773 |
|
7774 #ifdef _LP64 |
|
7775 push(rscratch1); // save r10, trashed by movptr() |
|
7776 #endif |
7770 push(rax); // save rax, |
7777 push(rax); // save rax, |
7771 // addr may contain rsp so we will have to adjust it based on the push |
7778 // addr may contain rsp so we will have to adjust it based on the push |
7772 // we just did |
7779 // we just did |
7773 // NOTE: 64bit seemed to have had a bug in that it did movq(addr, rax); which |
7780 // NOTE: 64bit seemed to have had a bug in that it did movq(addr, rax); which |
7774 // stores rax into addr which is backwards of what was intended. |
7781 // stores rax into addr which is backwards of what was intended. |
7787 push(rax); |
7794 push(rax); |
7788 |
7795 |
7789 // call indirectly to solve generation ordering problem |
7796 // call indirectly to solve generation ordering problem |
7790 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); |
7797 movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); |
7791 call(rax); |
7798 call(rax); |
7792 // Caller pops the arguments and restores rax, from the stack |
7799 // Caller pops the arguments (addr, message) and restores rax, r10. |
7793 } |
7800 } |
7794 |
7801 |
7795 void MacroAssembler::verify_tlab() { |
7802 void MacroAssembler::verify_tlab() { |
7796 #ifdef ASSERT |
7803 #ifdef ASSERT |
7797 if (UseTLAB && VerifyOops) { |
7804 if (UseTLAB && VerifyOops) { |