1.1 --- a/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Jun 07 11:43:53 2013 -0700 1.2 +++ b/src/cpu/sparc/vm/templateTable_sparc.cpp Fri Jun 07 16:46:37 2013 -0700 1.3 @@ -1338,14 +1338,13 @@ 1.4 1.5 void TemplateTable::fneg() { 1.6 transition(ftos, ftos); 1.7 - __ fneg(FloatRegisterImpl::S, Ftos_f); 1.8 + __ fneg(FloatRegisterImpl::S, Ftos_f, Ftos_f); 1.9 } 1.10 1.11 1.12 void TemplateTable::dneg() { 1.13 transition(dtos, dtos); 1.14 - // v8 has fnegd if source and dest are the same 1.15 - __ fneg(FloatRegisterImpl::D, Ftos_f); 1.16 + __ fneg(FloatRegisterImpl::D, Ftos_f, Ftos_f); 1.17 } 1.18 1.19 1.20 @@ -1470,19 +1469,10 @@ 1.21 __ st_long(Otos_l, __ d_tmp); 1.22 __ ldf(FloatRegisterImpl::D, __ d_tmp, Ftos_d); 1.23 1.24 - if (VM_Version::v9_instructions_work()) { 1.25 - if (bytecode() == Bytecodes::_l2f) { 1.26 - __ fxtof(FloatRegisterImpl::S, Ftos_d, Ftos_f); 1.27 - } else { 1.28 - __ fxtof(FloatRegisterImpl::D, Ftos_d, Ftos_d); 1.29 - } 1.30 + if (bytecode() == Bytecodes::_l2f) { 1.31 + __ fxtof(FloatRegisterImpl::S, Ftos_d, Ftos_f); 1.32 } else { 1.33 - __ call_VM_leaf( 1.34 - Lscratch, 1.35 - bytecode() == Bytecodes::_l2f 1.36 - ? CAST_FROM_FN_PTR(address, SharedRuntime::l2f) 1.37 - : CAST_FROM_FN_PTR(address, SharedRuntime::l2d) 1.38 - ); 1.39 + __ fxtof(FloatRegisterImpl::D, Ftos_d, Ftos_d); 1.40 } 1.41 break; 1.42 1.43 @@ -1490,11 +1480,6 @@ 1.44 Label isNaN; 1.45 // result must be 0 if value is NaN; test by comparing value to itself 1.46 __ fcmp(FloatRegisterImpl::S, Assembler::fcc0, Ftos_f, Ftos_f); 1.47 - // According to the v8 manual, you have to have a non-fp instruction 1.48 - // between fcmp and fb. 1.49 - if (!VM_Version::v9_instructions_work()) { 1.50 - __ nop(); 1.51 - } 1.52 __ fb(Assembler::f_unordered, true, Assembler::pn, isNaN); 1.53 __ delayed()->clr(Otos_i); // NaN 1.54 __ ftoi(FloatRegisterImpl::S, Ftos_f, F30); 1.55 @@ -1537,16 +1522,7 @@ 1.56 break; 1.57 1.58 case Bytecodes::_d2f: 1.59 - if (VM_Version::v9_instructions_work()) { 1.60 __ ftof( FloatRegisterImpl::D, FloatRegisterImpl::S, Ftos_d, Ftos_f); 1.61 - } 1.62 - else { 1.63 - // must uncache tos 1.64 - __ push_d(); 1.65 - __ pop_i(O0); 1.66 - __ pop_i(O1); 1.67 - __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::d2f)); 1.68 - } 1.69 break; 1.70 1.71 default: ShouldNotReachHere(); 1.72 @@ -1956,17 +1932,8 @@ 1.73 __ ld( Rarray, Rscratch, Rscratch ); 1.74 // (Rscratch is already in the native byte-ordering.) 1.75 __ cmp( Rkey, Rscratch ); 1.76 - if ( VM_Version::v9_instructions_work() ) { 1.77 - __ movcc( Assembler::less, false, Assembler::icc, Rh, Rj ); // j = h if (key < array[h].fast_match()) 1.78 - __ movcc( Assembler::greaterEqual, false, Assembler::icc, Rh, Ri ); // i = h if (key >= array[h].fast_match()) 1.79 - } 1.80 - else { 1.81 - Label end_of_if; 1.82 - __ br( Assembler::less, true, Assembler::pt, end_of_if ); 1.83 - __ delayed()->mov( Rh, Rj ); // if (<) Rj = Rh 1.84 - __ mov( Rh, Ri ); // else i = h 1.85 - __ bind(end_of_if); // } 1.86 - } 1.87 + __ movcc( Assembler::less, false, Assembler::icc, Rh, Rj ); // j = h if (key < array[h].fast_match()) 1.88 + __ movcc( Assembler::greaterEqual, false, Assembler::icc, Rh, Ri ); // i = h if (key >= array[h].fast_match()) 1.89 1.90 // while (i+1 < j) 1.91 __ bind( entry ); 1.92 @@ -3418,9 +3385,7 @@ 1.93 // has been allocated. 1.94 __ cmp_and_brx_short(RnewTopValue, RendValue, Assembler::greaterUnsigned, Assembler::pn, slow_case); 1.95 1.96 - __ casx_under_lock(RtopAddr, RoldTopValue, RnewTopValue, 1.97 - VM_Version::v9_instructions_work() ? NULL : 1.98 - (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr()); 1.99 + __ cas_ptr(RtopAddr, RoldTopValue, RnewTopValue); 1.100 1.101 // if someone beat us on the allocation, try again, otherwise continue 1.102 __ cmp_and_brx_short(RoldTopValue, RnewTopValue, Assembler::notEqual, Assembler::pn, retry); 1.103 @@ -3701,14 +3666,7 @@ 1.104 1.105 __ verify_oop(O4); // verify each monitor's oop 1.106 __ tst(O4); // is this entry unused? 1.107 - if (VM_Version::v9_instructions_work()) 1.108 - __ movcc( Assembler::zero, false, Assembler::ptr_cc, O3, O1); 1.109 - else { 1.110 - Label L; 1.111 - __ br( Assembler::zero, true, Assembler::pn, L ); 1.112 - __ delayed()->mov(O3, O1); // rememeber this one if match 1.113 - __ bind(L); 1.114 - } 1.115 + __ movcc( Assembler::zero, false, Assembler::ptr_cc, O3, O1); 1.116 1.117 __ cmp(O4, O0); // check if current entry is for same object 1.118 __ brx( Assembler::equal, false, Assembler::pn, exit );