hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp
changeset 10004 190e88f7edd1
parent 9636 363ca5579aff
child 10966 0c9ed2dfc6a2
equal deleted inserted replaced
9982:edcf2d7e7b84 10004:190e88f7edd1
   109              CAST_FROM_FN_PTR(address,
   109              CAST_FROM_FN_PTR(address,
   110                               InterpreterRuntime::throw_ClassCastException),
   110                               InterpreterRuntime::throw_ClassCastException),
   111              rax);
   111              rax);
   112   return entry;
   112   return entry;
   113 }
   113 }
   114 
       
   115 // Arguments are: required type at TOS+4, failing object (or NULL) at TOS.
       
   116 address TemplateInterpreterGenerator::generate_WrongMethodType_handler() {
       
   117   address entry = __ pc();
       
   118 
       
   119   __ pop(rbx);                  // actual failing object is at TOS
       
   120   __ pop(rax);                  // required type is at TOS+4
       
   121 
       
   122   __ verify_oop(rbx);
       
   123   __ verify_oop(rax);
       
   124 
       
   125   // Various method handle types use interpreter registers as temps.
       
   126   __ restore_bcp();
       
   127   __ restore_locals();
       
   128 
       
   129   // Expression stack must be empty before entering the VM for an exception.
       
   130   __ empty_expression_stack();
       
   131   __ empty_FPU_stack();
       
   132   __ call_VM(noreg,
       
   133              CAST_FROM_FN_PTR(address,
       
   134                               InterpreterRuntime::throw_WrongMethodTypeException),
       
   135              // pass required type, failing object (or NULL)
       
   136              rax, rbx);
       
   137   return entry;
       
   138 }
       
   139 
       
   140 
   114 
   141 address TemplateInterpreterGenerator::generate_exception_handler_common(const char* name, const char* message, bool pass_oop) {
   115 address TemplateInterpreterGenerator::generate_exception_handler_common(const char* name, const char* message, bool pass_oop) {
   142   assert(!pass_oop || message == NULL, "either oop or message but not both");
   116   assert(!pass_oop || message == NULL, "either oop or message but not both");
   143   address entry = __ pc();
   117   address entry = __ pc();
   144   if (pass_oop) {
   118   if (pass_oop) {