< prev index next >

src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp

Print this page

157   } else if (reg != noreg) {
158     __ add(r0, from(), Interpreter::local_offset_in_bytes(offset()));
159     __ mov(reg, 0);
160     __ ldr(temp(), r0);
161     Label L;
162     __ cbz(temp(), L);
163     __ mov(reg, r0);
164     __ bind(L);
165   } else {
166     __ add(r0, from(), Interpreter::local_offset_in_bytes(offset()));
167     __ ldr(temp(), r0);
168     Label L;
169     __ cbnz(temp(), L);
170     __ mov(r0, zr);
171     __ bind(L);
172     static_assert(sizeof(jobject) == wordSize, "");
173     __ str(r0, Address(to(), next_stack_offset(sizeof(jobject))));
174   }
175 }
176 




177 void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) {
178   // generate code to handle arguments
179   iterate(fingerprint);
180 
181   // return result handler
182   __ lea(r0, ExternalAddress(Interpreter::result_handler(method()->result_type())));
183   __ ret(lr);
184 
185   __ flush();
186 }
187 
188 
189 // Implementation of SignatureHandlerLibrary
190 
191 void SignatureHandlerLibrary::pd_set_handler(address handler) {}
192 
193 
194 class SlowSignatureHandler
195   : public NativeSignatureIterator {
196  private:

241     jbyte value = *(jbyte*)single_slot_addr();
242     if (pass_gpr(value) < 0) {
243       pass_stack<>(value);
244     }
245   }
246 
247   virtual void pass_short() {
248     jshort value = *(jshort*)single_slot_addr();
249     if (pass_gpr(value) < 0) {
250       pass_stack<>(value);
251     }
252   }
253 
254   virtual void pass_int() {
255     jint value = *(jint*)single_slot_addr();
256     if (pass_gpr(value) < 0) {
257       pass_stack<>(value);
258     }
259   }
260 





261   virtual void pass_long() {
262     intptr_t value = *double_slot_addr();
263     if (pass_gpr(value) < 0) {
264       pass_stack<>(value);
265     }
266   }
267 
268   virtual void pass_object() {
269     intptr_t* addr = single_slot_addr();
270     intptr_t value = *addr == 0 ? NULL : (intptr_t)addr;
271     if (pass_gpr(value) < 0) {
272       pass_stack<>(value);
273     }
274   }
275 
276   virtual void pass_float() {
277     jint value = *(jint*)single_slot_addr();
278     if (pass_fpr(value) < 0) {
279       pass_stack<>(value);
280     }

157   } else if (reg != noreg) {
158     __ add(r0, from(), Interpreter::local_offset_in_bytes(offset()));
159     __ mov(reg, 0);
160     __ ldr(temp(), r0);
161     Label L;
162     __ cbz(temp(), L);
163     __ mov(reg, r0);
164     __ bind(L);
165   } else {
166     __ add(r0, from(), Interpreter::local_offset_in_bytes(offset()));
167     __ ldr(temp(), r0);
168     Label L;
169     __ cbnz(temp(), L);
170     __ mov(r0, zr);
171     __ bind(L);
172     static_assert(sizeof(jobject) == wordSize, "");
173     __ str(r0, Address(to(), next_stack_offset(sizeof(jobject))));
174   }
175 }
176 
177 void InterpreterRuntime::SignatureHandlerGenerator::pass_valuetype() {
178    pass_object();
179 }
180 
181 void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) {
182   // generate code to handle arguments
183   iterate(fingerprint);
184 
185   // return result handler
186   __ lea(r0, ExternalAddress(Interpreter::result_handler(method()->result_type())));
187   __ ret(lr);
188 
189   __ flush();
190 }
191 
192 
193 // Implementation of SignatureHandlerLibrary
194 
195 void SignatureHandlerLibrary::pd_set_handler(address handler) {}
196 
197 
198 class SlowSignatureHandler
199   : public NativeSignatureIterator {
200  private:

245     jbyte value = *(jbyte*)single_slot_addr();
246     if (pass_gpr(value) < 0) {
247       pass_stack<>(value);
248     }
249   }
250 
251   virtual void pass_short() {
252     jshort value = *(jshort*)single_slot_addr();
253     if (pass_gpr(value) < 0) {
254       pass_stack<>(value);
255     }
256   }
257 
258   virtual void pass_int() {
259     jint value = *(jint*)single_slot_addr();
260     if (pass_gpr(value) < 0) {
261       pass_stack<>(value);
262     }
263   }
264 
265   virtual void pass_valuetype() {
266     // values are handled with oops, like objects
267     pass_object();
268   }
269 
270   virtual void pass_long() {
271     intptr_t value = *double_slot_addr();
272     if (pass_gpr(value) < 0) {
273       pass_stack<>(value);
274     }
275   }
276 
277   virtual void pass_object() {
278     intptr_t* addr = single_slot_addr();
279     intptr_t value = *addr == 0 ? NULL : (intptr_t)addr;
280     if (pass_gpr(value) < 0) {
281       pass_stack<>(value);
282     }
283   }
284 
285   virtual void pass_float() {
286     jint value = *(jint*)single_slot_addr();
287     if (pass_fpr(value) < 0) {
288       pass_stack<>(value);
289     }
< prev index next >