src/hotspot/cpu/sparc/templateTable_sparc.cpp
changeset 49368 2ed1c37df3a5
parent 49359 59f6547e151f
child 49449 ef5d5d343e2a
child 56348 f3b0961adb3c
equal deleted inserted replaced
49366:f95ef5511e1f 49368:2ed1c37df3a5
  3135   const Register Rindex = G5_method;
  3135   const Register Rindex = G5_method;
  3136   __ ld(Rmethod, Method::itable_index_offset(), Rindex);
  3136   __ ld(Rmethod, Method::itable_index_offset(), Rindex);
  3137   __ sub(Rindex, Method::itable_index_max, Rindex);
  3137   __ sub(Rindex, Method::itable_index_max, Rindex);
  3138   __ neg(Rindex);
  3138   __ neg(Rindex);
  3139 
  3139 
       
  3140   // Preserve O2_Klass for throw_AbstractMethodErrorVerbose
       
  3141   __ mov(O2_Klass, O4);
  3140   __ lookup_interface_method(// inputs: rec. class, interface, itable index
  3142   __ lookup_interface_method(// inputs: rec. class, interface, itable index
  3141                              O2_Klass, Rinterface, Rindex,
  3143                              O4, Rinterface, Rindex,
  3142                              // outputs: method, scan temp reg, temp reg
  3144                              // outputs: method, scan temp reg, temp reg
  3143                              G5_method, Rscratch, Rtemp,
  3145                              G5_method, Rscratch, Rtemp,
  3144                              L_no_such_interface);
  3146                              L_no_such_interface);
  3145 
  3147 
  3146   // Check for abstract method error.
  3148   // Check for abstract method error.
  3147   {
  3149   {
  3148     Label ok;
  3150     Label ok;
  3149     __ br_notnull_short(G5_method, Assembler::pt, ok);
  3151     __ br_notnull_short(G5_method, Assembler::pt, ok);
  3150     call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
  3152     // Pass arguments for generating a verbose error message.
       
  3153     call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodErrorVerbose),
       
  3154             O2_Klass, Rmethod);
  3151     __ should_not_reach_here();
  3155     __ should_not_reach_here();
  3152     __ bind(ok);
  3156     __ bind(ok);
  3153   }
  3157   }
  3154 
  3158 
  3155   Register Rcall = Rinterface;
  3159   Register Rcall = Rinterface;
  3158   __ profile_arguments_type(G5_method, Rcall, Gargs, true);
  3162   __ profile_arguments_type(G5_method, Rcall, Gargs, true);
  3159   __ profile_called_method(G5_method, Rscratch);
  3163   __ profile_called_method(G5_method, Rscratch);
  3160   __ call_from_interpreter(Rcall, Gargs, Rret);
  3164   __ call_from_interpreter(Rcall, Gargs, Rret);
  3161 
  3165 
  3162   __ bind(L_no_such_interface);
  3166   __ bind(L_no_such_interface);
  3163   call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
  3167   // Pass arguments for generating a verbose error message.
       
  3168   call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeErrorVerbose),
       
  3169           O2_Klass, Rinterface);
  3164   __ should_not_reach_here();
  3170   __ should_not_reach_here();
  3165 }
  3171 }
  3166 
  3172 
  3167 void TemplateTable::invokehandle(int byte_no) {
  3173 void TemplateTable::invokehandle(int byte_no) {
  3168   transition(vtos, vtos);
  3174   transition(vtos, vtos);
  3534 }
  3540 }
  3535 
  3541 
  3536 void TemplateTable::_breakpoint() {
  3542 void TemplateTable::_breakpoint() {
  3537 
  3543 
  3538    // Note: We get here even if we are single stepping..
  3544    // Note: We get here even if we are single stepping..
  3539    // jbug inists on setting breakpoints at every bytecode
  3545    // jbug insists on setting breakpoints at every bytecode
  3540    // even if we are in single step mode.
  3546    // even if we are in single step mode.
  3541 
  3547 
  3542    transition(vtos, vtos);
  3548    transition(vtos, vtos);
  3543    // get the unpatched byte code
  3549    // get the unpatched byte code
  3544    __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::get_original_bytecode_at), Lmethod, Lbcp);
  3550    __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::get_original_bytecode_at), Lmethod, Lbcp);