Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/methodHandles_x86.cpp @ 1506:2338d41fbd81
6943304: remove tagged stack interpreter
Reviewed-by: coleenp, never, gbenson
author | twisti |
---|---|
date | Fri, 30 Apr 2010 08:37:24 -0700 |
parents | c640000b7cc1 |
children | cd5dbf694d45 |
comparison
equal
deleted
inserted
replaced
1505:0c5b3cf3c1f5 | 1506:2338d41fbd81 |
---|---|
498 type2aelembytes(arg_type), is_signed_subword_type(arg_type)); | 498 type2aelembytes(arg_type), is_signed_subword_type(arg_type)); |
499 __ movptr(Address(rax_argslot, 0), rdx_temp); | 499 __ movptr(Address(rax_argslot, 0), rdx_temp); |
500 #ifndef _LP64 | 500 #ifndef _LP64 |
501 if (arg_slots == 2) { | 501 if (arg_slots == 2) { |
502 __ movl(rdx_temp, prim_value_addr.plus_disp(wordSize)); | 502 __ movl(rdx_temp, prim_value_addr.plus_disp(wordSize)); |
503 __ movl(Address(rax_argslot, Interpreter::stackElementSize()), rdx_temp); | 503 __ movl(Address(rax_argslot, Interpreter::stackElementSize), rdx_temp); |
504 } | 504 } |
505 #endif //_LP64 | 505 #endif //_LP64 |
506 } | 506 } |
507 | 507 |
508 if (direct_to_method) { | 508 if (direct_to_method) { |
594 { | 594 { |
595 // just delete the extra slot; on a little-endian machine we keep the first | 595 // just delete the extra slot; on a little-endian machine we keep the first |
596 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); | 596 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); |
597 remove_arg_slots(_masm, -stack_move_unit(), | 597 remove_arg_slots(_masm, -stack_move_unit(), |
598 rax_argslot, rbx_temp, rdx_temp); | 598 rax_argslot, rbx_temp, rdx_temp); |
599 vmarg = Address(rax_argslot, -Interpreter::stackElementSize()); | 599 vmarg = Address(rax_argslot, -Interpreter::stackElementSize); |
600 __ movl(rdx_temp, vmarg); | 600 __ movl(rdx_temp, vmarg); |
601 } | 601 } |
602 break; | 602 break; |
603 case _adapter_opt_unboxi: | 603 case _adapter_opt_unboxi: |
604 { | 604 { |
663 | 663 |
664 // on a little-endian machine we keep the first slot and add another after | 664 // on a little-endian machine we keep the first slot and add another after |
665 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); | 665 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); |
666 insert_arg_slots(_masm, stack_move_unit(), _INSERT_INT_MASK, | 666 insert_arg_slots(_masm, stack_move_unit(), _INSERT_INT_MASK, |
667 rax_argslot, rbx_temp, rdx_temp); | 667 rax_argslot, rbx_temp, rdx_temp); |
668 Address vmarg1(rax_argslot, -Interpreter::stackElementSize()); | 668 Address vmarg1(rax_argslot, -Interpreter::stackElementSize); |
669 Address vmarg2 = vmarg1.plus_disp(Interpreter::stackElementSize()); | 669 Address vmarg2 = vmarg1.plus_disp(Interpreter::stackElementSize); |
670 | 670 |
671 switch (ek) { | 671 switch (ek) { |
672 case _adapter_opt_i2l: | 672 case _adapter_opt_i2l: |
673 { | 673 { |
674 #ifdef _LP64 | 674 #ifdef _LP64 |
716 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); | 716 __ lea(rax_argslot, __ argument_address(rax_argslot, 1)); |
717 if (ek == _adapter_opt_f2d) { | 717 if (ek == _adapter_opt_f2d) { |
718 insert_arg_slots(_masm, stack_move_unit(), _INSERT_INT_MASK, | 718 insert_arg_slots(_masm, stack_move_unit(), _INSERT_INT_MASK, |
719 rax_argslot, rbx_temp, rdx_temp); | 719 rax_argslot, rbx_temp, rdx_temp); |
720 } | 720 } |
721 Address vmarg(rax_argslot, -Interpreter::stackElementSize()); | 721 Address vmarg(rax_argslot, -Interpreter::stackElementSize); |
722 | 722 |
723 #ifdef _LP64 | 723 #ifdef _LP64 |
724 if (ek == _adapter_opt_f2d) { | 724 if (ek == _adapter_opt_f2d) { |
725 __ movflt(xmm0, vmarg); | 725 __ movflt(xmm0, vmarg); |
726 __ cvtss2sd(xmm0, xmm0); | 726 __ cvtss2sd(xmm0, xmm0); |
1014 Register rdx_argslot_limit = rdx_temp; | 1014 Register rdx_argslot_limit = rdx_temp; |
1015 | 1015 |
1016 // Array length checks out. Now insert any required stack slots. | 1016 // Array length checks out. Now insert any required stack slots. |
1017 if (length_constant == -1) { | 1017 if (length_constant == -1) { |
1018 // Form a pointer to the end of the affected region. | 1018 // Form a pointer to the end of the affected region. |
1019 __ lea(rdx_argslot_limit, Address(rax_argslot, Interpreter::stackElementSize())); | 1019 __ lea(rdx_argslot_limit, Address(rax_argslot, Interpreter::stackElementSize)); |
1020 // 'stack_move' is negative number of words to insert | 1020 // 'stack_move' is negative number of words to insert |
1021 Register rdi_stack_move = rdi; | 1021 Register rdi_stack_move = rdi; |
1022 __ movl2ptr(rdi_stack_move, rcx_amh_conversion); | 1022 __ movl2ptr(rdi_stack_move, rcx_amh_conversion); |
1023 __ sarptr(rdi_stack_move, CONV_STACK_MOVE_SHIFT); | 1023 __ sarptr(rdi_stack_move, CONV_STACK_MOVE_SHIFT); |
1024 Register rsi_temp = rsi_array; // spill this | 1024 Register rsi_temp = rsi_array; // spill this |
1052 Label loop; | 1052 Label loop; |
1053 __ bind(loop); | 1053 __ bind(loop); |
1054 __ movptr(rbx_temp, Address(rsi_source, 0)); | 1054 __ movptr(rbx_temp, Address(rsi_source, 0)); |
1055 __ movptr(Address(rax_argslot, 0), rbx_temp); | 1055 __ movptr(Address(rax_argslot, 0), rbx_temp); |
1056 __ addptr(rsi_source, type2aelembytes(elem_type)); | 1056 __ addptr(rsi_source, type2aelembytes(elem_type)); |
1057 __ addptr(rax_argslot, Interpreter::stackElementSize()); | 1057 __ addptr(rax_argslot, Interpreter::stackElementSize); |
1058 __ cmpptr(rax_argslot, rdx_argslot_limit); | 1058 __ cmpptr(rax_argslot, rdx_argslot_limit); |
1059 __ jccb(Assembler::less, loop); | 1059 __ jccb(Assembler::less, loop); |
1060 } else if (length_constant == 0) { | 1060 } else if (length_constant == 0) { |
1061 __ bind(skip_array_check); | 1061 __ bind(skip_array_check); |
1062 // nothing to copy | 1062 // nothing to copy |
1065 int slot_offset = 0; | 1065 int slot_offset = 0; |
1066 for (int index = 0; index < length_constant; index++) { | 1066 for (int index = 0; index < length_constant; index++) { |
1067 __ movptr(rbx_temp, Address(rsi_array, elem_offset)); | 1067 __ movptr(rbx_temp, Address(rsi_array, elem_offset)); |
1068 __ movptr(Address(rax_argslot, slot_offset), rbx_temp); | 1068 __ movptr(Address(rax_argslot, slot_offset), rbx_temp); |
1069 elem_offset += type2aelembytes(elem_type); | 1069 elem_offset += type2aelembytes(elem_type); |
1070 slot_offset += Interpreter::stackElementSize(); | 1070 slot_offset += Interpreter::stackElementSize; |
1071 } | 1071 } |
1072 } | 1072 } |
1073 | 1073 |
1074 // Arguments are spread. Move to next method handle. | 1074 // Arguments are spread. Move to next method handle. |
1075 UNPUSH_RSI_RDI; | 1075 UNPUSH_RSI_RDI; |