< prev index next >

src/hotspot/cpu/arm/templateTable_arm.cpp

Print this page




4183 void TemplateTable::fast_invokevfinal(int byte_no) {
4184   transition(vtos, vtos);
4185   assert(byte_no == f2_byte, "use this argument");
4186   __ stop("fast_invokevfinal is not used on ARM");
4187 }
4188 
4189 
4190 void TemplateTable::invokeinterface(int byte_no) {
4191   transition(vtos, vtos);
4192   assert(byte_no == f1_byte, "use this argument");
4193 
4194   const Register Ritable = R1_tmp;
4195   const Register Rrecv   = R2_tmp;
4196   const Register Rinterf = R5_tmp;
4197   const Register Rindex  = R4_tmp;
4198   const Register Rflags  = R3_tmp;
4199   const Register Rklass  = R3_tmp;
4200 
4201   prepare_invoke(byte_no, Rinterf, Rmethod, Rrecv, Rflags);
4202 



4203   // Check for private method invocation - indicated by vfinal
4204   Label notVFinal;
4205   __ tbz(flags, ConstantPoolCacheEntry::is_vfinal_shift, notVFinal);
4206 
4207   // do the call - the index is actually the method to call

4208 
4209   __ null_check(Rrecv, Rtemp);






4210 
4211   __ profile_final_call(R0_tmp);
4212   __ jump_from_interpreted(Rindex);
4213 
4214   __ bind(notVFinal);
4215 



4216   // Special case of invokeinterface called for virtual method of
4217   // java.lang.Object.  See cpCacheOop.cpp for details.
4218   // This code isn't produced by javac, but could be produced by
4219   // another compliant java compiler.
4220   Label notMethod;
4221   __ tbz(Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod);
4222 
4223   invokevirtual_helper(Rmethod, Rrecv, Rflags);
4224   __ bind(notMethod);
4225 
4226   // Get receiver klass into Rklass - also a null check
4227   __ load_klass(Rklass, Rrecv);
4228 
4229   Label no_such_interface;
4230 
4231   // Receiver subtype check against REFC.
4232   __ lookup_interface_method(// inputs: rec. class, interface
4233                              Rklass, Rinterf, noreg,
4234                              // outputs:  scan temp. reg1, scan temp. reg2
4235                              noreg, Ritable, Rtemp,
4236                              no_such_interface);
4237 
4238   // profile this call
4239   __ profile_virtual_call(R0_tmp, Rklass);
4240 
4241   // Get declaring interface class from method
4242   __ ldr(Rtemp, Address(Rmethod, Method::const_offset()));
4243   __ ldr(Rtemp, Address(Rtemp, ConstMethod::constants_offset()));
4244   __ ldr(Rinterf, Address(Rtemp, ConstantPool::pool_holder_offset_in_bytes()));
4245 
4246   // Get itable index from method
4247   __ ldr_s32(Rtemp, Address(Rmethod, Method::itable_index_offset()));
4248   __ add(Rtemp, Rtemp, (-Method::itable_index_max)); // small negative constant is too large for an immediate on arm32
4249   __ neg(Rindex, Rtemp);




4183 void TemplateTable::fast_invokevfinal(int byte_no) {
4184   transition(vtos, vtos);
4185   assert(byte_no == f2_byte, "use this argument");
4186   __ stop("fast_invokevfinal is not used on ARM");
4187 }
4188 
4189 
4190 void TemplateTable::invokeinterface(int byte_no) {
4191   transition(vtos, vtos);
4192   assert(byte_no == f1_byte, "use this argument");
4193 
4194   const Register Ritable = R1_tmp;
4195   const Register Rrecv   = R2_tmp;
4196   const Register Rinterf = R5_tmp;
4197   const Register Rindex  = R4_tmp;
4198   const Register Rflags  = R3_tmp;
4199   const Register Rklass  = R3_tmp;
4200 
4201   prepare_invoke(byte_no, Rinterf, Rmethod, Rrecv, Rflags);
4202 
4203 
4204   Label no_such_interface;
4205 
4206   // Check for private method invocation - indicated by vfinal
4207   Label notVFinal;
4208   __ tbz(flags, ConstantPoolCacheEntry::is_vfinal_shift, notVFinal);
4209 
4210   // Get receiver klass into Rklass - also a null check
4211   __ load_klass(Rklass, Rrecv);
4212 
4213   Label subtype;
4214   __ check_klass_subtype(Rklass, Rinterf, R1_tmp, R0_tmp, subtype);
4215   // If we get here the typecheck failed
4216   __ b(no_such_interface);
4217   __ bind(subtype);
4218 
4219   // do the call - the index is actually the method to call
4220 
4221   __ profile_final_call(R0_tmp);
4222   __ jump_from_interpreted(Rindex);
4223 
4224   __ bind(notVFinal);
4225 
4226   // Get receiver klass into Rklass - also a null check
4227   __ load_klass(Rklass, Rrecv);
4228 
4229   // Special case of invokeinterface called for virtual method of
4230   // java.lang.Object.  See cpCacheOop.cpp for details.
4231   // This code isn't produced by javac, but could be produced by
4232   // another compliant java compiler.
4233   Label notMethod;
4234   __ tbz(Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod);
4235 
4236   invokevirtual_helper(Rmethod, Rrecv, Rflags);
4237   __ bind(notMethod);





4238 
4239   // Receiver subtype check against REFC.
4240   __ lookup_interface_method(// inputs: rec. class, interface
4241                              Rklass, Rinterf, noreg,
4242                              // outputs:  scan temp. reg1, scan temp. reg2
4243                              noreg, Ritable, Rtemp,
4244                              no_such_interface);
4245 
4246   // profile this call
4247   __ profile_virtual_call(R0_tmp, Rklass);
4248 
4249   // Get declaring interface class from method
4250   __ ldr(Rtemp, Address(Rmethod, Method::const_offset()));
4251   __ ldr(Rtemp, Address(Rtemp, ConstMethod::constants_offset()));
4252   __ ldr(Rinterf, Address(Rtemp, ConstantPool::pool_holder_offset_in_bytes()));
4253 
4254   // Get itable index from method
4255   __ ldr_s32(Rtemp, Address(Rmethod, Method::itable_index_offset()));
4256   __ add(Rtemp, Rtemp, (-Method::itable_index_max)); // small negative constant is too large for an immediate on arm32
4257   __ neg(Rindex, Rtemp);


< prev index next >