< prev index next >

src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp

Print this page

195   __ lookup_interface_method(// inputs: rec. class, interface
196                              recv_klass_reg, resolved_klass_reg, noreg,
197                              // outputs:  scan temp. reg1, scan temp. reg2
198                              temp_reg2, temp_reg,
199                              L_no_such_interface,
200                              /*return_method=*/false);
201 
202   const ptrdiff_t  typecheckSize = __ pc() - start_pc;
203   start_pc = __ pc();
204 
205   // Get selected method from declaring class and itable index
206   __ lookup_interface_method(// inputs: rec. class, interface, itable index
207                              recv_klass_reg, holder_klass_reg, itable_index,
208                              // outputs: method, scan temp. reg
209                              rmethod, temp_reg,
210                              L_no_such_interface);
211 
212   const ptrdiff_t lookupSize = __ pc() - start_pc;
213 
214   // Reduce "estimate" such that "padding" does not drop below 8.
215   const ptrdiff_t estimate = 124;
216   const ptrdiff_t codesize = typecheckSize + lookupSize;
217   slop_delta  = (int)(estimate - codesize);
218   slop_bytes += slop_delta;
219   assert(slop_delta >= 0, "itable #%d: Code size estimate (%d) for lookup_interface_method too small, required: %d", itable_index, (int)estimate, (int)codesize);
220 
221 #ifdef ASSERT
222   if (DebugVtables) {
223     Label L2;
224     __ cbz(rmethod, L2);
225     __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
226     __ cbnz(rscratch1, L2);
227     __ stop("compiler entrypoint is null");
228     __ bind(L2);
229   }
230 #endif // ASSERT
231 
232   // rmethod: Method*
233   // j_rarg0: receiver
234   address ame_addr = __ pc();
235   __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));

195   __ lookup_interface_method(// inputs: rec. class, interface
196                              recv_klass_reg, resolved_klass_reg, noreg,
197                              // outputs:  scan temp. reg1, scan temp. reg2
198                              temp_reg2, temp_reg,
199                              L_no_such_interface,
200                              /*return_method=*/false);
201 
202   const ptrdiff_t  typecheckSize = __ pc() - start_pc;
203   start_pc = __ pc();
204 
205   // Get selected method from declaring class and itable index
206   __ lookup_interface_method(// inputs: rec. class, interface, itable index
207                              recv_klass_reg, holder_klass_reg, itable_index,
208                              // outputs: method, scan temp. reg
209                              rmethod, temp_reg,
210                              L_no_such_interface);
211 
212   const ptrdiff_t lookupSize = __ pc() - start_pc;
213 
214   // Reduce "estimate" such that "padding" does not drop below 8.
215   const ptrdiff_t estimate = 168;
216   const ptrdiff_t codesize = typecheckSize + lookupSize;
217   slop_delta  = (int)(estimate - codesize);
218   slop_bytes += slop_delta;
219   assert(slop_delta >= 0, "itable #%d: Code size estimate (%d) for lookup_interface_method too small, required: %d", itable_index, (int)estimate, (int)codesize);
220 
221 #ifdef ASSERT
222   if (DebugVtables) {
223     Label L2;
224     __ cbz(rmethod, L2);
225     __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
226     __ cbnz(rscratch1, L2);
227     __ stop("compiler entrypoint is null");
228     __ bind(L2);
229   }
230 #endif // ASSERT
231 
232   // rmethod: Method*
233   // j_rarg0: receiver
234   address ame_addr = __ pc();
235   __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
< prev index next >