comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 22458:c2c971a9776f

Remove unused frame_extension_argument from i2c adapters
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Mon, 24 Aug 2015 10:21:51 -0700
parents c28cb37b2e1d
children f27c163d7dc2
comparison
equal deleted inserted replaced
22457:c2d49f9fbceb 22458:c2c971a9776f
670 670
671 void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm, 671 void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
672 int total_args_passed, 672 int total_args_passed,
673 int comp_args_on_stack, 673 int comp_args_on_stack,
674 const BasicType *sig_bt, 674 const BasicType *sig_bt,
675 const VMRegPair *regs, 675 const VMRegPair *regs) {
676 int frame_extension_argument) {
677 676
678 // Note: r13 contains the senderSP on entry. We must preserve it since 677 // Note: r13 contains the senderSP on entry. We must preserve it since
679 // we may do a i2c -> c2i transition if we lose a race where compiled 678 // we may do a i2c -> c2i transition if we lose a race where compiled
680 // code goes non-entrant while we get args ready. 679 // code goes non-entrant while we get args ready.
681 // In addition we use r13 to locate all the interpreter args as 680 // In addition we use r13 to locate all the interpreter args as
728 __ block_comment(msg); 727 __ block_comment(msg);
729 __ stop(msg); 728 __ stop(msg);
730 __ bind(L_ok); 729 __ bind(L_ok);
731 __ block_comment("} verify_i2ce "); 730 __ block_comment("} verify_i2ce ");
732 } 731 }
733
734 #if INCLUDE_JVMCI
735 if (frame_extension_argument != -1) {
736 // The frame_extension_argument is an int that describes the
737 // expected amount of argument space in the caller frame. If that
738 // is greater than total_args_passed then enlarge the caller frame
739 // by that amount to ensure deopt works correctly.
740 assert(frame_extension_argument < total_args_passed, "out of range");
741 assert(sig_bt[frame_extension_argument] == T_INT, "wrong signature");
742
743 Label done;
744 int i = frame_extension_argument;
745 int ld_off = (total_args_passed - i)*Interpreter::stackElementSize;
746 // Check if anything needs to be done. Too much space is ok.
747 __ movl(r13, Address(rsp, ld_off));
748 __ cmpl(r13, total_args_passed);
749 __ jcc(Assembler::lessEqual, done);
750 // Save the old rsp for the copy code
751 __ movptr(r11, rsp);
752 // Enlarge the frame
753 __ subl(r13, total_args_passed);
754 __ shlq(r13, 3);
755 __ subptr(rsp, r13);
756
757 // Now copy the arguments in reverse order so they don't get
758 // overwritten during the copy.
759 for (int i = total_args_passed - 1; i >= 0; i--) {
760 int ld_off = (total_args_passed - i) * Interpreter::stackElementSize;
761 __ movptr(r13, Address(r11, ld_off));
762 __ movptr(Address(rsp, ld_off), r13);
763 }
764 __ bind(done);
765 }
766 #else
767 assert(frame_extension_argument == -1, "unsupported");
768 #endif
769 732
770 // Must preserve original SP for loading incoming arguments because 733 // Must preserve original SP for loading incoming arguments because
771 // we need to align the outgoing SP for compiled code. 734 // we need to align the outgoing SP for compiled code.
772 __ movptr(r11, rsp); 735 __ movptr(r11, rsp);
773 736