Mercurial > hg > truffle
comparison src/cpu/x86/vm/cppInterpreter_x86.cpp @ 7212:291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 14 Dec 2012 14:35:13 +0100 |
parents | d2f8c38e543d |
children | fd74228fd5ca |
comparison
equal
deleted
inserted
replaced
7163:2ed8d74e5984 | 7212:291ffc492eb6 |
---|---|
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "asm/assembler.hpp" | 26 #include "asm/macroAssembler.hpp" |
27 #include "interpreter/bytecodeHistogram.hpp" | 27 #include "interpreter/bytecodeHistogram.hpp" |
28 #include "interpreter/cppInterpreter.hpp" | 28 #include "interpreter/cppInterpreter.hpp" |
29 #include "interpreter/interpreter.hpp" | 29 #include "interpreter/interpreter.hpp" |
30 #include "interpreter/interpreterGenerator.hpp" | 30 #include "interpreter/interpreterGenerator.hpp" |
31 #include "interpreter/interpreterRuntime.hpp" | 31 #include "interpreter/interpreterRuntime.hpp" |
536 __ subptr(rsp, wordSize); // pre-push stack | 536 __ subptr(rsp, wordSize); // pre-push stack |
537 __ movptr(STATE(_stack), rsp); // set current expression stack tos | 537 __ movptr(STATE(_stack), rsp); // set current expression stack tos |
538 | 538 |
539 // compute full expression stack limit | 539 // compute full expression stack limit |
540 | 540 |
541 const Address size_of_stack (rbx, Method::max_stack_offset()); | |
542 const int extra_stack = 0; //6815692//Method::extra_stack_words(); | 541 const int extra_stack = 0; //6815692//Method::extra_stack_words(); |
543 __ load_unsigned_short(rdx, size_of_stack); // get size of expression stack in words | 542 __ movptr(rdx, Address(rbx, Method::const_offset())); |
543 __ load_unsigned_short(rdx, Address(rdx, ConstMethod::max_stack_offset())); // get size of expression stack in words | |
544 __ negptr(rdx); // so we can subtract in next step | 544 __ negptr(rdx); // so we can subtract in next step |
545 // Allocate expression stack | 545 // Allocate expression stack |
546 __ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack)); | 546 __ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack)); |
547 __ movptr(STATE(_stack_limit), rsp); | 547 __ movptr(STATE(_stack_limit), rsp); |
548 } | 548 } |
680 | 680 |
681 const Address stack_base(thread, Thread::stack_base_offset()); | 681 const Address stack_base(thread, Thread::stack_base_offset()); |
682 const Address stack_size(thread, Thread::stack_size_offset()); | 682 const Address stack_size(thread, Thread::stack_size_offset()); |
683 | 683 |
684 // locals + overhead, in bytes | 684 // locals + overhead, in bytes |
685 const Address size_of_stack (rbx, Method::max_stack_offset()); | 685 // Always give one monitor to allow us to start interp if sync method. |
686 // Always give one monitor to allow us to start interp if sync method. | 686 // Any additional monitors need a check when moving the expression stack |
687 // Any additional monitors need a check when moving the expression stack | 687 const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize; |
688 const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize; | 688 const int extra_stack = 0; //6815692//Method::extra_stack_entries(); |
689 const int extra_stack = 0; //6815692//Method::extra_stack_entries(); | 689 __ movptr(rax, Address(rbx, Method::const_offset())); |
690 __ load_unsigned_short(rax, size_of_stack); // get size of expression stack in words | 690 __ load_unsigned_short(rax, Address(rax, ConstMethod::max_stack_offset())); // get size of expression stack in words |
691 __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor)); | 691 __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor)); |
692 __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size)); | 692 __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size)); |
693 | 693 |
694 #ifdef ASSERT | 694 #ifdef ASSERT |
695 Label stack_base_okay, stack_size_okay; | 695 Label stack_base_okay, stack_size_okay; |