< prev index next >

src/hotspot/cpu/ppc/frame_ppc.inline.hpp

Print this page

 70 }
 71 
 72 // Accessors
 73 
 74 // Return unique id for this frame. The id must have a value where we
 75 // can distinguish identity and younger/older relationship. NULL
 76 // represents an invalid (incomparable) frame.
 77 inline intptr_t* frame::id(void) const {
 78   // Use _fp. _sp or _unextended_sp wouldn't be correct due to resizing.
 79   return _fp;
 80 }
 81 
 82 // Return true if this frame is older (less recent activation) than
 83 // the frame represented by id.
 84 inline bool frame::is_older(intptr_t* id) const {
 85    assert(this->id() != NULL && id != NULL, "NULL frame id");
 86    // Stack grows towards smaller addresses on ppc64.
 87    return this->id() > id;
 88 }
 89 
 90 inline int frame::frame_size(RegisterMap* map) const {
 91   // Stack grows towards smaller addresses on PPC64: sender is at a higher address.
 92   return sender_sp() - sp();
 93 }
 94 
 95 // Return the frame's stack pointer before it has been extended by a
 96 // c2i adapter. This is needed by deoptimization for ignoring c2i adapter
 97 // frames.
 98 inline intptr_t* frame::unextended_sp() const {
 99   return _unextended_sp;
100 }
101 
102 // All frames have this field.
103 inline address frame::sender_pc() const {
104   return (address)callers_abi()->lr;
105 }
106 inline address* frame::sender_pc_addr() const {
107   return (address*)&(callers_abi()->lr);
108 }
109 
110 // All frames have this field.

122 }
123 
124 // Template Interpreter frame value accessors.
125 
126 inline frame::ijava_state* frame::get_ijava_state() const {
127   return (ijava_state*) ((uintptr_t)fp() - ijava_state_size);
128 }
129 
130 inline intptr_t** frame::interpreter_frame_locals_addr() const {
131   return (intptr_t**) &(get_ijava_state()->locals);
132 }
133 
134 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
135   return (intptr_t*) &(get_ijava_state()->bcp);
136 }
137 
138 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
139   return (intptr_t*) &(get_ijava_state()->mdx);
140 }
141 
142 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
143 inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
144   return (BasicObjectLock*) get_ijava_state()->monitors;
145 }
146 
147 inline BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
148   return (BasicObjectLock*) get_ijava_state();
149 }
150 
151 // Return register stack slot addr at which currently interpreted method is found.
152 inline Method** frame::interpreter_frame_method_addr() const {
153   return (Method**) &(get_ijava_state()->method);
154 }
155 
156 inline oop* frame::interpreter_frame_mirror_addr() const {
157   return (oop*) &(get_ijava_state()->mirror);
158 }
159 
160 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
161   return (ConstantPoolCache**) &(get_ijava_state()->cpoolCache);
162 }
163 
164 inline oop* frame::interpreter_frame_temp_oop_addr() const {
165   return (oop*) &(get_ijava_state()->oop_tmp);
166 }
167 
168 inline intptr_t* frame::interpreter_frame_esp() const {
169   return (intptr_t*) get_ijava_state()->esp;
170 }
171 
172 // Convenient setters
173 inline void frame::interpreter_frame_set_monitor_end(BasicObjectLock* end)    { get_ijava_state()->monitors = (intptr_t) end;}
174 inline void frame::interpreter_frame_set_cpcache(ConstantPoolCache* cp)       { *interpreter_frame_cache_addr() = cp; }
175 inline void frame::interpreter_frame_set_esp(intptr_t* esp)                   { get_ijava_state()->esp = (intptr_t) esp; }
176 inline void frame::interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp) { get_ijava_state()->top_frame_sp = (intptr_t) top_frame_sp; }
177 inline void frame::interpreter_frame_set_sender_sp(intptr_t* sender_sp)       { get_ijava_state()->sender_sp = (intptr_t) sender_sp; }
178 

179 inline intptr_t* frame::interpreter_frame_expression_stack() const {
180   return (intptr_t*)interpreter_frame_monitor_end() - 1;
181 }
182 
183 // top of expression stack

