Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 628:7bb995fbd3c0
Merge
author | trims |
---|---|
date | Thu, 12 Mar 2009 18:16:36 -0700 |
parents | 56aae7be60d4 |
children | 819880572f09 |
comparison
equal
deleted
inserted
replaced
580:ce2272390558 | 628:7bb995fbd3c0 |
---|---|
648 | 648 |
649 __ bind(notByte); | 649 __ bind(notByte); |
650 __ cmpl(rdx, stos); | 650 __ cmpl(rdx, stos); |
651 __ jcc(Assembler::notEqual, notShort); | 651 __ jcc(Assembler::notEqual, notShort); |
652 // stos | 652 // stos |
653 __ load_signed_word(rax, field_address); | 653 __ load_signed_short(rax, field_address); |
654 __ jmp(xreturn_path); | 654 __ jmp(xreturn_path); |
655 | 655 |
656 __ bind(notShort); | 656 __ bind(notShort); |
657 #ifdef ASSERT | 657 #ifdef ASSERT |
658 Label okay; | 658 Label okay; |
660 __ jcc(Assembler::equal, okay); | 660 __ jcc(Assembler::equal, okay); |
661 __ stop("what type is this?"); | 661 __ stop("what type is this?"); |
662 __ bind(okay); | 662 __ bind(okay); |
663 #endif | 663 #endif |
664 // ctos | 664 // ctos |
665 __ load_unsigned_word(rax, field_address); | 665 __ load_unsigned_short(rax, field_address); |
666 | 666 |
667 __ bind(xreturn_path); | 667 __ bind(xreturn_path); |
668 | 668 |
669 // _ireturn/_areturn | 669 // _ireturn/_areturn |
670 __ pop(rdi); | 670 __ pop(rdi); |
700 invocation_counter_offset() + | 700 invocation_counter_offset() + |
701 InvocationCounter::counter_offset()); | 701 InvocationCounter::counter_offset()); |
702 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); | 702 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); |
703 | 703 |
704 // get parameter size (always needed) | 704 // get parameter size (always needed) |
705 __ load_unsigned_word(rcx, size_of_parameters); | 705 __ load_unsigned_short(rcx, size_of_parameters); |
706 | 706 |
707 // native calls don't need the stack size check since they have no | 707 // native calls don't need the stack size check since they have no |
708 // expression stack and the arguments are already on the stack and | 708 // expression stack and the arguments are already on the stack and |
709 // we only add a handful of words to the stack | 709 // we only add a handful of words to the stack |
710 | 710 |
817 const Register t = r11; | 817 const Register t = r11; |
818 | 818 |
819 // allocate space for parameters | 819 // allocate space for parameters |
820 __ get_method(method); | 820 __ get_method(method); |
821 __ verify_oop(method); | 821 __ verify_oop(method); |
822 __ load_unsigned_word(t, | 822 __ load_unsigned_short(t, |
823 Address(method, | 823 Address(method, |
824 methodOopDesc::size_of_parameters_offset())); | 824 methodOopDesc::size_of_parameters_offset())); |
825 __ shll(t, Interpreter::logStackElementSize()); | 825 __ shll(t, Interpreter::logStackElementSize()); |
826 | 826 |
827 __ subptr(rsp, t); | 827 __ subptr(rsp, t); |
828 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows | 828 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows |
829 __ andptr(rsp, -16); // must be 16 byte boundry (see amd64 ABI) | 829 __ andptr(rsp, -16); // must be 16 byte boundary (see amd64 ABI) |
830 | 830 |
831 // get signature handler | 831 // get signature handler |
832 { | 832 { |
833 Label L; | 833 Label L; |
834 __ movptr(t, Address(method, methodOopDesc::signature_handler_offset())); | 834 __ movptr(t, Address(method, methodOopDesc::signature_handler_offset())); |
1163 methodOopDesc::invocation_counter_offset() + | 1163 methodOopDesc::invocation_counter_offset() + |
1164 InvocationCounter::counter_offset()); | 1164 InvocationCounter::counter_offset()); |
1165 const Address access_flags(rbx, methodOopDesc::access_flags_offset()); | 1165 const Address access_flags(rbx, methodOopDesc::access_flags_offset()); |
1166 | 1166 |
1167 // get parameter size (always needed) | 1167 // get parameter size (always needed) |
1168 __ load_unsigned_word(rcx, size_of_parameters); | 1168 __ load_unsigned_short(rcx, size_of_parameters); |
1169 | 1169 |
1170 // rbx: methodOop | 1170 // rbx: methodOop |
1171 // rcx: size of parameters | 1171 // rcx: size of parameters |
1172 // r13: sender_sp (could differ from sp+wordSize if we were called via c2i ) | 1172 // r13: sender_sp (could differ from sp+wordSize if we were called via c2i ) |
1173 | 1173 |
1174 __ load_unsigned_word(rdx, size_of_locals); // get size of locals in words | 1174 __ load_unsigned_short(rdx, size_of_locals); // get size of locals in words |
1175 __ subl(rdx, rcx); // rdx = no. of additional locals | 1175 __ subl(rdx, rcx); // rdx = no. of additional locals |
1176 | 1176 |
1177 // YYY | 1177 // YYY |
1178 // __ incrementl(rdx); | 1178 // __ incrementl(rdx); |
1179 // __ andl(rdx, -2); | 1179 // __ andl(rdx, -2); |
1581 __ jcc(Assembler::notZero, caller_not_deoptimized); | 1581 __ jcc(Assembler::notZero, caller_not_deoptimized); |
1582 | 1582 |
1583 // Compute size of arguments for saving when returning to | 1583 // Compute size of arguments for saving when returning to |
1584 // deoptimized caller | 1584 // deoptimized caller |
1585 __ get_method(rax); | 1585 __ get_method(rax); |
1586 __ load_unsigned_word(rax, Address(rax, in_bytes(methodOopDesc:: | 1586 __ load_unsigned_short(rax, Address(rax, in_bytes(methodOopDesc:: |
1587 size_of_parameters_offset()))); | 1587 size_of_parameters_offset()))); |
1588 __ shll(rax, Interpreter::logStackElementSize()); | 1588 __ shll(rax, Interpreter::logStackElementSize()); |
1589 __ restore_locals(); // XXX do we need this? | 1589 __ restore_locals(); // XXX do we need this? |
1590 __ subptr(r14, rax); | 1590 __ subptr(r14, rax); |
1591 __ addptr(r14, wordSize); | 1591 __ addptr(r14, wordSize); |