1.1 --- a/src/cpu/sparc/vm/stubGenerator_sparc.cpp Wed Jun 15 10:20:03 2011 -0700 1.2 +++ b/src/cpu/sparc/vm/stubGenerator_sparc.cpp Thu Jun 16 13:46:55 2011 -0700 1.3 @@ -440,7 +440,8 @@ 1.4 #undef __ 1.5 #define __ masm-> 1.6 1.7 - address generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc) { 1.8 + address generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc, 1.9 + Register arg1 = noreg, Register arg2 = noreg) { 1.10 #ifdef ASSERT 1.11 int insts_size = VerifyThread ? 1 * K : 600; 1.12 #else 1.13 @@ -476,6 +477,13 @@ 1.14 __ set_last_Java_frame(last_java_sp, G0); 1.15 if (VerifyThread) __ mov(G2_thread, O0); // about to be smashed; pass early 1.16 __ save_thread(noreg); 1.17 + if (arg1 != noreg) { 1.18 + assert(arg2 != O1, "clobbered"); 1.19 + __ mov(arg1, O1); 1.20 + } 1.21 + if (arg2 != noreg) { 1.22 + __ mov(arg2, O2); 1.23 + } 1.24 // do the call 1.25 BLOCK_COMMENT("call runtime_entry"); 1.26 __ call(runtime_entry, relocInfo::runtime_call_type); 1.27 @@ -3240,6 +3248,14 @@ 1.28 StubRoutines::_atomic_cmpxchg_long_entry = generate_atomic_cmpxchg_long(); 1.29 StubRoutines::_atomic_add_ptr_entry = StubRoutines::_atomic_add_entry; 1.30 #endif // COMPILER2 !=> _LP64 1.31 + 1.32 + // Build this early so it's available for the interpreter. The 1.33 + // stub expects the required and actual type to already be in O1 1.34 + // and O2 respectively. 1.35 + StubRoutines::_throw_WrongMethodTypeException_entry = 1.36 + generate_throw_exception("WrongMethodTypeException throw_exception", 1.37 + CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException), 1.38 + false, G5_method_type, G3_method_handle); 1.39 } 1.40 1.41