184 inline intptr_t* frame::interpreter_frame_tos_address() const {
185   return ((intptr_t*) get_ijava_state()->esp) + Interpreter::stackElementWords;
186 }
187 
188 inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
189   return &interpreter_frame_tos_address()[offset];
190 }
191 
192 inline int frame::interpreter_frame_monitor_size() {
193   // Number of stack slots for a monitor.
194   return align_up(BasicObjectLock::size(),  // number of stack slots
195                   WordsPerLong);            // number of stack slots for a Java long
196 }
197 
198 inline int frame::interpreter_frame_monitor_size_in_bytes() {
199   return frame::interpreter_frame_monitor_size() * wordSize;
200 }
201 
202 // entry frames
203 
204 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
205   // Since an entry frame always calls the interpreter first, the
206   // parameters are on the stack and relative to known register in the
207   // entry frame.
208   intptr_t* tos = (intptr_t*)get_entry_frame_locals()->arguments_tos_address;
209   return &tos[offset + 1]; // prepushed tos
210 }
211 
212 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
213   return (JavaCallWrapper**)&get_entry_frame_locals()->call_wrapper_address;
214 }
215 
216 inline oop frame::saved_oop_result(RegisterMap* map) const {
217   return *((oop*)map->location(R3->as_VMReg()));
218 }
219 
220 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
221   *((oop*)map->location(R3->as_VMReg())) = obj;
















































222 }
223 
224 #endif // CPU_PPC_FRAME_PPC_INLINE_HPP

 70 }
 71 
 72 // Accessors
 73 
 74 // Return unique id for this frame. The id must have a value where we
 75 // can distinguish identity and younger/older relationship. NULL
 76 // represents an invalid (incomparable) frame.
 77 inline intptr_t* frame::id(void) const {
 78   // Use _fp. _sp or _unextended_sp wouldn't be correct due to resizing.
 79   return _fp;
 80 }
 81 
 82 // Return true if this frame is older (less recent activation) than
 83 // the frame represented by id.
 84 inline bool frame::is_older(intptr_t* id) const {
 85    assert(this->id() != NULL && id != NULL, "NULL frame id");
 86    // Stack grows towards smaller addresses on ppc64.
 87    return this->id() > id;
 88 }
 89 
 90 inline int frame::frame_size() const {
 91   // Stack grows towards smaller addresses on PPC64: sender is at a higher address.
 92   return sender_sp() - sp();
 93 }
 94 
 95 // Return the frame's stack pointer before it has been extended by a
 96 // c2i adapter. This is needed by deoptimization for ignoring c2i adapter
 97 // frames.
 98 inline intptr_t* frame::unextended_sp() const {
 99   return _unextended_sp;
100 }
101 
102 // All frames have this field.
103 inline address frame::sender_pc() const {
104   return (address)callers_abi()->lr;
105 }
106 inline address* frame::sender_pc_addr() const {
107   return (address*)&(callers_abi()->lr);
108 }
109 
110 // All frames have this field.

122 }
123 
124 // Template Interpreter frame value accessors.
125 
126 inline frame::ijava_state* frame::get_ijava_state() const {
127   return (ijava_state*) ((uintptr_t)fp() - ijava_state_size);
128 }
129 
130 inline intptr_t** frame::interpreter_frame_locals_addr() const {
131   return (intptr_t**) &(get_ijava_state()->locals);
132 }
133 
134 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
135   return (intptr_t*) &(get_ijava_state()->bcp);
136 }
137 
138 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
139   return (intptr_t*) &(get_ijava_state()->mdx);
140 }
141 





