Lines Matching defs:__
40 #define __ _masm->
159 int offset = __ offset();
160 __ inline_cache_check(O0, G5_inline_cache_reg);
180 __ build_frame(initial_frame_size_in_bytes());
214 __ ld_ptr(OSR_buf, slot_offset + 1*BytesPerWord, O7);
215 __ cmp_and_br_short(O7, G0, Assembler::notEqual, Assembler::pt, L);
216 __ stop("locked object is NULL");
217 __ bind(L);
221 __ ld_ptr(OSR_buf, slot_offset + 0, O7);
222 __ st_ptr(O7, frame_map()->address_for_monitor_lock(i));
223 __ ld_ptr(OSR_buf, slot_offset + 1*BytesPerWord, O7);
224 __ st_ptr(O7, frame_map()->address_for_monitor_object(i));
257 __ load_heap_oop(str0, value_offset, tmp0);
258 __ ld(str0, offset_offset, tmp2);
259 __ add(tmp0, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0);
260 __ ld(str0, count_offset, str0);
261 __ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
263 __ load_heap_oop(str0, value_offset, tmp1);
264 __ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0);
265 __ ld(tmp1, arrayOopDesc::length_offset_in_bytes(), str0);
274 __ load_heap_oop(str1, value_offset, tmp1);
275 __ add(tmp0, tmp2, tmp0);
277 __ ld(str1, offset_offset, tmp2);
278 __ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1);
279 __ ld(str1, count_offset, str1);
280 __ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
281 __ add(tmp1, tmp2, tmp1);
283 __ load_heap_oop(str1, value_offset, tmp2);
284 __ add(tmp2, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1);
285 __ ld(tmp2, arrayOopDesc::length_offset_in_bytes(), str1);
287 __ subcc(str0, str1, O7);
297 __ sll(count0, exact_log2(sizeof(jchar)), limit); // string0 is shorter
298 __ br(Assembler::greater, true, Assembler::pt, Lskip);
299 __ delayed()->sll(count1, exact_log2(sizeof(jchar)), limit); // string1 is shorter
300 __ bind(Lskip);
303 __ cmp(limit, 0);
304 __ br(Assembler::equal, true, Assembler::pn, Ldone);
305 __ delayed()->mov(O7, result); // result is difference in lengths
319 __ add(base0, limit, base0);
320 __ add(base1, limit, base1);
321 __ neg(limit); // limit = -min{string0.length(), string1.length()}
323 __ lduh(base0, limit, chr0);
324 __ bind(Lloop);
325 __ lduh(base1, limit, chr1);
326 __ subcc(chr0, chr1, chr0);
327 __ br(Assembler::notZero, false, Assembler::pn, Ldone);
329 __ delayed()->inccc(limit, sizeof(jchar));
330 __ br(Assembler::notZero, true, Assembler::pt, Lloop);
331 __ delayed()->lduh(base0, limit, chr0);
335 __ mov(O7, result);
338 __ bind(Ldone);
355 __ add(reg, offset, lock_reg);
358 __ set(offset, lock_reg);
359 __ add(reg, lock_reg, lock_reg);
370 __ unlock_object(hdr, obj_reg, lock_reg, *slow_case->entry());
378 __ br(Assembler::always, false, Assembler::pt, *slow_case->entry());
379 __ delayed()->nop();
382 __ bind(*slow_case->continuation());
392 __ nop();
397 address handler_base = __ start_a_stub(exception_handler_size);
407 __ call(Runtime1::entry_for(Runtime1::handle_exception_from_callee_id), relocInfo::runtime_call_type);
408 __ delayed()->nop();
409 __ should_not_reach_here();
411 __ end_a_stub();
429 __ ld_ptr(G2_thread, in_bytes(JavaThread::exception_oop_offset()), O0);
430 __ st_ptr(G0, G2_thread, in_bytes(JavaThread::exception_oop_offset()));
431 __ st_ptr(G0, G2_thread, in_bytes(JavaThread::exception_pc_offset()));
433 __ bind(_unwind_handler_entry);
434 __ verify_not_null_oop(O0);
436 __ mov(O0, I0); // Preserve the exception
444 __ unlock_object(I3, I2, I1, *stub->entry());
445 __ bind(*stub->continuation());
449 __ mov(G2_thread, O0);
451 __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type);
452 __ delayed()->nop();
456 __ mov(I0, O0); // Restore the exception
460 __ call(Runtime1::entry_for(Runtime1::unwind_exception_id), relocInfo::runtime_call_type);
461 __ delayed()->nop();
478 __ nop();
482 address handler_base = __ start_a_stub(deopt_handler_size);
491 __ JUMP(deopt_blob, G3_scratch, 0); // sethi;jmp
492 __ delayed()->nop();
494 __ end_a_stub();
502 __ set(NULL_WORD, reg);
504 int oop_index = __ oop_recorder()->find_index(o);
506 __ set(NULL_WORD, reg, rspec); // Will be set when the nmethod is created
513 int oop_index = __ oop_recorder()->allocate_index((jobject)NULL);
521 __ patchable_set(addrlit, reg);
549 __ srl(Rdividend, 31, Rscratch);
551 __ sra(Rdividend, 31, Rscratch);
552 __ and3(Rscratch, divisor - 1, Rscratch);
554 __ add(Rdividend, Rscratch, Rscratch);
555 __ sra(Rscratch, log2_intptr(divisor), Rresult);
559 __ srl(Rdividend, 31, Rscratch);
561 __ sra(Rdividend, 31, Rscratch);
562 __ and3(Rscratch, divisor - 1,Rscratch);
564 __ add(Rdividend, Rscratch, Rscratch);
565 __ andn(Rscratch, divisor - 1,Rscratch);
566 __ sub(Rdividend, Rscratch, Rresult);
571 __ sra(Rdividend, 31, Rscratch);
572 __ wry(Rscratch);
575 __ nop();
576 __ nop();
577 __ nop();
578 __ nop();
584 __ sdivcc(Rdividend, Rdivisor, (op->code() == lir_idiv ? Rresult : Rscratch));
587 __ sdivcc(Rdividend, divisor, (op->code() == lir_idiv ? Rresult : Rscratch));
591 __ br(Assembler::overflowSet, true, Assembler::pn, skip);
592 __ delayed()->Assembler::sethi(0x80000000, (op->code() == lir_idiv ? Rresult : Rscratch));
593 __ bind(skip);
597 __ smul(Rscratch, Rdivisor, Rscratch);
599 __ smul(Rscratch, divisor, Rscratch);
601 __ sub(Rdividend, Rscratch, Rresult);
615 __ br(Assembler::always, false, Assembler::pt, *(op->label()));
631 __ nop();
633 __ fb( acond, false, Assembler::pn, *(op->label()));
657 __ br(acond, false, Assembler::pn, *(op->label()));
660 __ brx(acond, false, Assembler::pn, *(op->label()));
676 __ sra(rval, 0, rlo);
678 __ mov(rval, rlo);
679 __ sra(rval, BitsPerInt-1, rhi);
690 __ fmov(FloatRegisterImpl::S, rsrc, rdst);
692 __ fitof(w, rdst, rdst);
700 __ fcmp(FloatRegisterImpl::S, Assembler::fcc0, rsrc, rsrc);
702 __ nop();
704 __ fb(Assembler::f_unordered, true, Assembler::pn, L);
705 __ delayed()->st(G0, addr); // annuled if contents of rsrc is not NaN
706 __ ftoi(FloatRegisterImpl::S, rsrc, rsrc);
708 __ stf(FloatRegisterImpl::S, rsrc, addr.base(), addr.disp());
709 __ bind (L);
717 __ sra(rlo, 0, rdst);
719 __ mov(rlo, rdst);
732 __ ftof(vw, dw, rval, rdst);
740 __ sll (rval, shift, rdst);
741 __ sra (rdst, shift, rdst);
748 __ sll (rval, shift, rdst);
749 __ srl (rdst, shift, rdst);
764 __ call(op->addr(), rtype);
772 __ set_oop((jobject)Universe::non_oop_word(), G5_inline_cache_reg);
773 __ relocate(rspec);
774 __ call(op->addr(), relocInfo::none);
782 __ load_klass(O0, G3_scratch);
784 __ ld_ptr(G3_scratch, op->vtable_offset(), G5_method);
787 __ set(op->vtable_offset(), G5_method);
789 __ ld_ptr(G3_scratch, G5_method, G5_method);
791 __ ld_ptr(G5_method, methodOopDesc::from_compiled_offset(), G3_scratch);
792 __ callr(G3_scratch, G0);
801 __ set(offset, O7);
805 __ verify_oop(from_reg->as_register());
810 case T_BYTE : __ stb(from_reg->as_register(), base, offset); break;
811 case T_CHAR : __ sth(from_reg->as_register(), base, offset); break;
812 case T_SHORT : __ sth(from_reg->as_register(), base, offset); break;
813 case T_INT : __ stw(from_reg->as_register(), base, offset); break;
817 __ srax(from_reg->as_register_lo(), 32, O7);
818 __ stw(from_reg->as_register_lo(), base, offset + lo_word_offset_in_bytes);
819 __ stw(O7, base, offset + hi_word_offset_in_bytes);
821 __ stx(from_reg->as_register_lo(), base, offset);
825 __ stw(from_reg->as_register_lo(), base, offset + lo_word_offset_in_bytes);
826 __ stw(from_reg->as_register_hi(), base, offset + hi_word_offset_in_bytes);
830 __ st_ptr(from_reg->as_register(), base, offset);
836 __ encode_heap_oop(from_reg->as_register(), G3_scratch);
838 __ stw(G3_scratch, base, offset);
840 __ st_ptr(from_reg->as_register(), base, offset);
845 case T_FLOAT : __ stf(FloatRegisterImpl::S, from_reg->as_float_reg(), base, offset); break;
852 __ stf(FloatRegisterImpl::S, reg->successor(), base, offset + 4);
853 __ stf(FloatRegisterImpl::S, reg, base, offset);
855 __ stf(FloatRegisterImpl::D, reg, base, offset);
868 __ verify_oop(from_reg->as_register());
873 case T_BYTE : __ stb(from_reg->as_register(), base, disp); break;
874 case T_CHAR : __ sth(from_reg->as_register(), base, disp); break;
875 case T_SHORT : __ sth(from_reg->as_register(), base, disp); break;
876 case T_INT : __ stw(from_reg->as_register(), base, disp); break;
879 __ stx(from_reg->as_register_lo(), base, disp);
882 __ std(from_reg->as_register_hi(), base, disp);
886 __ st_ptr(from_reg->as_register(), base, disp);
892 __ encode_heap_oop(from_reg->as_register(), G3_scratch);
894 __ stw(G3_scratch, base, disp);
896 __ st_ptr(from_reg->as_register(), base, disp);
900 case T_FLOAT : __ stf(FloatRegisterImpl::S, from_reg->as_float_reg(), base, disp); break;
901 case T_DOUBLE: __ stf(FloatRegisterImpl::D, from_reg->as_double_reg(), base, disp); break;
914 __ set(offset, O7);
920 case T_BYTE : __ ldsb(base, offset, to_reg->as_register()); break;
921 case T_CHAR : __ lduh(base, offset, to_reg->as_register()); break;
922 case T_SHORT : __ ldsh(base, offset, to_reg->as_register()); break;
923 case T_INT : __ ld(base, offset, to_reg->as_register()); break;
927 __ ldx(base, offset, to_reg->as_register_lo());
931 __ ldd(base, offset, to_reg->as_register_hi());
937 __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_lo());
938 __ lduw(base, offset + lo_word_offset_in_bytes, O7); // in case O7 is base or offset, use it last
939 __ sllx(to_reg->as_register_lo(), 32, to_reg->as_register_lo());
940 __ or3(to_reg->as_register_lo(), O7, to_reg->as_register_lo());
943 __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi());
944 __ ld(base, offset + lo_word_offset_in_bytes, to_reg->as_register_lo());
946 __ ld(base, offset + lo_word_offset_in_bytes, to_reg->as_register_lo());
947 __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi());
952 case T_ADDRESS: __ ld_ptr(base, offset, to_reg->as_register()); break;
957 __ lduw(base, offset, to_reg->as_register());
958 __ decode_heap_oop(to_reg->as_register());
960 __ ld_ptr(base, offset, to_reg->as_register());
964 case T_FLOAT: __ ldf(FloatRegisterImpl::S, base, offset, to_reg->as_float_reg()); break;
970 __ ldf(FloatRegisterImpl::S, base, offset + 4, reg->successor());
971 __ ldf(FloatRegisterImpl::S, base, offset, reg);
973 __ ldf(FloatRegisterImpl::D, base, offset, to_reg->as_double_reg());
980 __ verify_oop(to_reg->as_register());
991 case T_BYTE : __ ldsb(base, disp, to_reg->as_register()); break;
992 case T_CHAR : __ lduh(base, disp, to_reg->as_register()); break;
993 case T_SHORT : __ ldsh(base, disp, to_reg->as_register()); break;
994 case T_INT : __ ld(base, disp, to_reg->as_register()); break;
995 case T_ADDRESS: __ ld_ptr(base, disp, to_reg->as_register()); break;
1000 __ lduw(base, disp, to_reg->as_register());
1001 __ decode_heap_oop(to_reg->as_register());
1003 __ ld_ptr(base, disp, to_reg->as_register());
1007 case T_FLOAT: __ ldf(FloatRegisterImpl::S, base, disp, to_reg->as_float_reg()); break;
1008 case T_DOUBLE: __ ldf(FloatRegisterImpl::D, base, disp, to_reg->as_double_reg()); break;
1011 __ ldx(base, disp, to_reg->as_register_lo());
1015 __ ldd(base, disp, to_reg->as_register_hi());
1021 __ verify_oop(to_reg->as_register());
1036 __ set(value, O7);
1039 __ stw(src_reg, addr.base(), addr.disp());
1048 __ set(value, O7);
1051 __ st_ptr(src_reg, addr.base(), addr.disp());
1058 __ st_ptr(src_reg, addr.base(), addr.disp());
1070 __ set(value_lo, O7);
1072 __ stw(tmp, addr.base(), addr.disp() + lo_word_offset_in_bytes);
1077 __ set(value_hi, O7);
1079 __ stw(tmp, addr.base(), addr.disp() + hi_word_offset_in_bytes);
1103 __ set(value, O7);
1125 __ set(value_lo, O7);
1132 __ set(value_hi, O7);
1178 __ set(con, to_reg->as_register());
1183 __ set(con, O7);
1185 __ st(O7, temp_slot);
1186 __ ldf(FloatRegisterImpl::S, temp_slot, to_reg->as_float_reg());
1197 __ set(con, to_reg->as_register_lo());
1199 __ set(low(con), to_reg->as_register_lo());
1200 __ set(high(con), to_reg->as_register_hi());
1204 __ set(con, to_reg->as_register());
1211 __ set(low(con), O7);
1212 __ st(O7, temp_slot_lo);
1213 __ set(high(con), O7);
1214 __ st(O7, temp_slot_hi);
1215 __ ldf(FloatRegisterImpl::D, temp_slot_lo, to_reg->as_double_reg());
1232 address const_addr = __ float_constant(c->as_jfloat());
1240 __ patchable_sethi(const_addrlit, O7);
1241 __ relocate(rspec);
1242 __ ldf(FloatRegisterImpl::S, O7, const_addrlit.low10(), to_reg->as_float_reg());
1247 __ set(const_addrlit, O7);
1248 __ ld(O7, 0, to_reg->as_register());
1255 address const_addr = __ double_constant(c->as_jdouble());
1264 __ patchable_sethi(const_addrlit, O7);
1265 __ relocate(rspec);
1266 __ ldf (FloatRegisterImpl::D, O7, const_addrlit.low10(), to_reg->as_double_reg());
1270 __ set(jlong_cast(c->as_jdouble()), to_reg->as_register_lo());
1272 __ set(low(jlong_cast(c->as_jdouble())), to_reg->as_register_lo());
1273 __ set(high(jlong_cast(c->as_jdouble())), to_reg->as_register_hi());
1304 __ lduw(from.base(), from.disp(), tmp);
1305 __ stw(tmp, to.base(), to.disp());
1312 __ ld_ptr(from.base(), from.disp(), tmp);
1313 __ st_ptr(tmp, to.base(), to.disp());
1321 __ lduw(from.base(), from.disp(), tmp);
1322 __ stw(tmp, to.base(), to.disp());
1323 __ lduw(from.base(), from.disp() + 4, tmp);
1324 __ stw(tmp, to.base(), to.disp() + 4);
1358 __ verify_oop(src);
1372 __ patchable_set(0, O7);
1374 __ set(disp_value, O7);
1379 __ add(src, addr->index()->as_register(), O7);
1411 __ prefetch(from_addr, Assembler::severalReads);
1421 __ prefetch(from_addr, Assembler::severalWritesAndPossiblyReads);
1456 __ fmov(FloatRegisterImpl::D, from_reg->as_double_reg(), to_reg->as_double_reg());
1460 __ fmov(FloatRegisterImpl::S, from_reg->as_float_reg(), to_reg->as_float_reg());
1465 __ mov(from_reg->as_pointer_register(), to_reg->as_pointer_register());
1472 __ mov(from_reg->as_register_hi(), to_reg->as_register_hi());
1473 __ mov(from_reg->as_register_lo(), to_reg->as_register_lo());
1478 __ mov(from_reg->as_register(), to_reg->as_register_lo());
1482 __ mov(from_reg->as_register(), to_reg->as_register());
1488 __ verify_oop(to_reg->as_register());
1504 __ verify_oop(src);
1518 __ patchable_set(0, O7);
1520 __ set(disp_value, O7);
1525 __ add(src, addr->index()->as_register(), O7);
1559 __ sllx(I0, 32, G1); // Shift bits into high G1
1560 __ srl (I1, 0, I1); // Zero extend O1 (harmless?)
1561 __ or3 (I1, G1, G1); // OR 64 bits into G1
1564 __ set(0xdeadbeef, I0);
1565 __ set(0xdeadbeef, I1);
1569 __ set((intptr_t)os::get_polling_page(), L0);
1570 __ relocate(relocInfo::poll_return_type);
1571 __ ld_ptr(L0, 0, G0);
1572 __ ret();
1573 __ delayed()->restore();
1578 __ set((intptr_t)os::get_polling_page(), tmp->as_register());
1582 __ relocate(relocInfo::poll_type);
1585 int offset = __ offset();
1586 __ ld_ptr(tmp->as_register(), 0, G0);
1593 address call_pc = __ pc();
1594 address stub = __ start_a_stub(call_stub_size);
1600 int start = __ offset();
1601 __ relocate(static_stub_Relocation::spec(call_pc));
1603 __ set_oop(NULL, G5);
1606 __ jump_to(addrlit, G3);
1607 __ delayed()->nop();
1609 assert(__ offset() - start <= call_stub_size, "stub too big");
1610 __ end_a_stub();
1616 __ fcmp(FloatRegisterImpl::S, Assembler::fcc0, opr1->as_float_reg(), opr2->as_float_reg());
1618 __ fcmp(FloatRegisterImpl::D, Assembler::fcc0, opr1->as_double_reg(), opr2->as_double_reg());
1625 __ cmp(opr1->as_register(), con);
1627 __ set(con, O7);
1628 __ cmp(opr1->as_register(), O7);
1637 __ cmp(opr1->as_register(), 0);
1640 __ cmp(opr1->as_register(), O7);
1653 if ( type == T_OBJECT ) __ ld_ptr(as_Address(addr), O7);
1654 else __ ld(as_Address(addr), O7);
1655 __ cmp(opr1->as_register(), O7);
1657 __ cmp(opr1->as_register(), opr2->as_register());
1666 __ orcc(xhi, G0, G0);
1668 __ orcc(xhi, xlo, G0);
1674 __ cmp(xlo, ylo);
1676 __ subcc(xlo, ylo, xlo);
1677 __ subccc(xhi, yhi, xhi);
1679 __ orcc(xhi, xlo, G0);
1689 if ( type == T_OBJECT ) __ ld_ptr(as_Address(addr), O7);
1690 else __ ld(as_Address(addr), O7);
1691 __ cmp(O7, opr2->as_constant_ptr()->as_jint());
1702 __ float_cmp(true, is_unordered_less ? -1 : 1, left->as_float_reg(), right->as_float_reg(), dst->as_register());
1704 __ float_cmp(false, is_unordered_less ? -1 : 1, left->as_double_reg(), right->as_double_reg(), dst->as_register());
1710 __ lcmp(left->as_register_lo(), right->as_register_lo(), dst->as_register());
1712 __ lcmp(left->as_register_hi(), left->as_register_lo(),
1741 __ sethi(opr1->as_jint(), dest);
1755 __ br(acond, false, Assembler::pt, skip);
1758 __ brx(acond, false, Assembler::pt, skip); // checks icc on 32bit and xcc on 64bit
1762 __ delayed()->or3(G0, opr1->as_jint(), dest);
1765 __ delayed()->or3(dest, opr1->as_jint() & 0x3ff, dest);
1769 __ delayed()->nop();
1780 __ bind(skip);
1807 case lir_add: __ fadd(w, lreg, rreg, res); break;
1808 case lir_sub: __ fsub(w, lreg, rreg, res); break;
1810 case lir_mul_strictfp: __ fmul(w, lreg, rreg, res); break;
1812 case lir_div_strictfp: __ fdiv(w, lreg, rreg, res); break;
1824 __ add(op1_lo, op2_lo, dst_lo);
1828 __ sub(op1_lo, op2_lo, dst_lo);
1843 __ addcc(op1_lo, op2_lo, dst_lo);
1844 __ addc (op1_hi, op2_hi, dst_hi);
1848 __ subcc(op1_lo, op2_lo, dst_lo);
1849 __ subc (op1_hi, op2_hi, dst_hi);
1862 case lir_add: __ add (lreg, rreg, res); break;
1863 case lir_sub: __ sub (lreg, rreg, res); break;
1864 case lir_mul: __ mult (lreg, rreg, res); break;
1877 case lir_add: __ add (lreg, simm13, res); break;
1878 case lir_sub: __ sub (lreg, simm13, res); break;
1879 case lir_mul: __ mult (lreg, simm13, res); break;
1889 case lir_add: __ add (lreg, (int)con, res); break;
1890 case lir_sub: __ sub (lreg, (int)con, res); break;
1891 case lir_mul: __ mult (lreg, (int)con, res); break;
1917 __ fsqrt(FloatRegisterImpl::D, src_reg, dst_reg);
1924 __ fabs(FloatRegisterImpl::D, src_reg, dst_reg);
1940 case lir_logic_and: __ and3 (left->as_register(), simm13, dest->as_register()); break;
1941 case lir_logic_or: __ or3 (left->as_register(), simm13, dest->as_register()); break;
1942 case lir_logic_xor: __ xor3 (left->as_register(), simm13, dest->as_register()); break;
1952 __ and3 (left->as_register_hi(), 0, dest->as_register_hi());
1954 __ and3 (left->as_register_lo(), simm13, dest->as_register_lo());
1959 __ or3 (left->as_register_hi(), 0, dest->as_register_hi());
1961 __ or3 (left->as_register_lo(), simm13, dest->as_register_lo());
1966 __ xor3 (left->as_register_hi(), 0, dest->as_register_hi());
1968 __ xor3 (left->as_register_lo(), simm13, dest->as_register_lo());
1979 case lir_logic_and: __ and3 (left->as_register(), right->as_register(), dest->as_register()); break;
1980 case lir_logic_or: __ or3 (left->as_register(), right->as_register(), dest->as_register()); break;
1981 case lir_logic_xor: __ xor3 (left->as_register(), right->as_register(), dest->as_register()); break;
1992 case lir_logic_and: __ and3 (l, r, dest->as_register_lo()); break;
1993 case lir_logic_or: __ or3 (l, r, dest->as_register_lo()); break;
1994 case lir_logic_xor: __ xor3 (l, r, dest->as_register_lo()); break;
2000 __ and3 (left->as_register_hi(), right->as_register_hi(), dest->as_register_hi());
2001 __ and3 (left->as_register_lo(), right->as_register_lo(), dest->as_register_lo());
2005 __ or3 (left->as_register_hi(), right->as_register_hi(), dest->as_register_hi());
2006 __ or3 (left->as_register_lo(), right->as_register_lo(), dest->as_register_lo());
2010 __ xor3 (left->as_register_hi(), right->as_register_hi(), dest->as_register_hi());
2011 __ xor3 (left->as_register_lo(), right->as_register_lo(), dest->as_register_lo());
2042 address pc_for_athrow = __ pc();
2043 int pc_for_athrow_offset = __ offset();
2045 __ set(pc_for_athrow, Oissuing_pc, rspec);
2048 __ call(Runtime1::entry_for(Runtime1::handle_exception_id), relocInfo::runtime_call_type);
2049 __ delayed()->nop();
2056 __ br(Assembler::always, false, Assembler::pt, _unwind_handler_entry);
2057 __ delayed()->nop();
2077 __ sra(dst_pos, 0, dst_pos);
2078 __ sra(src_pos, 0, src_pos);
2079 __ sra(length, 0, length);
2090 __ mov(src, O0);
2091 __ mov(src_pos, O1);
2092 __ mov(dst, O2);
2093 __ mov(dst_pos, O3);
2094 __ mov(length, O4);
2098 __ call_VM_leaf(tmp, CAST_FROM_FN_PTR(address, Runtime1::arraycopy));
2103 __ inc_counter(counter, G1, G3);
2106 __ call_VM_leaf(tmp, copyfunc_addr);
2110 __ xor3(O0, -1, tmp);
2111 __ sub(length, tmp, length);
2112 __ add(src_pos, tmp, src_pos);
2113 __ cmp_zero_and_br(Assembler::less, O0, *stub->entry());
2114 __ delayed()->add(dst_pos, tmp, dst_pos);
2116 __ cmp_zero_and_br(Assembler::less, O0, *stub->entry());
2117 __ delayed()->nop();
2119 __ bind(*stub->continuation());
2127 __ tst(src);
2128 __ brx(Assembler::equal, false, Assembler::pn, *stub->entry());
2129 __ delayed()->nop();
2133 __ tst(dst);
2134 __ brx(Assembler::equal, false, Assembler::pn, *stub->entry());
2135 __ delayed()->nop();
2140 __ cmp_zero_and_br(Assembler::less, src_pos, *stub->entry());
2141 __ delayed()->nop();
2146 __ cmp_zero_and_br(Assembler::less, dst_pos, *stub->entry());
2147 __ delayed()->nop();
2152 __ cmp_zero_and_br(Assembler::less, length, *stub->entry());
2153 __ delayed()->nop();
2157 __ ld(src, arrayOopDesc::length_offset_in_bytes(), tmp2);
2158 __ add(length, src_pos, tmp);
2159 __ cmp(tmp2, tmp);
2160 __ br(Assembler::carrySet, false, Assembler::pn, *stub->entry());
2161 __ delayed()->nop();
2165 __ ld(dst, arrayOopDesc::length_offset_in_bytes(), tmp2);
2166 __ add(length, dst_pos, tmp);
2167 __ cmp(tmp2, tmp);
2168 __ br(Assembler::carrySet, false, Assembler::pn, *stub->entry());
2169 __ delayed()->nop();
2180 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp);
2181 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2);
2182 __ cmp(tmp, tmp2);
2183 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry());
2185 __ ld_ptr(src, oopDesc::klass_offset_in_bytes(), tmp);
2186 __ ld_ptr(dst, oopDesc::klass_offset_in_bytes(), tmp2);
2187 __ cmp(tmp, tmp2);
2188 __ brx(Assembler::notEqual, false, Assembler::pt, *stub->entry());
2190 __ delayed()->nop();
2199 __ load_klass(src, G3);
2200 __ load_klass(dst, G1);
2202 __ check_klass_subtype_fast_path(G3, G1, tmp, tmp2, &cont, copyfunc_addr == NULL ? stub->entry() : &slow, NULL);
2204 __ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
2205 __ delayed()->nop();
2207 __ cmp(G3, 0);
2211 __ br(Assembler::notEqual, false, Assembler::pt, cont);
2212 __ delayed()->nop();
2214 __ bind(slow);
2222 __ load_klass(src, tmp);
2224 __ load_klass(dst, tmp);
2228 __ lduw(tmp, lh_offset, tmp2);
2231 __ set(objArray_lh, tmp);
2232 __ cmp(tmp, tmp2);
2233 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry());
2234 __ delayed()->nop();
2243 __ add(src, arrayOopDesc::base_offset_in_bytes(basic_type), src_ptr);
2245 __ add(src_ptr, src_pos, src_ptr);
2247 __ sll(src_pos, shift, tmp);
2248 __ add(src_ptr, tmp, src_ptr);
2251 __ add(dst, arrayOopDesc::base_offset_in_bytes(basic_type), dst_ptr);
2253 __ add(dst_ptr, dst_pos, dst_ptr);
2255 __ sll(dst_pos, shift, tmp);
2256 __ add(dst_ptr, tmp, dst_ptr);
2258 __ mov(length, len);
2259 __ load_klass(dst, tmp);
2262 __ ld_ptr(tmp, ek_offset, super_k);
2265 __ lduw(super_k, sco_offset, chk_off);
2267 __ call_VM_leaf(tmp, copyfunc_addr);
2272 __ br_notnull_short(O0, Assembler::pn, failed);
2273 __ inc_counter((address)&Runtime1::_arraycopy_checkcast_cnt, G1, G3);
2274 __ bind(failed);
2278 __ br_null(O0, false, Assembler::pt, *stub->continuation());
2279 __ delayed()->xor3(O0, -1, tmp);
2283 __ inc_counter((address)&Runtime1::_arraycopy_checkcast_attempt_cnt, G1, G3);
2287 __ sub(length, tmp, length);
2288 __ add(src_pos, tmp, src_pos);
2289 __ br(Assembler::always, false, Assembler::pt, *stub->entry());
2290 __ delayed()->add(dst_pos, tmp, dst_pos);
2292 __ bind(cont);
2294 __ br(Assembler::equal, false, Assembler::pn, *stub->entry());
2295 __ delayed()->nop();
2296 __ bind(cont);
2315 __ encode_heap_oop(tmp);
2318 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2);
2320 __ cmp(tmp, tmp2);
2321 __ br(Assembler::notEqual, false, Assembler::pn, halt);
2323 __ delayed()->lduw(src, oopDesc::klass_offset_in_bytes(), tmp2);
2324 __ cmp_and_br_short(tmp, tmp2, Assembler::equal, Assembler::pn, known_ok);
2326 __ cmp(tmp, tmp2);
2327 __ br(Assembler::equal, false, Assembler::pn, known_ok);
2328 __ delayed()->cmp(src, dst);
2329 __ brx(Assembler::equal, false, Assembler::pn, known_ok);
2330 __ delayed()->nop();
2333 __ ld_ptr(dst, oopDesc::klass_offset_in_bytes(), tmp2);
2335 __ cmp(tmp, tmp2);
2336 __ brx(Assembler::notEqual, false, Assembler::pn, halt);
2337 __ delayed()->ld_ptr(src, oopDesc::klass_offset_in_bytes(), tmp2);
2338 __ cmp_and_brx_short(tmp, tmp2, Assembler::equal, Assembler::pn, known_ok);
2340 __ cmp(tmp, tmp2);
2341 __ brx(Assembler::equal, false, Assembler::pn, known_ok);
2342 __ delayed()->cmp(src, dst);
2343 __ brx(Assembler::equal, false, Assembler::pn, known_ok);
2344 __ delayed()->nop();
2347 __ bind(halt);
2348 __ stop("incorrect type information in arraycopy");
2349 __ bind(known_ok);
2356 __ inc_counter(counter, G1, G3);
2364 __ add(src, arrayOopDesc::base_offset_in_bytes(basic_type), src_ptr);
2366 __ add(src_ptr, src_pos, src_ptr);
2368 __ sll(src_pos, shift, tmp);
2369 __ add(src_ptr, tmp, src_ptr);
2372 __ add(dst, arrayOopDesc::base_offset_in_bytes(basic_type), dst_ptr);
2374 __ add(dst_ptr, dst_pos, dst_ptr);
2376 __ sll(dst_pos, shift, tmp);
2377 __ add(dst_ptr, tmp, dst_ptr);
2386 __ mov(length, len);
2387 __ call_VM_leaf(tmp, entry);
2389 __ bind(*stub->continuation());
2398 case lir_shl: __ sllx (left->as_register(), count->as_register(), dest->as_register()); break;
2399 case lir_shr: __ srax (left->as_register(), count->as_register(), dest->as_register()); break;
2400 case lir_ushr: __ srl (left->as_register(), count->as_register(), dest->as_register()); break;
2406 case lir_shl: __ sll (left->as_register(), count->as_register(), dest->as_register()); break;
2407 case lir_shr: __ sra (left->as_register(), count->as_register(), dest->as_register()); break;
2408 case lir_ushr: __ srl (left->as_register(), count->as_register(), dest->as_register()); break;
2414 case lir_shl: __ sllx (left->as_register_lo(), count->as_register(), dest->as_register_lo()); break;
2415 case lir_shr: __ srax (left->as_register_lo(), count->as_register(), dest->as_register_lo()); break;
2416 case lir_ushr: __ srlx (left->as_register_lo(), count->as_register(), dest->as_register_lo()); break;
2421 case lir_shl: __ lshl (left->as_register_hi(), left->as_register_lo(), count->as_register(), dest->as_register_hi(), dest->as_register_lo(), G3_scratch); break;
2422 case lir_shr: __ lshr (left->as_register_hi(), left->as_register_lo(), count->as_register(), dest->as_register_hi(), dest->as_register_lo(), G3_scratch); break;
2423 case lir_ushr: __ lushr (left->as_register_hi(), left->as_register_lo(), count->as_register(), dest->as_register_hi(), dest->as_register_lo(), G3_scratch); break;
2438 case lir_shl: __ sllx (l, count, d); break;
2439 case lir_shr: __ srax (l, count, d); break;
2440 case lir_ushr: __ srlx (l, count, d); break;
2450 case lir_shl: __ sll (left->as_register(), count, dest->as_register()); break;
2451 case lir_shr: __ sra (left->as_register(), count, dest->as_register()); break;
2452 case lir_ushr: __ srl (left->as_register(), count, dest->as_register()); break;
2458 case lir_shl: __ sllx (left->as_pointer_register(), count, dest->as_pointer_register()); break;
2459 case lir_shr: __ srax (left->as_pointer_register(), count, dest->as_pointer_register()); break;
2460 case lir_ushr: __ srlx (left->as_pointer_register(), count, dest->as_pointer_register()); break;
2476 __ ldub(op->klass()->as_register(),
2480 __ cmp(op->tmp1()->as_register(), instanceKlass::fully_initialized);
2481 __ br(Assembler::notEqual, false, Assembler::pn, *op->stub()->entry());
2482 __ delayed()->nop();
2484 __ allocate_object(op->obj()->as_register(),
2492 __ bind(*op->stub()->continuation());
2493 __ verify_oop(op->obj()->as_register());
2504 LP64_ONLY( __ signx(op->len()->as_register()); )
2508 __ br(Assembler::always, false, Assembler::pt, *op->stub()->entry());
2509 __ delayed()->nop();
2511 __ allocate_array(op->obj()->as_register(),
2521 __ bind(*op->stub()->continuation());
2534 __ ld_ptr(receiver_addr, tmp1);
2535 __ verify_oop(tmp1);
2536 __ cmp_and_brx_short(recv, tmp1, Assembler::notEqual, Assembler::pt, next_test);
2539 __ ld_ptr(data_addr, tmp1);
2540 __ add(tmp1, DataLayout::counter_increment, tmp1);
2541 __ st_ptr(tmp1, data_addr);
2542 __ ba(*update_done);
2543 __ delayed()->nop();
2544 __ bind(next_test);
2552 __ ld_ptr(recv_addr, tmp1);
2553 __ br_notnull_short(tmp1, Assembler::pt, next_test);
2554 __ st_ptr(recv, recv_addr);
2555 __ set(DataLayout::counter_increment, tmp1);
2556 __ st_ptr(tmp1, mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) -
2558 __ ba(*update_done);
2559 __ delayed()->nop();
2560 __ bind(next_test);
2604 __ br_notnull_short(obj, Assembler::pn, not_null);
2609 __ set(mdo_offset_bias, data_val);
2610 __ add(mdo, data_val, mdo);
2613 __ ldub(flags_addr, data_val);
2614 __ or3(data_val, BitData::null_seen_byte_constant(), data_val);
2615 __ stb(data_val, flags_addr);
2616 __ ba(*obj_is_null);
2617 __ delayed()->nop();
2618 __ bind(not_null);
2620 __ br_null(obj, false, Assembler::pn, *obj_is_null);
2621 __ delayed()->nop();
2639 __ load_klass(obj, klass_RInfo);
2642 __ cmp(k_RInfo, klass_RInfo);
2643 __ brx(Assembler::notEqual, false, Assembler::pt, *failure_target);
2644 __ delayed()->nop();
2651 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg,
2657 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target,
2661 // call out-of-line instance of __ check_klass_subtype_slow_path(...):
2663 __ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
2664 __ delayed()->nop();
2665 __ cmp(G3, 0);
2666 __ br(Assembler::equal, false, Assembler::pn, *failure_target);
2667 __ delayed()->nop();
2675 __ bind(profile_cast_success);
2678 __ set(mdo_offset_bias, tmp1);
2679 __ add(mdo, tmp1, mdo);
2681 __ load_klass(obj, recv);
2684 __ ba(*success);
2685 __ delayed()->nop();
2687 __ bind(profile_cast_failure);
2690 __ set(mdo_offset_bias, tmp1);
2691 __ add(mdo, tmp1, mdo);
2694 __ ld_ptr(data_addr, tmp1);
2695 __ sub(tmp1, DataLayout::counter_increment, tmp1);
2696 __ st_ptr(tmp1, data_addr);
2697 __ ba(*failure);
2698 __ delayed()->nop();
2700 __ ba(*success);
2701 __ delayed()->nop();
2713 __ verify_oop(value);
2730 __ br_notnull_short(value, Assembler::pn, not_null);
2735 __ set(mdo_offset_bias, data_val);
2736 __ add(mdo, data_val, mdo);
2739 __ ldub(flags_addr, data_val);
2740 __ or3(data_val, BitData::null_seen_byte_constant(), data_val);
2741 __ stb(data_val, flags_addr);
2742 __ ba_short(done);
2743 __ bind(not_null);
2745 __ br_null_short(value, Assembler::pn, done);
2748 __ load_klass(array, k_RInfo);
2749 __ load_klass(value, klass_RInfo);
2752 __ ld_ptr(Address(k_RInfo, objArrayKlass::element_klass_offset()), k_RInfo);
2754 __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target, failure_target, NULL);
2756 // call out-of-line instance of __ check_klass_subtype_slow_path(...):
2758 __ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
2759 __ delayed()->nop();
2760 __ cmp(G3, 0);
2761 __ br(Assembler::equal, false, Assembler::pn, *failure_target);
2762 __ delayed()->nop();
2768 __ bind(profile_cast_success);
2771 __ set(mdo_offset_bias, tmp1);
2772 __ add(mdo, tmp1, mdo);
2774 __ load_klass(value, recv);
2776 __ ba_short(done);
2778 __ bind(profile_cast_failure);
2781 __ set(mdo_offset_bias, tmp1);
2782 __ add(mdo, tmp1, mdo);
2785 __ ld_ptr(data_addr, tmp1);
2786 __ sub(tmp1, DataLayout::counter_increment, tmp1);
2787 __ st_ptr(tmp1, data_addr);
2788 __ ba(*stub->entry());
2789 __ delayed()->nop();
2791 __ bind(done);
2797 __ bind(success);
2798 __ mov(obj, dst);
2804 __ bind(failure);
2805 __ set(0, dst);
2806 __ ba_short(done);
2807 __ bind(success);
2808 __ set(1, dst);
2809 __ bind(done);
2828 __ mov(cmp_value_lo, t1);
2829 __ mov(new_value_lo, t2);
2831 __ casx(addr, t1, t2);
2834 __ cmp(t1, t2);
2837 __ sllx(cmp_value_hi, 32, t1); // shift high half into temp reg
2838 __ srl(cmp_value_lo, 0, cmp_value_lo); // clear upper 32 bits of low half
2839 __ or3(t1, cmp_value_lo, t1); // t1 holds 64-bit compare value
2840 __ sllx(new_value_hi, 32, t2);
2841 __ srl(new_value_lo, 0, new_value_lo);
2842 __ or3(t2, new_value_lo, t2); // t2 holds 64-bit value to swap
2844 __ casx(addr, t1, t2);
2848 __ sub(t1, t2, t2);
2849 __ srlx(t2, 32, t1);
2850 __ orcc(t2, t1, G0);
2858 __ mov(cmp_value, t1);
2859 __ mov(new_value, t2);
2862 __ encode_heap_oop(t1);
2863 __ encode_heap_oop(t2);
2864 __ cas(addr, t1, t2);
2866 __ cas_ptr(addr, t1, t2);
2869 __ cas(addr, t1, t2);
2871 __ cmp(t1, t2);
2888 __ breakpoint_trap();
2909 __ add(reg, offset, dst);
2911 __ set(offset, dst);
2912 __ add(dst, reg, dst);
2931 __ lock_object(hdr, obj, lock, op->scratch_opr()->as_register(), *op->stub()->entry());
2939 __ br(Assembler::always, false, Assembler::pt, *op->stub()->entry());
2940 __ delayed()->nop();
2946 __ unlock_object(hdr, obj, lock, *op->stub()->entry());
2954 __ br(Assembler::always, false, Assembler::pt, *op->stub()->entry());
2955 __ delayed()->nop();
2958 __ bind(*op->stub()->continuation());
2988 __ set(mdo_offset_bias, O7);
2989 __ add(mdo, O7, mdo);
3020 __ ld_ptr(data_addr, tmp1);
3021 __ add(tmp1, DataLayout::counter_increment, tmp1);
3022 __ st_ptr(tmp1, data_addr);
3038 __ st_ptr(tmp1, recv_addr);
3041 __ ld_ptr(data_addr, tmp1);
3042 __ add(tmp1, DataLayout::counter_increment, tmp1);
3043 __ st_ptr(tmp1, data_addr);
3048 __ load_klass(recv, recv);
3053 __ ld_ptr(counter_addr, tmp1);
3054 __ add(tmp1, DataLayout::counter_increment, tmp1);
3055 __ st_ptr(tmp1, counter_addr);
3057 __ bind(update_done);
3061 __ ld_ptr(counter_addr, tmp1);
3062 __ add(tmp1, DataLayout::counter_increment, tmp1);
3063 __ st_ptr(tmp1, counter_addr);
3068 __ align(OptoLoopAlignment);
3077 __ delayed();
3109 __ neg(left->as_register(), dest->as_register());
3111 __ fneg(FloatRegisterImpl::S, left->as_float_reg(), dest->as_float_reg());
3113 __ fneg(FloatRegisterImpl::D, left->as_double_reg(), dest->as_double_reg());
3119 __ sub(G0, Rlow, dest->as_register_lo());
3121 __ subcc(G0, Rlow, dest->as_register_lo());
3122 __ subc (G0, Rhi, dest->as_register_hi());
3145 __ save_thread(tmp->as_register());
3147 __ call(dest, relocInfo::runtime_call_type);
3148 __ delayed()->nop();
3153 __ restore_thread(tmp->as_register());
3157 __ verify_thread();
3178 __ set(disp, idx);
3192 __ srl (src->as_register_lo(), 0, G5);
3193 __ sllx(src->as_register_hi(), 32, G4);
3195 __ or3(G4, G5, G4);
3196 null_check_offset = __ offset();
3198 __ stx(G4, base, disp);
3200 __ stx(G4, base, idx);
3203 __ mov (src->as_register_hi(), G4);
3204 __ mov (src->as_register_lo(), G5);
3205 null_check_offset = __ offset();
3207 __ std(G4, base, disp);
3209 __ std(G4, base, idx);
3213 null_check_offset = __ offset();
3216 __ ldx(base, disp, G5);
3218 __ ldx(base, idx, G5);
3220 __ srax(G5, 32, dest->as_register_hi()); // fetch the high half into hi
3221 __ mov (G5, dest->as_register_lo()); // copy low half into lo
3224 __ ldd(base, disp, G4);
3226 __ ldd(base, idx, G4);
3229 __ mov (G4, dest->as_register_hi());
3230 __ mov (G5, dest->as_register_lo());
3248 __ membar( Assembler::Membar_mask_bits(Assembler::StoreLoad) );
3261 //__ membar(Assembler::Membar_mask_bits(Assembler::loadload));
3266 //__ membar(Assembler::Membar_mask_bits(Assembler::storestore));
3271 //__ membar(Assembler::Membar_mask_bits(Assembler::loadstore));
3275 __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
3287 __ sllx(rs, 32, rs);
3288 __ srl(rs->successor(), 0, rs->successor());
3289 __ or3(rs, rs->successor(), rd);
3299 __ srlx(rs, 32, rd);
3300 __ srl (rs, 0, rd->successor());
3308 __ add(addr->base()->as_pointer_register(), addr->disp(), dest->as_pointer_register());
3314 __ mov(G2_thread, result_reg->as_register());
3422 __ swap(as_Address(addr), data->as_register());
3428 __ encode_heap_oop(obj, narrow);
3429 __ swap(as_Address(addr), narrow);
3430 __ decode_heap_oop(narrow, obj);
3432 __ swap(as_Address(addr), obj);
3439 #undef __