617 {
618 Label done;
619 __ movl(rax, access_flags);
620 __ testl(rax, JVM_ACC_STATIC);
621 // get receiver (assume this is frequent case)
622 __ movptr(rax, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
623 __ jcc(Assembler::zero, done);
624 __ load_mirror(rax, rbx);
625
626 #ifdef ASSERT
627 {
628 Label L;
629 __ testptr(rax, rax);
630 __ jcc(Assembler::notZero, L);
631 __ stop("synchronization object is NULL");
632 __ bind(L);
633 }
634 #endif // ASSERT
635
636 __ bind(done);
637 }
638
639 // add space for monitor & lock
640 __ subptr(rsp, entry_size); // add space for a monitor entry
641 __ movptr(monitor_block_top, rsp); // set new monitor block top
642 // store object
643 __ movptr(Address(rsp, BasicObjectLock::obj_offset_in_bytes()), rax);
644 const Register lockreg = NOT_LP64(rdx) LP64_ONLY(c_rarg1);
645 __ movptr(lockreg, rsp); // object address
646 __ lock_object(lockreg);
647 }
648
649 // Generate a fixed interpreter frame. This is identical setup for
650 // interpreted methods and for native methods hence the shared code.
651 //
652 // Args:
653 // rax: return address
654 // rbx: Method*
655 // r14/rdi: pointer to locals
656 // r13/rsi: sender sp
|
617 {
618 Label done;
619 __ movl(rax, access_flags);
620 __ testl(rax, JVM_ACC_STATIC);
621 // get receiver (assume this is frequent case)
622 __ movptr(rax, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
623 __ jcc(Assembler::zero, done);
624 __ load_mirror(rax, rbx);
625
626 #ifdef ASSERT
627 {
628 Label L;
629 __ testptr(rax, rax);
630 __ jcc(Assembler::notZero, L);
631 __ stop("synchronization object is NULL");
632 __ bind(L);
633 }
634 #endif // ASSERT
635
636 __ bind(done);
637 __ resolve(IS_NOT_NULL, rax);
638 }
639
640 // add space for monitor & lock
641 __ subptr(rsp, entry_size); // add space for a monitor entry
642 __ movptr(monitor_block_top, rsp); // set new monitor block top
643 // store object
644 __ movptr(Address(rsp, BasicObjectLock::obj_offset_in_bytes()), rax);
645 const Register lockreg = NOT_LP64(rdx) LP64_ONLY(c_rarg1);
646 __ movptr(lockreg, rsp); // object address
647 __ lock_object(lockreg);
648 }
649
650 // Generate a fixed interpreter frame. This is identical setup for
651 // interpreted methods and for native methods hence the shared code.
652 //
653 // Args:
654 // rax: return address
655 // rbx: Method*
656 // r14/rdi: pointer to locals
657 // r13/rsi: sender sp
|