< prev index next >

src/cpu/sparc/vm/templateTable_sparc.cpp

Print this page




3136   // java.lang.Object.  See cpCacheOop.cpp for details.
3137   // This code isn't produced by javac, but could be produced by
3138   // another compliant java compiler.
3139   Label notMethod;
3140   __ set((1 << ConstantPoolCacheEntry::is_forced_virtual_shift), Rscratch);
3141   __ btst(O1_flags, Rscratch);
3142   __ br(Assembler::zero, false, Assembler::pt, notMethod);
3143   __ delayed()->nop();
3144 
3145   invokeinterface_object_method(O2_Klass, Rinterface, Rret, O1_flags);
3146 
3147   __ bind(notMethod);
3148 
3149   __ profile_virtual_call(O2_Klass, O4);
3150 
3151   //
3152   // find entry point to call
3153   //
3154 
3155   // compute start of first itableOffsetEntry (which is at end of vtable)
3156   const int base = in_bytes(InstanceKlass::vtable_start_offset());
3157   Label search;
3158   Register Rtemp = O1_flags;
3159 
3160   __ ld(O2_Klass, in_bytes(InstanceKlass::vtable_length_offset()), Rtemp);
3161   if (align_object_offset(1) > 1) {
3162     __ round_to(Rtemp, align_object_offset(1));
3163   }
3164   __ sll(Rtemp, LogBytesPerWord, Rtemp);   // Rscratch *= 4;
3165   if (Assembler::is_simm13(base)) {
3166     __ add(Rtemp, base, Rtemp);
3167   } else {
3168     __ set(base, Rscratch);
3169     __ add(Rscratch, Rtemp, Rtemp);
3170   }
3171   __ add(O2_Klass, Rtemp, Rscratch);
3172 
3173   __ bind(search);
3174 
3175   __ ld_ptr(Rscratch, itableOffsetEntry::interface_offset_in_bytes(), Rtemp);
3176   {
3177     Label ok;
3178 
3179     // Check that entry is non-null.  Null entries are probably a bytecode
3180     // problem.  If the interface isn't implemented by the receiver class,




3136   // java.lang.Object.  See cpCacheOop.cpp for details.
3137   // This code isn't produced by javac, but could be produced by
3138   // another compliant java compiler.
3139   Label notMethod;
3140   __ set((1 << ConstantPoolCacheEntry::is_forced_virtual_shift), Rscratch);
3141   __ btst(O1_flags, Rscratch);
3142   __ br(Assembler::zero, false, Assembler::pt, notMethod);
3143   __ delayed()->nop();
3144 
3145   invokeinterface_object_method(O2_Klass, Rinterface, Rret, O1_flags);
3146 
3147   __ bind(notMethod);
3148 
3149   __ profile_virtual_call(O2_Klass, O4);
3150 
3151   //
3152   // find entry point to call
3153   //
3154 
3155   // compute start of first itableOffsetEntry (which is at end of vtable)
3156   const int base = in_bytes(Klass::vtable_start_offset());
3157   Label search;
3158   Register Rtemp = O1_flags;
3159 
3160   __ ld(O2_Klass, in_bytes(Klass::vtable_length_offset()), Rtemp);
3161   if (align_object_offset(1) > 1) {
3162     __ round_to(Rtemp, align_object_offset(1));
3163   }
3164   __ sll(Rtemp, LogBytesPerWord, Rtemp);   // Rscratch *= 4;
3165   if (Assembler::is_simm13(base)) {
3166     __ add(Rtemp, base, Rtemp);
3167   } else {
3168     __ set(base, Rscratch);
3169     __ add(Rscratch, Rtemp, Rtemp);
3170   }
3171   __ add(O2_Klass, Rtemp, Rscratch);
3172 
3173   __ bind(search);
3174 
3175   __ ld_ptr(Rscratch, itableOffsetEntry::interface_offset_in_bytes(), Rtemp);
3176   {
3177     Label ok;
3178 
3179     // Check that entry is non-null.  Null entries are probably a bytecode
3180     // problem.  If the interface isn't implemented by the receiver class,


< prev index next >