438 // properly traversed and ignored during GC, so we change the meaning of the "__" |
438 // properly traversed and ignored during GC, so we change the meaning of the "__" |
439 // macro within this method. |
439 // macro within this method. |
440 #undef __ |
440 #undef __ |
441 #define __ masm-> |
441 #define __ masm-> |
442 |
442 |
443 address generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc) { |
443 address generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc, |
|
444 Register arg1 = noreg, Register arg2 = noreg) { |
444 #ifdef ASSERT |
445 #ifdef ASSERT |
445 int insts_size = VerifyThread ? 1 * K : 600; |
446 int insts_size = VerifyThread ? 1 * K : 600; |
446 #else |
447 #else |
447 int insts_size = VerifyThread ? 1 * K : 256; |
448 int insts_size = VerifyThread ? 1 * K : 256; |
448 #endif /* ASSERT */ |
449 #endif /* ASSERT */ |
474 Register last_java_sp = SP; |
475 Register last_java_sp = SP; |
475 // 64-bit last_java_sp is biased! |
476 // 64-bit last_java_sp is biased! |
476 __ set_last_Java_frame(last_java_sp, G0); |
477 __ set_last_Java_frame(last_java_sp, G0); |
477 if (VerifyThread) __ mov(G2_thread, O0); // about to be smashed; pass early |
478 if (VerifyThread) __ mov(G2_thread, O0); // about to be smashed; pass early |
478 __ save_thread(noreg); |
479 __ save_thread(noreg); |
|
480 if (arg1 != noreg) { |
|
481 assert(arg2 != O1, "clobbered"); |
|
482 __ mov(arg1, O1); |
|
483 } |
|
484 if (arg2 != noreg) { |
|
485 __ mov(arg2, O2); |
|
486 } |
479 // do the call |
487 // do the call |
480 BLOCK_COMMENT("call runtime_entry"); |
488 BLOCK_COMMENT("call runtime_entry"); |
481 __ call(runtime_entry, relocInfo::runtime_call_type); |
489 __ call(runtime_entry, relocInfo::runtime_call_type); |
482 if (!VerifyThread) |
490 if (!VerifyThread) |
483 __ delayed()->mov(G2_thread, O0); // pass thread as first argument |
491 __ delayed()->mov(G2_thread, O0); // pass thread as first argument |
3238 StubRoutines::_atomic_xchg_ptr_entry = StubRoutines::_atomic_xchg_entry; |
3246 StubRoutines::_atomic_xchg_ptr_entry = StubRoutines::_atomic_xchg_entry; |
3239 StubRoutines::_atomic_cmpxchg_ptr_entry = StubRoutines::_atomic_cmpxchg_entry; |
3247 StubRoutines::_atomic_cmpxchg_ptr_entry = StubRoutines::_atomic_cmpxchg_entry; |
3240 StubRoutines::_atomic_cmpxchg_long_entry = generate_atomic_cmpxchg_long(); |
3248 StubRoutines::_atomic_cmpxchg_long_entry = generate_atomic_cmpxchg_long(); |
3241 StubRoutines::_atomic_add_ptr_entry = StubRoutines::_atomic_add_entry; |
3249 StubRoutines::_atomic_add_ptr_entry = StubRoutines::_atomic_add_entry; |
3242 #endif // COMPILER2 !=> _LP64 |
3250 #endif // COMPILER2 !=> _LP64 |
|
3251 |
|
3252 // Build this early so it's available for the interpreter. The |
|
3253 // stub expects the required and actual type to already be in O1 |
|
3254 // and O2 respectively. |
|
3255 StubRoutines::_throw_WrongMethodTypeException_entry = |
|
3256 generate_throw_exception("WrongMethodTypeException throw_exception", |
|
3257 CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException), |
|
3258 false, G5_method_type, G3_method_handle); |
3243 } |
3259 } |
3244 |
3260 |
3245 |
3261 |
3246 void generate_all() { |
3262 void generate_all() { |
3247 // Generates all stubs and initializes the entry points |
3263 // Generates all stubs and initializes the entry points |