1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Fri Apr 11 09:56:35 2008 -0400 1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Sun Apr 13 17:43:42 2008 -0400 1.3 @@ -789,7 +789,7 @@ 1.4 1.5 { 1.6 __ verify_oop(holder); 1.7 - __ movq(temp, Address(receiver, oopDesc::klass_offset_in_bytes())); 1.8 + __ load_klass(temp, receiver); 1.9 __ verify_oop(temp); 1.10 1.11 __ cmpq(temp, Address(holder, compiledICHolderOopDesc::holder_klass_offset())); 1.12 @@ -1297,21 +1297,26 @@ 1.13 1.14 const Register ic_reg = rax; 1.15 const Register receiver = j_rarg0; 1.16 + const Register tmp = rdx; 1.17 1.18 Label ok; 1.19 Label exception_pending; 1.20 1.21 __ verify_oop(receiver); 1.22 - __ cmpq(ic_reg, Address(receiver, oopDesc::klass_offset_in_bytes())); 1.23 + __ pushq(tmp); // spill (any other registers free here???) 1.24 + __ load_klass(tmp, receiver); 1.25 + __ cmpq(ic_reg, tmp); 1.26 __ jcc(Assembler::equal, ok); 1.27 1.28 + __ popq(tmp); 1.29 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub())); 1.30 1.31 + __ bind(ok); 1.32 + __ popq(tmp); 1.33 + 1.34 // Verified entry point must be aligned 1.35 __ align(8); 1.36 1.37 - __ bind(ok); 1.38 - 1.39 int vep_offset = ((intptr_t)__ pc()) - start; 1.40 1.41 // The instruction at the verified entry point must be 5 bytes or longer 1.42 @@ -1663,6 +1668,7 @@ 1.43 __ andq(rsp, -16); // align stack as required by ABI 1.44 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans))); 1.45 __ movq(rsp, r12); // restore sp 1.46 + __ reinit_heapbase(); 1.47 // Restore any method result value 1.48 restore_native_result(masm, ret_type, stack_slots); 1.49 __ bind(Continue); 1.50 @@ -1725,7 +1731,6 @@ 1.51 __ bind(done); 1.52 1.53 } 1.54 - 1.55 { 1.56 SkipIfEqual skip(masm, &DTraceMethodProbes, false); 1.57 save_native_result(masm, ret_type, stack_slots); 1.58 @@ -1829,6 +1834,7 @@ 1.59 1.60 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_unlocking_C))); 1.61 __ movq(rsp, r12); // restore sp 1.62 + __ reinit_heapbase(); 1.63 #ifdef ASSERT 1.64 { 1.65 Label L; 1.66 @@ -1859,6 +1865,7 @@ 1.67 __ andq(rsp, -16); // align stack as required by ABI 1.68 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages))); 1.69 __ movq(rsp, r12); // restore sp 1.70 + __ reinit_heapbase(); 1.71 restore_native_result(masm, ret_type, stack_slots); 1.72 // and continue 1.73 __ jmp(reguard_done); 1.74 @@ -1941,9 +1948,8 @@ 1.75 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); 1.76 1.77 // Normal deoptimization. Save exec mode for unpack_frames. 1.78 - __ movl(r12, Deoptimization::Unpack_deopt); // callee-saved 1.79 + __ movl(r14, Deoptimization::Unpack_deopt); // callee-saved 1.80 __ jmp(cont); 1.81 - 1.82 int exception_offset = __ pc() - start; 1.83 1.84 // Prolog for exception case 1.85 @@ -1955,7 +1961,7 @@ 1.86 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); 1.87 1.88 // Deopt during an exception. Save exec mode for unpack_frames. 1.89 - __ movl(r12, Deoptimization::Unpack_exception); // callee-saved 1.90 + __ movl(r14, Deoptimization::Unpack_exception); // callee-saved 1.91 1.92 __ bind(cont); 1.93 1.94 @@ -2088,7 +2094,7 @@ 1.95 __ set_last_Java_frame(noreg, rbp, NULL); 1.96 1.97 __ movq(c_rarg0, r15_thread); 1.98 - __ movl(c_rarg1, r12); // second arg: exec_mode 1.99 + __ movl(c_rarg1, r14); // second arg: exec_mode 1.100 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames))); 1.101 1.102 // Set an oopmap for the call site