< prev index next >

src/hotspot/cpu/x86/frame_x86.hpp

Print this page

 99   };
100 
101   intptr_t ptr_at(int offset) const {
102     return *ptr_at_addr(offset);
103   }
104 
105   void ptr_at_put(int offset, intptr_t value) {
106     *ptr_at_addr(offset) = value;
107   }
108 
109  private:
110   // an additional field beyond _sp and _pc:
111   intptr_t*   _fp; // frame pointer
112   // The interpreter and adapters will extend the frame of the caller.
113   // Since oopMaps are based on the sp of the caller before extension
114   // we need to know that value. However in order to compute the address
115   // of the return address we need the real "raw" sp. By convention we
116   // use sp() to mean "raw" sp and unextended_sp() to mean the caller's
117   // original sp.
118 
119   intptr_t*     _unextended_sp;

120   void adjust_unextended_sp() NOT_DEBUG_RETURN;
121 
122   intptr_t* ptr_at_addr(int offset) const {
123     return (intptr_t*) addr_at(offset);
124   }
125 
126 #ifdef ASSERT
127   // Used in frame::sender_for_{interpreter,compiled}_frame
128   static void verify_deopt_original_pc(CompiledMethod* nm, intptr_t* unextended_sp);
129 #endif
130 


131  public:
132   // Constructors
133 
134   frame(intptr_t* sp, intptr_t* fp, address pc);
135 
136   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
137 






138   frame(intptr_t* sp, intptr_t* fp);
139 
140   void init(intptr_t* sp, intptr_t* fp, address pc);

141 
142   // accessors for the instance variables
143   // Note: not necessarily the real 'frame pointer' (see real_fp)
144   intptr_t*   fp() const { return _fp; }



145 
146   inline address* sender_pc_addr() const;
147 
148   // expression stack tos if we are nested in a java call

149   intptr_t* interpreter_frame_last_sp() const;
150 
151   // helper to update a map with callee-saved RBP
152   static void update_map_with_saved_link(RegisterMap* map, intptr_t** link_addr);



153 
154   // deoptimization support
155   void interpreter_frame_set_last_sp(intptr_t* sp);
156 
157   static jint interpreter_frame_expression_stack_direction() { return -1; }
158 
159   // returns the sending frame, without applying any barriers
160   frame sender_raw(RegisterMap* map) const;
161 
162 #endif // CPU_X86_FRAME_X86_HPP

 99   };
100 
101   intptr_t ptr_at(int offset) const {
102     return *ptr_at_addr(offset);
103   }
104 
105   void ptr_at_put(int offset, intptr_t value) {
106     *ptr_at_addr(offset) = value;
107   }
108 
109  private:
110   // an additional field beyond _sp and _pc:
111   intptr_t*   _fp; // frame pointer
112   // The interpreter and adapters will extend the frame of the caller.
113   // Since oopMaps are based on the sp of the caller before extension
114   // we need to know that value. However in order to compute the address
115   // of the return address we need the real "raw" sp. By convention we
116   // use sp() to mean "raw" sp and unextended_sp() to mean the caller's
117   // original sp.
118 
119   intptr_t* _unextended_sp;
120 
121   void adjust_unextended_sp() NOT_DEBUG_RETURN;
122 
123   intptr_t* ptr_at_addr(int offset) const {
124     return (intptr_t*) addr_at(offset);
125   }
126 
127 #ifdef ASSERT
128   // Used in frame::sender_for_{interpreter,compiled}_frame
129   static void verify_deopt_original_pc(CompiledMethod* nm, intptr_t* unextended_sp);
130 #endif
131 
132   const ImmutableOopMap* get_oop_map() const;
133 
134  public:
135   // Constructors
136 
137   frame(intptr_t* sp, intptr_t* fp, address pc);
138 
139   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
140 
141   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb);
142 
143   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map);
144 
145   frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool dummy); // used for fast frame construction by continuations
146 
147   frame(intptr_t* sp, intptr_t* fp);
148 
149   void init(intptr_t* sp, intptr_t* fp, address pc);
150   void setup(address pc);
151 
152   // accessors for the instance variables
153   // Note: not necessarily the real 'frame pointer' (see real_fp)
154   intptr_t* fp() const { return _fp; }
155   void set_fp(intptr_t* newfp) { _fp = newfp; }
156   int offset_fp() const { return (int)(intptr_t)_fp; }
157   void set_offset_fp(int value) { _fp = (intptr_t*)(intptr_t)value; }
158 
159   inline address* sender_pc_addr() const;
160 
161   // expression stack tos if we are nested in a java call
162   template <bool relative = false>
163   intptr_t* interpreter_frame_last_sp() const;
164 
165   // helper to update a map with callee-saved RBP
166   template <typename RegisterMapT>
167   static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);
168   template <typename RegisterMapT>
169   static intptr_t** saved_link_address(const RegisterMapT* map);
170 
171   // deoptimization support
172   void interpreter_frame_set_last_sp(intptr_t* sp);
173 
174   static jint interpreter_frame_expression_stack_direction() { return -1; }
175 
176   // returns the sending frame, without applying any barriers
177   inline frame sender_raw(RegisterMap* map) const;
178 
179 #endif // CPU_X86_FRAME_X86_HPP
< prev index next >