142 inline BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
143   return (BasicObjectLock*) get_ijava_state();
144 }
145 
146 // Return register stack slot addr at which currently interpreted method is found.
147 inline Method** frame::interpreter_frame_method_addr() const {
148   return (Method**) &(get_ijava_state()->method);
149 }
150 
151 inline oop* frame::interpreter_frame_mirror_addr() const {
152   return (oop*) &(get_ijava_state()->mirror);
153 }
154 
155 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
156   return (ConstantPoolCache**) &(get_ijava_state()->cpoolCache);
157 }
158 
159 inline oop* frame::interpreter_frame_temp_oop_addr() const {
160   return (oop*) &(get_ijava_state()->oop_tmp);
161 }
162 
163 inline intptr_t* frame::interpreter_frame_esp() const {
164   return (intptr_t*) get_ijava_state()->esp;
165 }
166 
167 // Convenient setters
168 inline void frame::interpreter_frame_set_monitor_end(BasicObjectLock* end)    { get_ijava_state()->monitors = (intptr_t) end;}
169 inline void frame::interpreter_frame_set_cpcache(ConstantPoolCache* cp)       { *interpreter_frame_cache_addr() = cp; }
170 inline void frame::interpreter_frame_set_esp(intptr_t* esp)                   { get_ijava_state()->esp = (intptr_t) esp; }
171 inline void frame::interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp) { get_ijava_state()->top_frame_sp = (intptr_t) top_frame_sp; }
172 inline void frame::interpreter_frame_set_sender_sp(intptr_t* sender_sp)       { get_ijava_state()->sender_sp = (intptr_t) sender_sp; }
173 
174 template <bool relative>
175 inline intptr_t* frame::interpreter_frame_expression_stack() const {
176   return (intptr_t*)interpreter_frame_monitor_end() - 1;
177 }
178 
179 // top of expression stack
180 template <bool relative>
181 inline intptr_t* frame::interpreter_frame_tos_address() const {
182   return ((intptr_t*) get_ijava_state()->esp) + Interpreter::stackElementWords;
183 }
184 




185 inline int frame::interpreter_frame_monitor_size() {
186   // Number of stack slots for a monitor.
187   return align_up(BasicObjectLock::size(),  // number of stack slots
188                   WordsPerLong);            // number of stack slots for a Java long
189 }
190 
191 inline int frame::interpreter_frame_monitor_size_in_bytes() {
192   return frame::interpreter_frame_monitor_size() * wordSize;
193 }
194 
195 // entry frames
196 
197 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
198   // Since an entry frame always calls the interpreter first, the
199   // parameters are on the stack and relative to known register in the
200   // entry frame.
201   intptr_t* tos = (intptr_t*)get_entry_frame_locals()->arguments_tos_address;
202   return &tos[offset + 1]; // prepushed tos
203 }
204 
205 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
206   return (JavaCallWrapper**)&get_entry_frame_locals()->call_wrapper_address;
207 }
208 
209 inline oop frame::saved_oop_result(RegisterMap* map) const {
210   return *((oop*)map->location(R3->as_VMReg(), (intptr_t*) NULL));
211 }
212 
213 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
214   *((oop*)map->location(R3->as_VMReg(), (intptr_t*) NULL)) = obj;
215 }
216 
217 inline const ImmutableOopMap* frame::get_oop_map() const {
218   Unimplemented();
219   return NULL;
220 }
221 
222 inline int frame::compiled_frame_stack_argsize() const {
223   Unimplemented();
224   return 0;
225 }
226 
227 inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
228   Unimplemented();
229 }
230 
231 inline int frame::interpreted_frame_num_oops(InterpreterOopMap* mask) const {
232   Unimplemented();
233   return 0;
234 }
235 
236 template <bool relative>
237 inline intptr_t* frame::interpreter_frame_last_sp() const {
238   Unimplemented();
239   return NULL;
240 }
241 
242 inline int frame::sender_sp_ret_address_offset() {
243   Unimplemented();
244   return 0;
245 }
246 
247 template <typename RegisterMapT>
248 void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
249   Unimplemented();
250 }
251 
252 inline void frame::set_unextended_sp(intptr_t* value) {
253   Unimplemented();
254 }
255 
256 inline int frame::offset_unextended_sp() const {
257   Unimplemented();
258   return 0;
259 }
260 
261 inline void frame::set_offset_unextended_sp(int value) {
262   Unimplemented();
263 }
264 
265 #endif // CPU_PPC_FRAME_PPC_INLINE_HPP
< prev index next >