src/cpu/sparc/vm/stubGenerator_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Fri Jul 15 19:09:49 2011
--- new/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Fri Jul 15 19:09:49 2011

*** 148,158 **** --- 148,158 ---- #ifdef ASSERT // make sure we have no pending exceptions { const Register t = G3_scratch; Label L; __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), t); ! __ br_null(t, false, Assembler::pt, L); ! __ br_null_short(t, Assembler::pt, L); __ stop("StubRoutines::call_stub: entered with pending exception"); __ bind(L); } #endif
*** 204,215 **** --- 204,214 ---- // test if any parameters & setup of Lentry_args Label exit; __ ld_ptr(parameter_size.as_in().as_address(), cnt); // parameter counter __ add( FP, STACK_BIAS, dst ); ! __ tst(cnt); __ br(Assembler::zero, false, Assembler::pn, exit); ! __ cmp_zero_and_br(Assembler::zero, cnt, exit); __ delayed()->sub(dst, BytesPerWord, dst); // setup Lentry_args // copy parameters if any Label loop; __ BIND(loop);
*** 279,302 **** --- 278,301 ---- __ BIND(exit); __ ret(); __ delayed()->restore(); __ BIND(is_object); - __ ba(exit, false); __ delayed()->st_ptr(O0, addr, G0); __ BIND(is_float); - __ ba(exit, false); __ delayed()->stf(FloatRegisterImpl::S, F0, addr, G0); __ BIND(is_double); - __ ba(exit, false); __ delayed()->stf(FloatRegisterImpl::D, F0, addr, G0); __ BIND(is_long); #ifdef _LP64 - __ ba(exit, false); __ delayed()->st_long(O0, addr, G0); // store entire long #else #if defined(COMPILER2) // All return values are where we want them, except for Longs. C2 returns // longs in G1 in the 32-bit build whereas the interpreter wants them in O0/O1.
*** 304,318 **** --- 303,317 ---- // build we simply always use G1. // Note: I tried to make c2 return longs in O0/O1 and G1 so we wouldn't have to // do this here. Unfortunately if we did a rethrow we'd see an machepilog node // first which would move g1 -> O0/O1 and destroy the exception we were throwing. - __ ba(exit, false); __ delayed()->stx(G1, addr, G0); // store entire long #else __ st(O1, addr, BytesPerInt); - __ ba(exit, false); __ delayed()->st(O0, addr, G0); #endif /* COMPILER2 */ #endif /* _LP64 */ } return start;
*** 379,389 **** --- 378,388 ---- #ifdef ASSERT // make sure that this code is only executed if there is a pending exception { Label L; __ ld_ptr(exception_addr, Gtemp); ! __ br_notnull(Gtemp, false, Assembler::pt, L); ! __ br_notnull_short(Gtemp, Assembler::pt, L); __ stop("StubRoutines::forward exception: no pending exception (1)"); __ bind(L); } #endif
*** 402,412 **** --- 401,411 ---- __ add(O7, frame::pc_return_offset, Oissuing_pc); // save the issuing PC #ifdef ASSERT // make sure exception is set { Label L; ! __ br_notnull(Oexception, false, Assembler::pt, L); ! __ br_notnull_short(Oexception, Assembler::pt, L); __ stop("StubRoutines::forward exception: no pending exception (2)"); __ bind(L); } #endif // jump to exception handler
*** 496,506 **** --- 495,505 ---- Label L; Address exception_addr(G2_thread, Thread::pending_exception_offset()); Register scratch_reg = Gtemp; __ ld_ptr(exception_addr, scratch_reg); ! __ br_notnull(scratch_reg, false, Assembler::pt, L); ! __ br_notnull_short(scratch_reg, Assembler::pt, L); __ should_not_reach_here(); __ bind(L); #endif // ASSERT BLOCK_COMMENT("call forward_exception_entry"); __ call(StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
*** 608,618 **** --- 607,617 ---- __ set(StubRoutines::Sparc::locked, lock_reg); // Initialize yield counter __ mov(G0,yield_reg); __ BIND(retry); ! __ cmp_and_br(yield_reg, V8AtomicOperationUnderLockSpinCount, Assembler::less, false, Assembler::pt, dontyield); ! __ cmp_and_br_short(yield_reg, V8AtomicOperationUnderLockSpinCount, Assembler::less, Assembler::pt, dontyield); // This code can only be called from inside the VM, this // stub is only invoked from Atomic::add(). We do not // want to use call_VM, because _last_java_sp and such // must already be set.
*** 668,678 **** --- 667,677 ---- __ mov(O0, O3); // scratch copy of exchange value __ ld(O1, 0, O2); // observe the previous value // try to replace O2 with O3 __ cas_under_lock(O1, O2, O3, (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr(),false); ! __ cmp_and_br(O2, O3, Assembler::notEqual, false, Assembler::pn, retry); ! __ cmp_and_br_short(O2, O3, Assembler::notEqual, Assembler::pn, retry); __ retl(false); __ delayed()->mov(O2, O0); // report previous value to caller } else {
*** 790,800 **** --- 789,799 ---- __ BIND(retry); __ lduw(O1, 0, O2); __ add(O0, O2, O3); __ cas(O1, O2, O3); ! __ cmp_and_br(O2, O3, Assembler::notEqual, false, Assembler::pn, retry); ! __ cmp_and_br_short(O2, O3, Assembler::notEqual, Assembler::pn, retry); __ retl(false); __ delayed()->add(O0, O2, O0); // note that cas made O2==O3 } else { const Register& lock_reg = O2; const Register& lock_ptr_reg = O3;
*** 1358,1368 **** --- 1357,1367 ---- generate_disjoint_long_copy_core(aligned); __ mov(G4, count); // Restore count // copy tailing bytes __ BIND(L_copy_byte); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ align(OptoLoopAlignment); __ BIND(L_copy_byte_loop); __ ldub(from, offset, O3); __ deccc(count); __ stb(O3, to, offset);
*** 1469,1479 **** --- 1468,1478 ---- __ delayed()->stx(O4, end_to, 0); __ inc(count, 16); // copy 1 element (2 bytes) at a time __ BIND(L_copy_byte); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ align(OptoLoopAlignment); __ BIND(L_copy_byte_loop); __ dec(end_from); __ dec(end_to); __ ldub(end_from, 0, O4);
*** 1586,1596 **** --- 1585,1595 ---- generate_disjoint_long_copy_core(aligned); __ mov(G4, count); // restore // copy 1 element at a time __ BIND(L_copy_2_bytes); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ align(OptoLoopAlignment); __ BIND(L_copy_2_bytes_loop); __ lduh(from, offset, O3); __ deccc(count); __ sth(O3, to, offset);
*** 1931,1941 **** --- 1930,1940 ---- __ delayed()->stx(O4, end_to, 0); __ inc(count, 8); // copy 1 element (2 bytes) at a time __ BIND(L_copy_2_bytes); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ BIND(L_copy_2_bytes_loop); __ dec(end_from, 2); __ dec(end_to, 2); __ lduh(end_from, 0, O4); __ deccc(count);
*** 2044,2054 **** --- 2043,2053 ---- generate_disjoint_long_copy_core(aligned); __ mov(G4, count); // Restore // copy 1 element at a time __ BIND(L_copy_4_bytes); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ BIND(L_copy_4_bytes_loop); __ ld(from, offset, O3); __ deccc(count); __ st(O3, to, offset); __ brx(Assembler::notZero, false, Assembler::pt, L_copy_4_bytes_loop);
*** 2176,2186 **** --- 2175,2185 ---- __ delayed()->stx(O4, end_to, 0); __ inc(count, 4); // copy 1 element (4 bytes) at a time __ BIND(L_copy_4_bytes); ! __ br_zero(count, L_exit); ! __ cmp_and_br_short(count, 0, Assembler::equal, Assembler::pt, L_exit); __ BIND(L_copy_4_bytes_loop); __ dec(end_from, 4); __ dec(end_to, 4); __ ld(end_from, 0, O4); __ deccc(count);
*** 2558,2568 **** --- 2557,2567 ---- __ save_frame(0); __ check_klass_subtype_slow_path(sub_klass->after_save(), super_klass->after_save(), L0, L1, L2, L4, NULL, &L_pop_to_miss); - __ ba(L_success, false); __ delayed()->restore(); __ bind(L_pop_to_miss); __ restore();
*** 2655,2665 **** --- 2654,2664 ---- __ delayed()->set(0, O0); // return -1 on success // ======== loop entry is here ======== __ BIND(load_element); __ load_heap_oop(O0_from, O5_offset, G3_oop); // load the oop ! __ br_null(G3_oop, true, Assembler::pt, store_element); ! __ br_null_short(G3_oop, Assembler::pt, store_element); __ load_klass(G3_oop, G4_klass); // query the object klass generate_type_check(G4_klass, O3_ckoff, O4_ckval, G5_super, // branch to this on success:
*** 2877,2887 **** --- 2876,2886 ---- #ifdef ASSERT // assert(src->klass() != NULL); BLOCK_COMMENT("assert klasses not null"); { Label L_a, L_b; ! __ br_notnull(G3_src_klass, false, Assembler::pt, L_b); // it is broken if klass is NULL ! __ br_notnull_short(G3_src_klass, Assembler::pt, L_b); // it is broken if klass is NULL __ bind(L_a); __ stop("broken null klass"); __ bind(L_b); __ load_klass(dst, G4_dst_klass); __ br_null(G4_dst_klass, false, Assembler::pn, L_a, false); // this would be broken also
*** 2917,2927 **** --- 2916,2926 ---- } else { __ delayed()->ld_ptr(dst, oopDesc::klass_offset_in_bytes(), G4_dst_klass); } // if (src->klass() != dst->klass()) return -1; ! __ cmp_and_brx(G3_src_klass, G4_dst_klass, Assembler::notEqual, false, Assembler::pn, L_failed); ! __ cmp_and_brx_short(G3_src_klass, G4_dst_klass, Assembler::notEqual, Assembler::pn, L_failed); // if (!src->is_Array()) return -1; __ cmp(G5_lh, Klass::_lh_neutral_value); // < 0 __ br(Assembler::greaterEqual, false, Assembler::pn, L_failed);
*** 2985,2995 **** --- 2984,2994 ---- __ cmp(G3_elsize, LogBytesPerInt); __ br(Assembler::equal, true, Assembler::pt, entry_jint_arraycopy); __ delayed()->signx(length, count); // length #ifdef ASSERT { Label L; ! __ cmp_and_br(G3_elsize, LogBytesPerLong, Assembler::equal, false, Assembler::pt, L); ! __ cmp_and_br_short(G3_elsize, LogBytesPerLong, Assembler::equal, Assembler::pt, L); __ stop("must be long copy, but elsize is wrong"); __ bind(L); } #endif __ br(Assembler::always, false, Assembler::pt, entry_jlong_arraycopy);

src/cpu/sparc/vm/stubGenerator_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File