Mercurial > hg > truffle
comparison src/cpu/x86/vm/templateInterpreter_x86_32.cpp @ 628:7bb995fbd3c0
Merge
author | trims |
---|---|
date | Thu, 12 Mar 2009 18:16:36 -0700 |
parents | 0fbdb4381b99 56aae7be60d4 |
children | e5b0439ef4ae |
comparison
equal
deleted
inserted
replaced
580:ce2272390558 | 628:7bb995fbd3c0 |
---|---|
660 __ jmp(xreturn_path); | 660 __ jmp(xreturn_path); |
661 | 661 |
662 __ bind(notByte); | 662 __ bind(notByte); |
663 __ cmpl(rdx, stos); | 663 __ cmpl(rdx, stos); |
664 __ jcc(Assembler::notEqual, notShort); | 664 __ jcc(Assembler::notEqual, notShort); |
665 __ load_signed_word(rax, field_address); | 665 __ load_signed_short(rax, field_address); |
666 __ jmp(xreturn_path); | 666 __ jmp(xreturn_path); |
667 | 667 |
668 __ bind(notShort); | 668 __ bind(notShort); |
669 __ cmpl(rdx, ctos); | 669 __ cmpl(rdx, ctos); |
670 __ jcc(Assembler::notEqual, notChar); | 670 __ jcc(Assembler::notEqual, notChar); |
671 __ load_unsigned_word(rax, field_address); | 671 __ load_unsigned_short(rax, field_address); |
672 __ jmp(xreturn_path); | 672 __ jmp(xreturn_path); |
673 | 673 |
674 __ bind(notChar); | 674 __ bind(notChar); |
675 #ifdef ASSERT | 675 #ifdef ASSERT |
676 Label okay; | 676 Label okay; |
721 const Address size_of_parameters(rbx, methodOopDesc::size_of_parameters_offset()); | 721 const Address size_of_parameters(rbx, methodOopDesc::size_of_parameters_offset()); |
722 const Address invocation_counter(rbx, methodOopDesc::invocation_counter_offset() + InvocationCounter::counter_offset()); | 722 const Address invocation_counter(rbx, methodOopDesc::invocation_counter_offset() + InvocationCounter::counter_offset()); |
723 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); | 723 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); |
724 | 724 |
725 // get parameter size (always needed) | 725 // get parameter size (always needed) |
726 __ load_unsigned_word(rcx, size_of_parameters); | 726 __ load_unsigned_short(rcx, size_of_parameters); |
727 | 727 |
728 // native calls don't need the stack size check since they have no expression stack | 728 // native calls don't need the stack size check since they have no expression stack |
729 // and the arguments are already on the stack and we only add a handful of words | 729 // and the arguments are already on the stack and we only add a handful of words |
730 // to the stack | 730 // to the stack |
731 | 731 |
836 const Register t = rcx; | 836 const Register t = rcx; |
837 | 837 |
838 // allocate space for parameters | 838 // allocate space for parameters |
839 __ get_method(method); | 839 __ get_method(method); |
840 __ verify_oop(method); | 840 __ verify_oop(method); |
841 __ load_unsigned_word(t, Address(method, methodOopDesc::size_of_parameters_offset())); | 841 __ load_unsigned_short(t, Address(method, methodOopDesc::size_of_parameters_offset())); |
842 __ shlptr(t, Interpreter::logStackElementSize()); | 842 __ shlptr(t, Interpreter::logStackElementSize()); |
843 __ addptr(t, 2*wordSize); // allocate two more slots for JNIEnv and possible mirror | 843 __ addptr(t, 2*wordSize); // allocate two more slots for JNIEnv and possible mirror |
844 __ subptr(rsp, t); | 844 __ subptr(rsp, t); |
845 __ andptr(rsp, -(StackAlignmentInBytes)); // gcc needs 16 byte aligned stacks to do XMM intrinsics | 845 __ andptr(rsp, -(StackAlignmentInBytes)); // gcc needs 16 byte aligned stacks to do XMM intrinsics |
846 | 846 |
1153 const Address size_of_locals (rbx, methodOopDesc::size_of_locals_offset()); | 1153 const Address size_of_locals (rbx, methodOopDesc::size_of_locals_offset()); |
1154 const Address invocation_counter(rbx, methodOopDesc::invocation_counter_offset() + InvocationCounter::counter_offset()); | 1154 const Address invocation_counter(rbx, methodOopDesc::invocation_counter_offset() + InvocationCounter::counter_offset()); |
1155 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); | 1155 const Address access_flags (rbx, methodOopDesc::access_flags_offset()); |
1156 | 1156 |
1157 // get parameter size (always needed) | 1157 // get parameter size (always needed) |
1158 __ load_unsigned_word(rcx, size_of_parameters); | 1158 __ load_unsigned_short(rcx, size_of_parameters); |
1159 | 1159 |
1160 // rbx,: methodOop | 1160 // rbx,: methodOop |
1161 // rcx: size of parameters | 1161 // rcx: size of parameters |
1162 | 1162 |
1163 // rsi: sender_sp (could differ from sp+wordSize if we were called via c2i ) | 1163 // rsi: sender_sp (could differ from sp+wordSize if we were called via c2i ) |
1164 | 1164 |
1165 __ load_unsigned_word(rdx, size_of_locals); // get size of locals in words | 1165 __ load_unsigned_short(rdx, size_of_locals); // get size of locals in words |
1166 __ subl(rdx, rcx); // rdx = no. of additional locals | 1166 __ subl(rdx, rcx); // rdx = no. of additional locals |
1167 | 1167 |
1168 // see if we've got enough room on the stack for locals plus overhead. | 1168 // see if we've got enough room on the stack for locals plus overhead. |
1169 generate_stack_overflow_check(); | 1169 generate_stack_overflow_check(); |
1170 | 1170 |
1556 __ jcc(Assembler::notZero, caller_not_deoptimized); | 1556 __ jcc(Assembler::notZero, caller_not_deoptimized); |
1557 | 1557 |
1558 // Compute size of arguments for saving when returning to deoptimized caller | 1558 // Compute size of arguments for saving when returning to deoptimized caller |
1559 __ get_method(rax); | 1559 __ get_method(rax); |
1560 __ verify_oop(rax); | 1560 __ verify_oop(rax); |
1561 __ load_unsigned_word(rax, Address(rax, in_bytes(methodOopDesc::size_of_parameters_offset()))); | 1561 __ load_unsigned_short(rax, Address(rax, in_bytes(methodOopDesc::size_of_parameters_offset()))); |
1562 __ shlptr(rax, Interpreter::logStackElementSize()); | 1562 __ shlptr(rax, Interpreter::logStackElementSize()); |
1563 __ restore_locals(); | 1563 __ restore_locals(); |
1564 __ subptr(rdi, rax); | 1564 __ subptr(rdi, rax); |
1565 __ addptr(rdi, wordSize); | 1565 __ addptr(rdi, wordSize); |
1566 // Save these arguments | 1566 // Save these arguments |