hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp
changeset 14586 1262473e8fc1
parent 13743 154102966e74
child 14633 58caa6fc3b7c
equal deleted inserted replaced
14568:e601a3059a10 14586:1262473e8fc1
   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;