589 __ addptr(rsp, 16 * wordSize);
590 #else
591
592 __ pop(rdi);
593 __ pop(rsi);
594 __ pop(rbp);
595 __ pop(rbx); // skip this value
596 __ pop(rbx);
597 __ pop(rdx);
598 __ pop(rcx);
599 __ addptr(rsp, BytesPerWord);
600 #endif // _LP64
601 }
602
603
604 void Runtime1::initialize_pd() {
605 // nothing to do
606 }
607
608
609 // target: the entry point of the method that creates and posts the exception oop
610 // has_argument: true if the exception needs an argument (passed on stack because registers must be preserved)
611
612 OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) {
613 // preserve all registers
614 int num_rt_args = has_argument ? 2 : 1;
615 OopMap* oop_map = save_live_registers(sasm, num_rt_args);
616
617 // now all registers are saved and can be used freely
618 // verify that no old value is used accidentally
619 __ invalidate_registers(true, true, true, true, true, true);
620
621 // registers used by this stub
622 const Register temp_reg = rbx;
623
624 // load argument for exception that is passed as an argument into the stub
625 if (has_argument) {
626 #ifdef _LP64
627 __ movptr(c_rarg1, Address(rbp, 2*BytesPerWord));
628 #else
629 __ movptr(temp_reg, Address(rbp, 2*BytesPerWord));
630 __ push(temp_reg);
631 #endif // _LP64
632 }
633 int call_offset = __ call_RT(noreg, noreg, target, num_rt_args - 1);
634
635 OopMapSet* oop_maps = new OopMapSet();
636 oop_maps->add_gc_map(call_offset, oop_map);
637
638 __ stop("should not reach here");
639
640 return oop_maps;
641 }
642
643
644 OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
645 __ block_comment("generate_handle_exception");
646
647 // incoming parameters
648 const Register exception_oop = rax;
|
589 __ addptr(rsp, 16 * wordSize);
590 #else
591
592 __ pop(rdi);
593 __ pop(rsi);
594 __ pop(rbp);
595 __ pop(rbx); // skip this value
596 __ pop(rbx);
597 __ pop(rdx);
598 __ pop(rcx);
599 __ addptr(rsp, BytesPerWord);
600 #endif // _LP64
601 }
602
603
604 void Runtime1::initialize_pd() {
605 // nothing to do
606 }
607
608
609 // Target: the entry point of the method that creates and posts the exception oop.
610 // has_argument: true if the exception needs arguments (passed on the stack because
611 // registers must be preserved).
612 OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) {
613 // Preserve all registers.
614 int num_rt_args = has_argument ? (2 + 1) : 1;
615 OopMap* oop_map = save_live_registers(sasm, num_rt_args);
616
617 // Now all registers are saved and can be used freely.
618 // Verify that no old value is used accidentally.
619 __ invalidate_registers(true, true, true, true, true, true);
620
621 // Registers used by this stub.
622 const Register temp_reg = rbx;
623
624 // Load arguments for exception that are passed as arguments into the stub.
625 if (has_argument) {
626 #ifdef _LP64
627 __ movptr(c_rarg1, Address(rbp, 2*BytesPerWord));
628 __ movptr(c_rarg2, Address(rbp, 3*BytesPerWord));
629 #else
630 __ movptr(temp_reg, Address(rbp, 3*BytesPerWord));
631 __ push(temp_reg);
632 __ movptr(temp_reg, Address(rbp, 2*BytesPerWord));
633 __ push(temp_reg);
634 #endif // _LP64
635 }
636 int call_offset = __ call_RT(noreg, noreg, target, num_rt_args - 1);
637
638 OopMapSet* oop_maps = new OopMapSet();
639 oop_maps->add_gc_map(call_offset, oop_map);
640
641 __ stop("should not reach here");
642
643 return oop_maps;
644 }
645
646
647 OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
648 __ block_comment("generate_handle_exception");
649
650 // incoming parameters
651 const Register exception_oop = rax;
|