1.1 --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Mon Apr 20 14:48:03 2009 -0700 1.2 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Apr 21 11:16:30 2009 -0700 1.3 @@ -625,9 +625,9 @@ 1.4 __ mov(I7, O1); // VM needs caller's callsite 1.5 // Must be a leaf call... 1.6 // can be very far once the blob has been relocated 1.7 - Address dest(O7, CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite)); 1.8 + AddressLiteral dest(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite)); 1.9 __ relocate(relocInfo::runtime_call_type); 1.10 - __ jumpl_to(dest, O7); 1.11 + __ jumpl_to(dest, O7, O7); 1.12 __ delayed()->mov(G2_thread, L7_thread_cache); 1.13 __ mov(L7_thread_cache, G2_thread); 1.14 __ mov(L1, G1); 1.15 @@ -1152,7 +1152,7 @@ 1.16 #ifndef _LP64 1.17 if (g3_crushed) { 1.18 // Rats load was wasted, at least it is in cache... 1.19 - __ ld_ptr(G5_method, in_bytes(methodOopDesc::from_compiled_offset()), G3); 1.20 + __ ld_ptr(G5_method, methodOopDesc::from_compiled_offset(), G3); 1.21 } 1.22 #endif /* _LP64 */ 1.23 1.24 @@ -1165,7 +1165,7 @@ 1.25 // we try and find the callee by normal means a safepoint 1.26 // is possible. So we stash the desired callee in the thread 1.27 // and the vm will find there should this case occur. 1.28 - Address callee_target_addr(G2_thread, 0, in_bytes(JavaThread::callee_target_offset())); 1.29 + Address callee_target_addr(G2_thread, JavaThread::callee_target_offset()); 1.30 __ st_ptr(G5_method, callee_target_addr); 1.31 1.32 if (StressNonEntrant) { 1.33 @@ -1218,7 +1218,7 @@ 1.34 Register R_temp = G1; // another scratch register 1.35 #endif 1.36 1.37 - Address ic_miss(G3_scratch, SharedRuntime::get_ic_miss_stub()); 1.38 + AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub()); 1.39 1.40 __ verify_oop(O0); 1.41 __ verify_oop(G5_method); 1.42 @@ -1240,7 +1240,7 @@ 1.43 Label ok, ok2; 1.44 __ brx(Assembler::equal, false, Assembler::pt, ok); 1.45 __ delayed()->ld_ptr(G5_method, compiledICHolderOopDesc::holder_method_offset(), G5_method); 1.46 - __ jump_to(ic_miss); 1.47 + __ jump_to(ic_miss, G3_scratch); 1.48 __ delayed()->nop(); 1.49 1.50 __ bind(ok); 1.51 @@ -1251,7 +1251,7 @@ 1.52 __ bind(ok2); 1.53 __ br_null(G3_scratch, false, __ pt, skip_fixup); 1.54 __ delayed()->ld_ptr(G5_method, in_bytes(methodOopDesc::interpreter_entry_offset()), G3_scratch); 1.55 - __ jump_to(ic_miss); 1.56 + __ jump_to(ic_miss, G3_scratch); 1.57 __ delayed()->nop(); 1.58 1.59 } 1.60 @@ -1444,8 +1444,8 @@ 1.61 // without calling into the VM: it's the empty function. Just pop this 1.62 // frame and then jump to forward_exception_entry; O7 will contain the 1.63 // native caller's return PC. 1.64 - Address exception_entry(G3_scratch, StubRoutines::forward_exception_entry()); 1.65 - __ jump_to(exception_entry); 1.66 + AddressLiteral exception_entry(StubRoutines::forward_exception_entry()); 1.67 + __ jump_to(exception_entry, G3_scratch); 1.68 __ delayed()->restore(); // Pop this frame off. 1.69 __ bind(L); 1.70 } 1.71 @@ -1822,14 +1822,14 @@ 1.72 { 1.73 Label L; 1.74 const Register temp_reg = G3_scratch; 1.75 - Address ic_miss(temp_reg, SharedRuntime::get_ic_miss_stub()); 1.76 + AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub()); 1.77 __ verify_oop(O0); 1.78 __ load_klass(O0, temp_reg); 1.79 __ cmp(temp_reg, G5_inline_cache_reg); 1.80 __ brx(Assembler::equal, true, Assembler::pt, L); 1.81 __ delayed()->nop(); 1.82 1.83 - __ jump_to(ic_miss, 0); 1.84 + __ jump_to(ic_miss, temp_reg); 1.85 __ delayed()->nop(); 1.86 __ align(CodeEntryAlignment); 1.87 __ bind(L); 1.88 @@ -2261,21 +2261,19 @@ 1.89 1.90 // Transition from _thread_in_Java to _thread_in_native. 1.91 __ set(_thread_in_native, G3_scratch); 1.92 - __ st(G3_scratch, G2_thread, in_bytes(JavaThread::thread_state_offset())); 1.93 + __ st(G3_scratch, G2_thread, JavaThread::thread_state_offset()); 1.94 1.95 // We flushed the windows ages ago now mark them as flushed 1.96 1.97 // mark windows as flushed 1.98 __ set(JavaFrameAnchor::flushed, G3_scratch); 1.99 1.100 - Address flags(G2_thread, 1.101 - 0, 1.102 - in_bytes(JavaThread::frame_anchor_offset()) + in_bytes(JavaFrameAnchor::flags_offset())); 1.103 + Address flags(G2_thread, JavaThread::frame_anchor_offset() + JavaFrameAnchor::flags_offset()); 1.104 1.105 #ifdef _LP64 1.106 - Address dest(O7, method->native_function()); 1.107 + AddressLiteral dest(method->native_function()); 1.108 __ relocate(relocInfo::runtime_call_type); 1.109 - __ jumpl_to(dest, O7); 1.110 + __ jumpl_to(dest, O7, O7); 1.111 #else 1.112 __ call(method->native_function(), relocInfo::runtime_call_type); 1.113 #endif 1.114 @@ -2316,7 +2314,7 @@ 1.115 // Block, if necessary, before resuming in _thread_in_Java state. 1.116 // In order for GC to work, don't clear the last_Java_sp until after blocking. 1.117 { Label no_block; 1.118 - Address sync_state(G3_scratch, SafepointSynchronize::address_of_state()); 1.119 + AddressLiteral sync_state(SafepointSynchronize::address_of_state()); 1.120 1.121 // Switch thread to "native transition" state before reading the synchronization state. 1.122 // This additional state is necessary because reading and testing the synchronization 1.123 @@ -2326,7 +2324,7 @@ 1.124 // Thread A is resumed to finish this native method, but doesn't block here since it 1.125 // didn't see any synchronization is progress, and escapes. 1.126 __ set(_thread_in_native_trans, G3_scratch); 1.127 - __ st(G3_scratch, G2_thread, in_bytes(JavaThread::thread_state_offset())); 1.128 + __ st(G3_scratch, G2_thread, JavaThread::thread_state_offset()); 1.129 if(os::is_MP()) { 1.130 if (UseMembar) { 1.131 // Force this write out before the read below 1.132 @@ -2343,10 +2341,9 @@ 1.133 __ cmp(G3_scratch, SafepointSynchronize::_not_synchronized); 1.134 1.135 Label L; 1.136 - Address suspend_state(G2_thread, 0, in_bytes(JavaThread::suspend_flags_offset())); 1.137 + Address suspend_state(G2_thread, JavaThread::suspend_flags_offset()); 1.138 __ br(Assembler::notEqual, false, Assembler::pn, L); 1.139 - __ delayed()-> 1.140 - ld(suspend_state, G3_scratch); 1.141 + __ delayed()->ld(suspend_state, G3_scratch); 1.142 __ cmp(G3_scratch, 0); 1.143 __ br(Assembler::equal, false, Assembler::pt, no_block); 1.144 __ delayed()->nop(); 1.145 @@ -2372,11 +2369,11 @@ 1.146 1.147 1.148 __ set(_thread_in_Java, G3_scratch); 1.149 - __ st(G3_scratch, G2_thread, in_bytes(JavaThread::thread_state_offset())); 1.150 + __ st(G3_scratch, G2_thread, JavaThread::thread_state_offset()); 1.151 1.152 1.153 Label no_reguard; 1.154 - __ ld(G2_thread, in_bytes(JavaThread::stack_guard_state_offset()), G3_scratch); 1.155 + __ ld(G2_thread, JavaThread::stack_guard_state_offset(), G3_scratch); 1.156 __ cmp(G3_scratch, JavaThread::stack_guard_yellow_disabled); 1.157 __ br(Assembler::notEqual, false, Assembler::pt, no_reguard); 1.158 __ delayed()->nop(); 1.159 @@ -2684,14 +2681,14 @@ 1.160 { 1.161 Label L; 1.162 const Register temp_reg = G3_scratch; 1.163 - Address ic_miss(temp_reg, SharedRuntime::get_ic_miss_stub()); 1.164 + AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub()); 1.165 __ verify_oop(O0); 1.166 __ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), temp_reg); 1.167 __ cmp(temp_reg, G5_inline_cache_reg); 1.168 __ brx(Assembler::equal, true, Assembler::pt, L); 1.169 __ delayed()->nop(); 1.170 1.171 - __ jump_to(ic_miss, 0); 1.172 + __ jump_to(ic_miss, temp_reg); 1.173 __ delayed()->nop(); 1.174 __ align(CodeEntryAlignment); 1.175 __ bind(L); 1.176 @@ -3155,15 +3152,13 @@ 1.177 // Do this after the caller's return address is on top of stack 1.178 if (UseStackBanging) { 1.179 // Get total frame size for interpreted frames 1.180 - __ ld(Address(O2UnrollBlock, 0, 1.181 - Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()), O4); 1.182 + __ ld(O2UnrollBlock, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes(), O4); 1.183 __ bang_stack_size(O4, O3, G3_scratch); 1.184 } 1.185 1.186 - __ ld(Address(O2UnrollBlock, 0, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()), O4array_size); 1.187 - __ ld_ptr(Address(O2UnrollBlock, 0, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()), G3pcs); 1.188 - 1.189 - __ ld_ptr(Address(O2UnrollBlock, 0, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes()), O3array); 1.190 + __ ld(O2UnrollBlock, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes(), O4array_size); 1.191 + __ ld_ptr(O2UnrollBlock, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes(), G3pcs); 1.192 + __ ld_ptr(O2UnrollBlock, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes(), O3array); 1.193 1.194 // Adjust old interpreter frame to make space for new frame's extra java locals 1.195 // 1.196 @@ -3176,7 +3171,7 @@ 1.197 // for each frame we create and keep up the illusion every where. 1.198 // 1.199 1.200 - __ ld(Address(O2UnrollBlock, 0, Deoptimization::UnrollBlock::caller_adjustment_offset_in_bytes()), O7); 1.201 + __ ld(O2UnrollBlock, Deoptimization::UnrollBlock::caller_adjustment_offset_in_bytes(), O7); 1.202 __ mov(SP, O5_savedSP); // remember initial sender's original sp before adjustment 1.203 __ sub(SP, O7, SP); 1.204 1.205 @@ -3225,9 +3220,9 @@ 1.206 Register I5exception_tmp = I5; 1.207 Register G4exception_tmp = G4_scratch; 1.208 int frame_size_words; 1.209 - Address saved_Freturn0_addr(FP, 0, -sizeof(double) + STACK_BIAS); 1.210 + Address saved_Freturn0_addr(FP, -sizeof(double) + STACK_BIAS); 1.211 #if !defined(_LP64) && defined(COMPILER2) 1.212 - Address saved_Greturn1_addr(FP, 0, -sizeof(double) -sizeof(jlong) + STACK_BIAS); 1.213 + Address saved_Greturn1_addr(FP, -sizeof(double) -sizeof(jlong) + STACK_BIAS); 1.214 #endif 1.215 Label cont; 1.216 1.217 @@ -3289,7 +3284,7 @@ 1.218 // save exception oop in JavaThread and fall through into the 1.219 // exception_in_tls case since they are handled in same way except 1.220 // for where the pending exception is kept. 1.221 - __ st_ptr(Oexception, G2_thread, in_bytes(JavaThread::exception_oop_offset())); 1.222 + __ st_ptr(Oexception, G2_thread, JavaThread::exception_oop_offset()); 1.223 1.224 // 1.225 // Vanilla deoptimization with an exception pending in exception_oop 1.226 @@ -3306,7 +3301,7 @@ 1.227 { 1.228 // verify that there is really an exception oop in exception_oop 1.229 Label has_exception; 1.230 - __ ld_ptr(G2_thread, in_bytes(JavaThread::exception_oop_offset()), Oexception); 1.231 + __ ld_ptr(G2_thread, JavaThread::exception_oop_offset(), Oexception); 1.232 __ br_notnull(Oexception, false, Assembler::pt, has_exception); 1.233 __ delayed()-> nop(); 1.234 __ stop("no exception in thread"); 1.235 @@ -3314,7 +3309,7 @@ 1.236 1.237 // verify that there is no pending exception 1.238 Label no_pending_exception; 1.239 - Address exception_addr(G2_thread, 0, in_bytes(Thread::pending_exception_offset())); 1.240 + Address exception_addr(G2_thread, Thread::pending_exception_offset()); 1.241 __ ld_ptr(exception_addr, Oexception); 1.242 __ br_null(Oexception, false, Assembler::pt, no_pending_exception); 1.243 __ delayed()->nop();