1.1 --- a/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Apr 30 04:27:25 2010 -0700 1.2 +++ b/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Apr 30 08:37:24 2010 -0700 1.3 @@ -580,7 +580,6 @@ 1.4 1.5 void TemplateTable::iload(int n) { 1.6 transition(vtos, itos); 1.7 - debug_only(__ verify_local_tag(frame::TagValue, Llocals, Otos_i, n)); 1.8 __ ld( Llocals, Interpreter::local_offset_in_bytes(n), Otos_i ); 1.9 } 1.10 1.11 @@ -588,7 +587,6 @@ 1.12 void TemplateTable::lload(int n) { 1.13 transition(vtos, ltos); 1.14 assert(n+1 < Argument::n_register_parameters, "would need more code"); 1.15 - debug_only(__ verify_local_tag(frame::TagCategory2, Llocals, Otos_l, n)); 1.16 __ load_unaligned_long(Llocals, Interpreter::local_offset_in_bytes(n+1), Otos_l); 1.17 } 1.18 1.19 @@ -596,7 +594,6 @@ 1.20 void TemplateTable::fload(int n) { 1.21 transition(vtos, ftos); 1.22 assert(n < Argument::n_register_parameters, "would need more code"); 1.23 - debug_only(__ verify_local_tag(frame::TagValue, Llocals, G3_scratch, n)); 1.24 __ ldf( FloatRegisterImpl::S, Llocals, Interpreter::local_offset_in_bytes(n), Ftos_f ); 1.25 } 1.26 1.27 @@ -604,14 +601,12 @@ 1.28 void TemplateTable::dload(int n) { 1.29 transition(vtos, dtos); 1.30 FloatRegister dst = Ftos_d; 1.31 - debug_only(__ verify_local_tag(frame::TagCategory2, Llocals, G3_scratch, n)); 1.32 __ load_unaligned_double(Llocals, Interpreter::local_offset_in_bytes(n+1), dst); 1.33 } 1.34 1.35 1.36 void TemplateTable::aload(int n) { 1.37 transition(vtos, atos); 1.38 - debug_only(__ verify_local_tag(frame::TagReference, Llocals, Otos_i, n)); 1.39 __ ld_ptr( Llocals, Interpreter::local_offset_in_bytes(n), Otos_i ); 1.40 } 1.41 1.42 @@ -707,12 +702,11 @@ 1.43 1.44 void TemplateTable::astore() { 1.45 transition(vtos, vtos); 1.46 - // astore tos can also be a returnAddress, so load and store the tag too 1.47 - __ load_ptr_and_tag(0, Otos_i, Otos_l2); 1.48 - __ inc(Lesp, Interpreter::stackElementSize()); 1.49 + __ load_ptr(0, Otos_i); 1.50 + __ inc(Lesp, Interpreter::stackElementSize); 1.51 __ verify_oop_or_return_address(Otos_i, G3_scratch); 1.52 locals_index(G3_scratch); 1.53 - __ store_local_ptr( G3_scratch, Otos_i, Otos_l2 ); 1.54 + __ store_local_ptr(G3_scratch, Otos_i); 1.55 } 1.56 1.57 1.58 @@ -750,12 +744,11 @@ 1.59 1.60 void TemplateTable::wide_astore() { 1.61 transition(vtos, vtos); 1.62 - // astore tos can also be a returnAddress, so load and store the tag too 1.63 - __ load_ptr_and_tag(0, Otos_i, Otos_l2); 1.64 - __ inc(Lesp, Interpreter::stackElementSize()); 1.65 + __ load_ptr(0, Otos_i); 1.66 + __ inc(Lesp, Interpreter::stackElementSize); 1.67 __ verify_oop_or_return_address(Otos_i, G3_scratch); 1.68 locals_index_wide(G3_scratch); 1.69 - __ store_local_ptr( G3_scratch, Otos_i, Otos_l2 ); 1.70 + __ store_local_ptr(G3_scratch, Otos_i); 1.71 } 1.72 1.73 1.74 @@ -845,13 +838,13 @@ 1.75 do_oop_store(_masm, O1, noreg, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Otos_i, G3_scratch, _bs->kind(), true); 1.76 1.77 __ ba(false,done); 1.78 - __ delayed()->inc(Lesp, 3* Interpreter::stackElementSize()); // adj sp (pops array, index and value) 1.79 + __ delayed()->inc(Lesp, 3* Interpreter::stackElementSize); // adj sp (pops array, index and value) 1.80 1.81 __ bind(is_null); 1.82 do_oop_store(_masm, O1, noreg, arrayOopDesc::base_offset_in_bytes(T_OBJECT), G0, G4_scratch, _bs->kind(), true); 1.83 1.84 __ profile_null_seen(G3_scratch); 1.85 - __ inc(Lesp, 3* Interpreter::stackElementSize()); // adj sp (pops array, index and value) 1.86 + __ inc(Lesp, 3* Interpreter::stackElementSize); // adj sp (pops array, index and value) 1.87 __ bind(done); 1.88 } 1.89 1.90 @@ -884,7 +877,6 @@ 1.91 1.92 void TemplateTable::istore(int n) { 1.93 transition(itos, vtos); 1.94 - __ tag_local(frame::TagValue, Llocals, Otos_i, n); 1.95 __ st(Otos_i, Llocals, Interpreter::local_offset_in_bytes(n)); 1.96 } 1.97 1.98 @@ -892,7 +884,6 @@ 1.99 void TemplateTable::lstore(int n) { 1.100 transition(ltos, vtos); 1.101 assert(n+1 < Argument::n_register_parameters, "only handle register cases"); 1.102 - __ tag_local(frame::TagCategory2, Llocals, Otos_l, n); 1.103 __ store_unaligned_long(Otos_l, Llocals, Interpreter::local_offset_in_bytes(n+1)); 1.104 1.105 } 1.106 @@ -901,7 +892,6 @@ 1.107 void TemplateTable::fstore(int n) { 1.108 transition(ftos, vtos); 1.109 assert(n < Argument::n_register_parameters, "only handle register cases"); 1.110 - __ tag_local(frame::TagValue, Llocals, Otos_l, n); 1.111 __ stf(FloatRegisterImpl::S, Ftos_f, Llocals, Interpreter::local_offset_in_bytes(n)); 1.112 } 1.113 1.114 @@ -909,30 +899,28 @@ 1.115 void TemplateTable::dstore(int n) { 1.116 transition(dtos, vtos); 1.117 FloatRegister src = Ftos_d; 1.118 - __ tag_local(frame::TagCategory2, Llocals, Otos_l, n); 1.119 __ store_unaligned_double(src, Llocals, Interpreter::local_offset_in_bytes(n+1)); 1.120 } 1.121 1.122 1.123 void TemplateTable::astore(int n) { 1.124 transition(vtos, vtos); 1.125 - // astore tos can also be a returnAddress, so load and store the tag too 1.126 - __ load_ptr_and_tag(0, Otos_i, Otos_l2); 1.127 - __ inc(Lesp, Interpreter::stackElementSize()); 1.128 + __ load_ptr(0, Otos_i); 1.129 + __ inc(Lesp, Interpreter::stackElementSize); 1.130 __ verify_oop_or_return_address(Otos_i, G3_scratch); 1.131 - __ store_local_ptr( n, Otos_i, Otos_l2 ); 1.132 + __ store_local_ptr(n, Otos_i); 1.133 } 1.134 1.135 1.136 void TemplateTable::pop() { 1.137 transition(vtos, vtos); 1.138 - __ inc(Lesp, Interpreter::stackElementSize()); 1.139 + __ inc(Lesp, Interpreter::stackElementSize); 1.140 } 1.141 1.142 1.143 void TemplateTable::pop2() { 1.144 transition(vtos, vtos); 1.145 - __ inc(Lesp, 2 * Interpreter::stackElementSize()); 1.146 + __ inc(Lesp, 2 * Interpreter::stackElementSize); 1.147 } 1.148 1.149 1.150 @@ -940,8 +928,8 @@ 1.151 transition(vtos, vtos); 1.152 // stack: ..., a 1.153 // load a and tag 1.154 - __ load_ptr_and_tag(0, Otos_i, Otos_l2); 1.155 - __ push_ptr(Otos_i, Otos_l2); 1.156 + __ load_ptr(0, Otos_i); 1.157 + __ push_ptr(Otos_i); 1.158 // stack: ..., a, a 1.159 } 1.160 1.161 @@ -949,11 +937,11 @@ 1.162 void TemplateTable::dup_x1() { 1.163 transition(vtos, vtos); 1.164 // stack: ..., a, b 1.165 - __ load_ptr_and_tag(1, G3_scratch, G4_scratch); // get a 1.166 - __ load_ptr_and_tag(0, Otos_l1, Otos_l2); // get b 1.167 - __ store_ptr_and_tag(1, Otos_l1, Otos_l2); // put b 1.168 - __ store_ptr_and_tag(0, G3_scratch, G4_scratch); // put a - like swap 1.169 - __ push_ptr(Otos_l1, Otos_l2); // push b 1.170 + __ load_ptr( 1, G3_scratch); // get a 1.171 + __ load_ptr( 0, Otos_l1); // get b 1.172 + __ store_ptr(1, Otos_l1); // put b 1.173 + __ store_ptr(0, G3_scratch); // put a - like swap 1.174 + __ push_ptr(Otos_l1); // push b 1.175 // stack: ..., b, a, b 1.176 } 1.177 1.178 @@ -962,27 +950,27 @@ 1.179 transition(vtos, vtos); 1.180 // stack: ..., a, b, c 1.181 // get c and push on stack, reuse registers 1.182 - __ load_ptr_and_tag(0, G3_scratch, G4_scratch); // get c 1.183 - __ push_ptr(G3_scratch, G4_scratch); // push c with tag 1.184 + __ load_ptr( 0, G3_scratch); // get c 1.185 + __ push_ptr(G3_scratch); // push c with tag 1.186 // stack: ..., a, b, c, c (c in reg) (Lesp - 4) 1.187 // (stack offsets n+1 now) 1.188 - __ load_ptr_and_tag(3, Otos_l1, Otos_l2); // get a 1.189 - __ store_ptr_and_tag(3, G3_scratch, G4_scratch); // put c at 3 1.190 + __ load_ptr( 3, Otos_l1); // get a 1.191 + __ store_ptr(3, G3_scratch); // put c at 3 1.192 // stack: ..., c, b, c, c (a in reg) 1.193 - __ load_ptr_and_tag(2, G3_scratch, G4_scratch); // get b 1.194 - __ store_ptr_and_tag(2, Otos_l1, Otos_l2); // put a at 2 1.195 + __ load_ptr( 2, G3_scratch); // get b 1.196 + __ store_ptr(2, Otos_l1); // put a at 2 1.197 // stack: ..., c, a, c, c (b in reg) 1.198 - __ store_ptr_and_tag(1, G3_scratch, G4_scratch); // put b at 1 1.199 + __ store_ptr(1, G3_scratch); // put b at 1 1.200 // stack: ..., c, a, b, c 1.201 } 1.202 1.203 1.204 void TemplateTable::dup2() { 1.205 transition(vtos, vtos); 1.206 - __ load_ptr_and_tag(1, G3_scratch, G4_scratch); // get a 1.207 - __ load_ptr_and_tag(0, Otos_l1, Otos_l2); // get b 1.208 - __ push_ptr(G3_scratch, G4_scratch); // push a 1.209 - __ push_ptr(Otos_l1, Otos_l2); // push b 1.210 + __ load_ptr(1, G3_scratch); // get a 1.211 + __ load_ptr(0, Otos_l1); // get b 1.212 + __ push_ptr(G3_scratch); // push a 1.213 + __ push_ptr(Otos_l1); // push b 1.214 // stack: ..., a, b, a, b 1.215 } 1.216 1.217 @@ -990,17 +978,17 @@ 1.218 void TemplateTable::dup2_x1() { 1.219 transition(vtos, vtos); 1.220 // stack: ..., a, b, c 1.221 - __ load_ptr_and_tag(1, Lscratch, G1_scratch); // get b 1.222 - __ load_ptr_and_tag(2, Otos_l1, Otos_l2); // get a 1.223 - __ store_ptr_and_tag(2, Lscratch, G1_scratch); // put b at a 1.224 + __ load_ptr( 1, Lscratch); // get b 1.225 + __ load_ptr( 2, Otos_l1); // get a 1.226 + __ store_ptr(2, Lscratch); // put b at a 1.227 // stack: ..., b, b, c 1.228 - __ load_ptr_and_tag(0, G3_scratch, G4_scratch); // get c 1.229 - __ store_ptr_and_tag(1, G3_scratch, G4_scratch); // put c at b 1.230 + __ load_ptr( 0, G3_scratch); // get c 1.231 + __ store_ptr(1, G3_scratch); // put c at b 1.232 // stack: ..., b, c, c 1.233 - __ store_ptr_and_tag(0, Otos_l1, Otos_l2); // put a at c 1.234 + __ store_ptr(0, Otos_l1); // put a at c 1.235 // stack: ..., b, c, a 1.236 - __ push_ptr(Lscratch, G1_scratch); // push b 1.237 - __ push_ptr(G3_scratch, G4_scratch); // push c 1.238 + __ push_ptr(Lscratch); // push b 1.239 + __ push_ptr(G3_scratch); // push c 1.240 // stack: ..., b, c, a, b, c 1.241 } 1.242 1.243 @@ -1010,18 +998,18 @@ 1.244 void TemplateTable::dup2_x2() { 1.245 transition(vtos, vtos); 1.246 // stack: ..., a, b, c, d 1.247 - __ load_ptr_and_tag(1, Lscratch, G1_scratch); // get c 1.248 - __ load_ptr_and_tag(3, Otos_l1, Otos_l2); // get a 1.249 - __ store_ptr_and_tag(3, Lscratch, G1_scratch); // put c at 3 1.250 - __ store_ptr_and_tag(1, Otos_l1, Otos_l2); // put a at 1 1.251 + __ load_ptr( 1, Lscratch); // get c 1.252 + __ load_ptr( 3, Otos_l1); // get a 1.253 + __ store_ptr(3, Lscratch); // put c at 3 1.254 + __ store_ptr(1, Otos_l1); // put a at 1 1.255 // stack: ..., c, b, a, d 1.256 - __ load_ptr_and_tag(2, G3_scratch, G4_scratch); // get b 1.257 - __ load_ptr_and_tag(0, Otos_l1, Otos_l2); // get d 1.258 - __ store_ptr_and_tag(0, G3_scratch, G4_scratch); // put b at 0 1.259 - __ store_ptr_and_tag(2, Otos_l1, Otos_l2); // put d at 2 1.260 + __ load_ptr( 2, G3_scratch); // get b 1.261 + __ load_ptr( 0, Otos_l1); // get d 1.262 + __ store_ptr(0, G3_scratch); // put b at 0 1.263 + __ store_ptr(2, Otos_l1); // put d at 2 1.264 // stack: ..., c, d, a, b 1.265 - __ push_ptr(Lscratch, G1_scratch); // push c 1.266 - __ push_ptr(Otos_l1, Otos_l2); // push d 1.267 + __ push_ptr(Lscratch); // push c 1.268 + __ push_ptr(Otos_l1); // push d 1.269 // stack: ..., c, d, a, b, c, d 1.270 } 1.271 1.272 @@ -1029,10 +1017,10 @@ 1.273 void TemplateTable::swap() { 1.274 transition(vtos, vtos); 1.275 // stack: ..., a, b 1.276 - __ load_ptr_and_tag(1, G3_scratch, G4_scratch); // get a 1.277 - __ load_ptr_and_tag(0, Otos_l1, Otos_l2); // get b 1.278 - __ store_ptr_and_tag(0, G3_scratch, G4_scratch); // put b 1.279 - __ store_ptr_and_tag(1, Otos_l1, Otos_l2); // put a 1.280 + __ load_ptr( 1, G3_scratch); // get a 1.281 + __ load_ptr( 0, Otos_l1); // get b 1.282 + __ store_ptr(0, G3_scratch); // put b 1.283 + __ store_ptr(1, Otos_l1); // put a 1.284 // stack: ..., b, a 1.285 } 1.286 1.287 @@ -1045,9 +1033,9 @@ 1.288 case sub: __ sub(O1, Otos_i, Otos_i); break; 1.289 // %%%%% Mul may not exist: better to call .mul? 1.290 case mul: __ smul(O1, Otos_i, Otos_i); break; 1.291 - case _and: __ and3(O1, Otos_i, Otos_i); break; 1.292 - case _or: __ or3(O1, Otos_i, Otos_i); break; 1.293 - case _xor: __ xor3(O1, Otos_i, Otos_i); break; 1.294 + case _and: __ and3(O1, Otos_i, Otos_i); break; 1.295 + case _or: __ or3(O1, Otos_i, Otos_i); break; 1.296 + case _xor: __ xor3(O1, Otos_i, Otos_i); break; 1.297 case shl: __ sll(O1, Otos_i, Otos_i); break; 1.298 case shr: __ sra(O1, Otos_i, Otos_i); break; 1.299 case ushr: __ srl(O1, Otos_i, Otos_i); break; 1.300 @@ -1061,17 +1049,17 @@ 1.301 __ pop_l(O2); 1.302 switch (op) { 1.303 #ifdef _LP64 1.304 - case add: __ add(O2, Otos_l, Otos_l); break; 1.305 - case sub: __ sub(O2, Otos_l, Otos_l); break; 1.306 - case _and: __ and3( O2, Otos_l, Otos_l); break; 1.307 - case _or: __ or3( O2, Otos_l, Otos_l); break; 1.308 - case _xor: __ xor3( O2, Otos_l, Otos_l); break; 1.309 + case add: __ add(O2, Otos_l, Otos_l); break; 1.310 + case sub: __ sub(O2, Otos_l, Otos_l); break; 1.311 + case _and: __ and3(O2, Otos_l, Otos_l); break; 1.312 + case _or: __ or3(O2, Otos_l, Otos_l); break; 1.313 + case _xor: __ xor3(O2, Otos_l, Otos_l); break; 1.314 #else 1.315 case add: __ addcc(O3, Otos_l2, Otos_l2); __ addc(O2, Otos_l1, Otos_l1); break; 1.316 case sub: __ subcc(O3, Otos_l2, Otos_l2); __ subc(O2, Otos_l1, Otos_l1); break; 1.317 - case _and: __ and3( O3, Otos_l2, Otos_l2); __ and3( O2, Otos_l1, Otos_l1); break; 1.318 - case _or: __ or3( O3, Otos_l2, Otos_l2); __ or3( O2, Otos_l1, Otos_l1); break; 1.319 - case _xor: __ xor3( O3, Otos_l2, Otos_l2); __ xor3( O2, Otos_l1, Otos_l1); break; 1.320 + case _and: __ and3(O3, Otos_l2, Otos_l2); __ and3(O2, Otos_l1, Otos_l1); break; 1.321 + case _or: __ or3(O3, Otos_l2, Otos_l2); __ or3(O2, Otos_l1, Otos_l1); break; 1.322 + case _xor: __ xor3(O3, Otos_l2, Otos_l2); __ xor3(O2, Otos_l1, Otos_l1); break; 1.323 #endif 1.324 default: ShouldNotReachHere(); 1.325 } 1.326 @@ -1307,7 +1295,7 @@ 1.327 __ ldsb(Lbcp, 2, O2); // load constant 1.328 __ access_local_int(G3_scratch, Otos_i); 1.329 __ add(Otos_i, O2, Otos_i); 1.330 - __ st(Otos_i, G3_scratch, Interpreter::value_offset_in_bytes()); // access_local_int puts E.A. in G3_scratch 1.331 + __ st(Otos_i, G3_scratch, 0); // access_local_int puts E.A. in G3_scratch 1.332 } 1.333 1.334 1.335 @@ -1317,7 +1305,7 @@ 1.336 __ get_2_byte_integer_at_bcp( 4, O2, O3, InterpreterMacroAssembler::Signed); 1.337 __ access_local_int(G3_scratch, Otos_i); 1.338 __ add(Otos_i, O3, Otos_i); 1.339 - __ st(Otos_i, G3_scratch, Interpreter::value_offset_in_bytes()); // access_local_int puts E.A. in G3_scratch 1.340 + __ st(Otos_i, G3_scratch, 0); // access_local_int puts E.A. in G3_scratch 1.341 } 1.342 1.343 1.344 @@ -1555,7 +1543,7 @@ 1.345 // Bump Lbcp to target of JSR 1.346 __ add(Lbcp, O1_disp, Lbcp); 1.347 // Push returnAddress for "ret" on stack 1.348 - __ push_ptr(Otos_i, G0); // push ptr sized thing plus 0 for tag. 1.349 + __ push_ptr(Otos_i); 1.350 // And away we go! 1.351 __ dispatch_next(vtos); 1.352 return; 1.353 @@ -2754,7 +2742,7 @@ 1.354 Register Rflags = G4_scratch; 1.355 Register Rreceiver = Lscratch; 1.356 1.357 - __ ld_ptr(Llocals, Interpreter::value_offset_in_bytes(), Rreceiver); 1.358 + __ ld_ptr(Llocals, 0, Rreceiver); 1.359 1.360 // access constant pool cache (is resolved) 1.361 __ get_cache_and_index_at_bcp(Rcache, G4_scratch, 2); 1.362 @@ -3696,7 +3684,7 @@ 1.363 transition(vtos, atos); 1.364 // put ndims * wordSize into Lscratch 1.365 __ ldub( Lbcp, 3, Lscratch); 1.366 - __ sll( Lscratch, Interpreter::logStackElementSize(), Lscratch); 1.367 + __ sll( Lscratch, Interpreter::logStackElementSize, Lscratch); 1.368 // Lesp points past last_dim, so set to O1 to first_dim address 1.369 __ add( Lesp, Lscratch, O1); 1.370 call_VM(Otos_i, CAST_FROM_FN_PTR(address, InterpreterRuntime::multianewarray), O1);