hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.hpp
changeset 1066 717c3345024f
parent 1 489c9b5090e2
child 1217 5eb97f366a6a
equal deleted inserted replaced
1065:dbeb68f8a0ee 1066:717c3345024f
    92   void set_rsp_offset(int n) { _rsp_offset = n; }
    92   void set_rsp_offset(int n) { _rsp_offset = n; }
    93 
    93 
    94   // Note: NEVER push values directly, but only through following push_xxx functions;
    94   // Note: NEVER push values directly, but only through following push_xxx functions;
    95   //       This helps us to track the rsp changes compared to the entry rsp (->_rsp_offset)
    95   //       This helps us to track the rsp changes compared to the entry rsp (->_rsp_offset)
    96 
    96 
    97   void push_jint (jint i)     { _rsp_offset++; pushl(i); }
    97   void push_jint (jint i)     { _rsp_offset++; push(i); }
    98   void push_oop  (jobject o)  { _rsp_offset++; pushoop(o); }
    98   void push_oop  (jobject o)  { _rsp_offset++; pushoop(o); }
    99   void push_addr (Address a)  { _rsp_offset++; pushl(a); }
    99   // Seems to always be in wordSize
   100   void push_reg  (Register r) { _rsp_offset++; pushl(r); }
   100   void push_addr (Address a)  { _rsp_offset++; pushptr(a); }
   101   void pop       (Register r) { _rsp_offset--; popl (r); assert(_rsp_offset >= 0, "stack offset underflow"); }
   101   void push_reg  (Register r) { _rsp_offset++; push(r); }
       
   102   void pop_reg   (Register r) { _rsp_offset--; pop(r); assert(_rsp_offset >= 0, "stack offset underflow"); }
   102 
   103 
   103   void dec_stack (int nof_words) {
   104   void dec_stack (int nof_words) {
   104     _rsp_offset -= nof_words;
   105     _rsp_offset -= nof_words;
   105     assert(_rsp_offset >= 0, "stack offset underflow");
   106     assert(_rsp_offset >= 0, "stack offset underflow");
   106     addl(rsp, wordSize * nof_words);
   107     addptr(rsp, wordSize * nof_words);
   107   }
   108   }
   108 
   109 
   109   void dec_stack_after_call (int nof_words) {
   110   void dec_stack_after_call (int nof_words) {
   110     _rsp_offset -= nof_words;
   111     _rsp_offset -= nof_words;
   111     assert(_rsp_offset >= 0, "stack offset underflow");
   112     assert(_rsp_offset >= 0, "stack offset underflow");