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