1.1 --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Thu Jul 21 08:38:25 2011 -0700 1.2 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Thu Jul 21 11:25:07 2011 -0700 1.3 @@ -600,7 +600,7 @@ 1.4 void AdapterGenerator::patch_callers_callsite() { 1.5 Label L; 1.6 __ ld_ptr(G5_method, in_bytes(methodOopDesc::code_offset()), G3_scratch); 1.7 - __ br_null(G3_scratch, false, __ pt, L); 1.8 + __ br_null(G3_scratch, false, Assembler::pt, L); 1.9 // Schedule the branch target address early. 1.10 __ delayed()->ld_ptr(G5_method, in_bytes(methodOopDesc::interpreter_entry_offset()), G3_scratch); 1.11 // Call into the VM to patch the caller, then jump to compiled callee 1.12 @@ -1127,8 +1127,7 @@ 1.13 Label loop; 1.14 __ bind(loop); 1.15 __ sub(L0, 1, L0); 1.16 - __ br_null(L0, false, Assembler::pt, loop); 1.17 - __ delayed()->nop(); 1.18 + __ br_null_short(L0, Assembler::pt, loop); 1.19 1.20 __ restore(); 1.21 } 1.22 @@ -1202,7 +1201,7 @@ 1.23 // the call site corrected. 1.24 __ ld_ptr(G5_method, in_bytes(methodOopDesc::code_offset()), G3_scratch); 1.25 __ bind(ok2); 1.26 - __ br_null(G3_scratch, false, __ pt, skip_fixup); 1.27 + __ br_null(G3_scratch, false, Assembler::pt, skip_fixup); 1.28 __ delayed()->ld_ptr(G5_method, in_bytes(methodOopDesc::interpreter_entry_offset()), G3_scratch); 1.29 __ jump_to(ic_miss, G3_scratch); 1.30 __ delayed()->nop(); 1.31 @@ -1779,9 +1778,7 @@ 1.32 AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub()); 1.33 __ verify_oop(O0); 1.34 __ load_klass(O0, temp_reg); 1.35 - __ cmp(temp_reg, G5_inline_cache_reg); 1.36 - __ brx(Assembler::equal, true, Assembler::pt, L); 1.37 - __ delayed()->nop(); 1.38 + __ cmp_and_brx_short(temp_reg, G5_inline_cache_reg, Assembler::equal, Assembler::pt, L); 1.39 1.40 __ jump_to(ic_miss, temp_reg); 1.41 __ delayed()->nop(); 1.42 @@ -2182,8 +2179,7 @@ 1.43 #ifdef ASSERT 1.44 { Label L; 1.45 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0); 1.46 - __ br_null(O0, false, Assembler::pt, L); 1.47 - __ delayed()->nop(); 1.48 + __ br_null_short(O0, Assembler::pt, L); 1.49 __ stop("no pending exception allowed on exit from IR::monitorenter"); 1.50 __ bind(L); 1.51 } 1.52 @@ -2298,9 +2294,7 @@ 1.53 Address suspend_state(G2_thread, JavaThread::suspend_flags_offset()); 1.54 __ br(Assembler::notEqual, false, Assembler::pn, L); 1.55 __ delayed()->ld(suspend_state, G3_scratch); 1.56 - __ cmp(G3_scratch, 0); 1.57 - __ br(Assembler::equal, false, Assembler::pt, no_block); 1.58 - __ delayed()->nop(); 1.59 + __ cmp_and_br_short(G3_scratch, 0, Assembler::equal, Assembler::pt, no_block); 1.60 __ bind(L); 1.61 1.62 // Block. Save any potential method result value before the operation and 1.63 @@ -2328,9 +2322,7 @@ 1.64 1.65 Label no_reguard; 1.66 __ ld(G2_thread, JavaThread::stack_guard_state_offset(), G3_scratch); 1.67 - __ cmp(G3_scratch, JavaThread::stack_guard_yellow_disabled); 1.68 - __ br(Assembler::notEqual, false, Assembler::pt, no_reguard); 1.69 - __ delayed()->nop(); 1.70 + __ cmp_and_br_short(G3_scratch, JavaThread::stack_guard_yellow_disabled, Assembler::notEqual, Assembler::pt, no_reguard); 1.71 1.72 save_native_result(masm, ret_type, stack_slots); 1.73 __ call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)); 1.74 @@ -2382,8 +2374,7 @@ 1.75 #ifdef ASSERT 1.76 { Label L; 1.77 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0); 1.78 - __ br_null(O0, false, Assembler::pt, L); 1.79 - __ delayed()->nop(); 1.80 + __ br_null_short(O0, Assembler::pt, L); 1.81 __ stop("no pending exception allowed on exit from IR::monitorexit"); 1.82 __ bind(L); 1.83 } 1.84 @@ -2639,9 +2630,7 @@ 1.85 AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub()); 1.86 __ verify_oop(O0); 1.87 __ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), temp_reg); 1.88 - __ cmp(temp_reg, G5_inline_cache_reg); 1.89 - __ brx(Assembler::equal, true, Assembler::pt, L); 1.90 - __ delayed()->nop(); 1.91 + __ cmp_and_brx_short(temp_reg, G5_inline_cache_reg, Assembler::equal, Assembler::pt, L); 1.92 1.93 __ jump_to(ic_miss, temp_reg); 1.94 __ delayed()->nop(); 1.95 @@ -3143,8 +3132,7 @@ 1.96 1.97 gen_new_frame(masm, deopt); // allocate an interpreter frame 1.98 1.99 - __ tst(O4array_size); 1.100 - __ br(Assembler::notZero, false, Assembler::pn, loop); 1.101 + __ cmp_zero_and_br(Assembler::notZero, O4array_size, loop); 1.102 __ delayed()->add(O3array, wordSize, O3array); 1.103 __ ld_ptr(G3pcs, 0, O7); // load final frame new pc 1.104 1.105 @@ -3221,7 +3209,7 @@ 1.106 // pc is now in O7. Return values are still in the expected places 1.107 1.108 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_words); 1.109 - __ ba(false, cont); 1.110 + __ ba(cont); 1.111 __ delayed()->mov(Deoptimization::Unpack_deopt, L0deopt_mode); 1.112 1.113 int exception_offset = __ offset() - start; 1.114 @@ -3256,8 +3244,7 @@ 1.115 // verify that there is really an exception oop in exception_oop 1.116 Label has_exception; 1.117 __ ld_ptr(G2_thread, JavaThread::exception_oop_offset(), Oexception); 1.118 - __ br_notnull(Oexception, false, Assembler::pt, has_exception); 1.119 - __ delayed()-> nop(); 1.120 + __ br_notnull_short(Oexception, Assembler::pt, has_exception); 1.121 __ stop("no exception in thread"); 1.122 __ bind(has_exception); 1.123 1.124 @@ -3265,14 +3252,13 @@ 1.125 Label no_pending_exception; 1.126 Address exception_addr(G2_thread, Thread::pending_exception_offset()); 1.127 __ ld_ptr(exception_addr, Oexception); 1.128 - __ br_null(Oexception, false, Assembler::pt, no_pending_exception); 1.129 - __ delayed()->nop(); 1.130 + __ br_null_short(Oexception, Assembler::pt, no_pending_exception); 1.131 __ stop("must not have pending exception here"); 1.132 __ bind(no_pending_exception); 1.133 } 1.134 #endif 1.135 1.136 - __ ba(false, cont); 1.137 + __ ba(cont); 1.138 __ delayed()->mov(Deoptimization::Unpack_exception, L0deopt_mode);; 1.139 1.140 // 1.141 @@ -3313,9 +3299,7 @@ 1.142 RegisterSaver::restore_result_registers(masm); 1.143 1.144 Label noException; 1.145 - __ cmp(G4deopt_mode, Deoptimization::Unpack_exception); // Was exception pending? 1.146 - __ br(Assembler::notEqual, false, Assembler::pt, noException); 1.147 - __ delayed()->nop(); 1.148 + __ cmp_and_br_short(G4deopt_mode, Deoptimization::Unpack_exception, Assembler::notEqual, Assembler::pt, noException); 1.149 1.150 // Move the pending exception from exception_oop to Oexception so 1.151 // the pending exception will be picked up the interpreter. 1.152 @@ -3359,9 +3343,7 @@ 1.153 // In 32 bit, C2 returns longs in G1 so restore the saved G1 into 1.154 // I0/I1 if the return value is long. 1.155 Label not_long; 1.156 - __ cmp(O0,T_LONG); 1.157 - __ br(Assembler::notEqual, false, Assembler::pt, not_long); 1.158 - __ delayed()->nop(); 1.159 + __ cmp_and_br_short(O0,T_LONG, Assembler::notEqual, Assembler::pt, not_long); 1.160 __ ldd(saved_Greturn1_addr,I0); 1.161 __ bind(not_long); 1.162 #endif 1.163 @@ -3534,9 +3516,7 @@ 1.164 Label pending; 1.165 1.166 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O1); 1.167 - __ tst(O1); 1.168 - __ brx(Assembler::notEqual, true, Assembler::pn, pending); 1.169 - __ delayed()->nop(); 1.170 + __ br_notnull_short(O1, Assembler::pn, pending); 1.171 1.172 RegisterSaver::restore_live_registers(masm); 1.173 1.174 @@ -3623,9 +3603,7 @@ 1.175 Label pending; 1.176 1.177 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O1); 1.178 - __ tst(O1); 1.179 - __ brx(Assembler::notEqual, true, Assembler::pn, pending); 1.180 - __ delayed()->nop(); 1.181 + __ br_notnull_short(O1, Assembler::pn, pending); 1.182 1.183 // get the returned methodOop 1.184