Lines Matching defs:__
44 #define __ masm->
140 __ enter();
141 __ pusha();
142 __ pushf();
143 __ subptr(rsp,FPU_regs_live*wordSize); // Push FPU registers space
144 __ push_FPU_state(); // Save FPU state & init
156 __ cmpw(Address(rsp, 0), StubRoutines::fpu_cntrl_wrd_std());
157 __ jccb(Assembler::equal, ok);
158 __ stop("corrupted control word detected");
159 __ bind(ok);
166 __ movw(Address(rsp, 0), StubRoutines::fpu_cntrl_wrd_std());
169 __ frstor(Address(rsp, 0));
173 __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
178 __ fstp_d(Address(rsp, st0_off*wordSize)); // st(0)
179 __ fstp_d(Address(rsp, st1_off*wordSize)); // st(1)
180 __ fstp_d(Address(rsp, st2_off*wordSize)); // st(2)
181 __ fstp_d(Address(rsp, st3_off*wordSize)); // st(3)
182 __ fstp_d(Address(rsp, st4_off*wordSize)); // st(4)
183 __ fstp_d(Address(rsp, st5_off*wordSize)); // st(5)
184 __ fstp_d(Address(rsp, st6_off*wordSize)); // st(6)
185 __ fstp_d(Address(rsp, st7_off*wordSize)); // st(7)
188 __ movflt(Address(rsp,xmm0_off*wordSize),xmm0);
189 __ movflt(Address(rsp,xmm1_off*wordSize),xmm1);
190 __ movflt(Address(rsp,xmm2_off*wordSize),xmm2);
191 __ movflt(Address(rsp,xmm3_off*wordSize),xmm3);
192 __ movflt(Address(rsp,xmm4_off*wordSize),xmm4);
193 __ movflt(Address(rsp,xmm5_off*wordSize),xmm5);
194 __ movflt(Address(rsp,xmm6_off*wordSize),xmm6);
195 __ movflt(Address(rsp,xmm7_off*wordSize),xmm7);
198 __ movdqu(Address(rsp,xmm0_off*wordSize),xmm0);
199 __ movdqu(Address(rsp,xmm1_off*wordSize),xmm1);
200 __ movdqu(Address(rsp,xmm2_off*wordSize),xmm2);
201 __ movdqu(Address(rsp,xmm3_off*wordSize),xmm3);
202 __ movdqu(Address(rsp,xmm4_off*wordSize),xmm4);
203 __ movdqu(Address(rsp,xmm5_off*wordSize),xmm5);
204 __ movdqu(Address(rsp,xmm6_off*wordSize),xmm6);
205 __ movdqu(Address(rsp,xmm7_off*wordSize),xmm7);
210 __ subptr(rsp, 128); // Save upper half of YMM registes
211 __ vextractf128h(Address(rsp, 0),xmm0);
212 __ vextractf128h(Address(rsp, 16),xmm1);
213 __ vextractf128h(Address(rsp, 32),xmm2);
214 __ vextractf128h(Address(rsp, 48),xmm3);
215 __ vextractf128h(Address(rsp, 64),xmm4);
216 __ vextractf128h(Address(rsp, 80),xmm5);
217 __ vextractf128h(Address(rsp, 96),xmm6);
218 __ vextractf128h(Address(rsp,112),xmm7);
295 __ movflt(xmm0,Address(rsp,xmm0_off*wordSize));
296 __ movflt(xmm1,Address(rsp,xmm1_off*wordSize));
297 __ movflt(xmm2,Address(rsp,xmm2_off*wordSize));
298 __ movflt(xmm3,Address(rsp,xmm3_off*wordSize));
299 __ movflt(xmm4,Address(rsp,xmm4_off*wordSize));
300 __ movflt(xmm5,Address(rsp,xmm5_off*wordSize));
301 __ movflt(xmm6,Address(rsp,xmm6_off*wordSize));
302 __ movflt(xmm7,Address(rsp,xmm7_off*wordSize));
305 __ movdqu(xmm0,STACK_ADDRESS(xmm0_off));
306 __ movdqu(xmm1,STACK_ADDRESS(xmm1_off));
307 __ movdqu(xmm2,STACK_ADDRESS(xmm2_off));
308 __ movdqu(xmm3,STACK_ADDRESS(xmm3_off));
309 __ movdqu(xmm4,STACK_ADDRESS(xmm4_off));
310 __ movdqu(xmm5,STACK_ADDRESS(xmm5_off));
311 __ movdqu(xmm6,STACK_ADDRESS(xmm6_off));
312 __ movdqu(xmm7,STACK_ADDRESS(xmm7_off));
318 __ vinsertf128h(xmm0, Address(rsp, 0));
319 __ vinsertf128h(xmm1, Address(rsp, 16));
320 __ vinsertf128h(xmm2, Address(rsp, 32));
321 __ vinsertf128h(xmm3, Address(rsp, 48));
322 __ vinsertf128h(xmm4, Address(rsp, 64));
323 __ vinsertf128h(xmm5, Address(rsp, 80));
324 __ vinsertf128h(xmm6, Address(rsp, 96));
325 __ vinsertf128h(xmm7, Address(rsp,112));
326 __ addptr(rsp, additional_frame_bytes);
328 __ pop_FPU_state();
329 __ addptr(rsp, FPU_regs_live*wordSize); // Pop FPU registers
331 __ popf();
332 __ popa();
334 __ pop(rbp);
347 __ frstor(Address(rsp, 0)); // Restore fpu state
351 __ movflt(xmm0, Address(rsp, xmm0_off*wordSize));
353 __ movdbl(xmm0, Address(rsp, xmm0_off*wordSize));
355 __ movptr(rax, Address(rsp, rax_off*wordSize));
356 __ movptr(rdx, Address(rsp, rdx_off*wordSize));
358 __ addptr(rsp, return_off * wordSize);
513 __ verify_oop(rbx);
514 __ cmpptr(Address(rbx, in_bytes(methodOopDesc::code_offset())), (int32_t)NULL_WORD);
515 __ jcc(Assembler::equal, L);
519 __ movptr(rax, Address(rsp, 0));
520 __ pusha();
521 __ pushf();
524 __ subptr(rsp, 2*wordSize);
525 __ movflt(Address(rsp, 0), xmm0);
526 __ movflt(Address(rsp, wordSize), xmm1);
529 __ subptr(rsp, 4*wordSize);
530 __ movdbl(Address(rsp, 0), xmm0);
531 __ movdbl(Address(rsp, 2*wordSize), xmm1);
536 __ verify_FPU(0, "c2i transition should have clean FPU stack");
538 __ empty_FPU_stack();
543 __ push(rax);
545 __ push(rbx);
546 __ verify_oop(rbx);
547 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite)));
548 __ addptr(rsp, 2*wordSize);
551 __ movflt(xmm0, Address(rsp, 0));
552 __ movflt(xmm1, Address(rsp, wordSize));
553 __ addptr(rsp, 2*wordSize);
556 __ movdbl(xmm0, Address(rsp, 0));
557 __ movdbl(xmm1, Address(rsp, 2*wordSize));
558 __ addptr(rsp, 4*wordSize);
561 __ popf();
562 __ popa();
563 __ bind(L);
569 __ movdbl(Address(rsp, next_off), r);
585 __ bind(skip_fixup);
590 __ verify_FPU(0, "c2i transition should have clean FPU stack");
592 __ empty_FPU_stack();
602 __ pop(rax);
605 __ movptr(rsi, rsp);
607 __ subptr(rsp, extraspace);
638 __ movl(rdi, Address(rsp, ld_off));
639 __ movptr(Address(rsp, st_off), rdi);
645 __ movptr(rdi, Address(rsp, ld_off));
646 __ movptr(Address(rsp, next_off), rdi);
648 __ movptr(rdi, Address(rsp, ld_off + wordSize));
649 __ movptr(Address(rsp, st_off), rdi);
653 __ mov64(rax, CONST64(0xdeadffffdeadaaaa));
654 __ movptr(Address(rsp, st_off), rax);
661 __ movl(Address(rsp, st_off), r);
671 LP64_ONLY(__ mov64(rax, CONST64(0xdeadffffdeadaaab)));
672 __ movptr(Address(rsp, st_off), rax);
674 __ movptr(Address(rsp, next_off), r);
676 __ movptr(Address(rsp, st_off), r);
682 __ movflt(Address(rsp, st_off), r_1->as_XMMRegister());
691 __ movptr(rcx, Address(rbx, in_bytes(methodOopDesc::interpreter_entry_offset())));
693 __ push(rax);
694 __ jmp(rcx);
700 __ movdbl(r, Address(saved_sp, next_val_off));
707 __ lea(temp_reg, ExternalAddress(code_start));
708 __ cmpptr(pc_reg, temp_reg);
709 __ jcc(Assembler::belowEqual, L_fail);
710 __ lea(temp_reg, ExternalAddress(code_end));
711 __ cmpptr(pc_reg, temp_reg);
712 __ jcc(Assembler::below, L_ok);
713 __ bind(L_fail);
744 __ movptr(rax, Address(rsp, 0));
752 __ block_comment("verify_i2c { ");
767 __ block_comment(msg);
768 __ stop(msg);
769 __ bind(L_ok);
770 __ block_comment("} verify_i2ce ");
775 __ movptr(rdi, rsp);
789 __ subptr(rsp, comp_words_on_stack * wordSize);
793 __ andptr(rsp, -(StackAlignmentInBytes));
797 __ push(rax);
801 __ movptr(saved_sp, rdi);
806 __ movptr(rdi, Address(rbx, in_bytes(methodOopDesc::from_compiled_offset())));
843 // __ fld_s(Address(saved_sp, ld_off));
844 // __ fstp_s(Address(rsp, st_off));
845 __ movl(rsi, Address(saved_sp, ld_off));
846 __ movptr(Address(rsp, st_off), rsi);
853 // __ fld_d(Address(saved_sp, next_off));
854 // __ fstp_d(Address(rsp, st_off));
866 __ movptr(rsi, Address(saved_sp, offset));
867 __ movptr(Address(rsp, st_off), rsi);
869 __ movptr(rsi, Address(saved_sp, ld_off));
870 __ movptr(Address(rsp, st_off + wordSize), rsi);
886 __ movptr(r, Address(saved_sp, offset));
891 __ movptr(r_2->as_Register(), Address(saved_sp, ld_off));
894 __ movl(r, Address(saved_sp, ld_off));
899 __ movflt(r_1->as_XMMRegister(), Address(saved_sp, ld_off));
916 __ get_thread(rax);
917 __ movptr(Address(rax, JavaThread::callee_target_offset()), rbx);
923 __ mov(rax, rbx);
925 __ jmp(rdi);
935 address i2c_entry = __ pc();
948 address c2i_unverified_entry = __ pc();
959 __ verify_oop(holder);
960 __ movptr(temp, Address(receiver, oopDesc::klass_offset_in_bytes()));
961 __ verify_oop(temp);
963 __ cmpptr(temp, Address(holder, compiledICHolderOopDesc::holder_klass_offset()));
964 __ movptr(rbx, Address(holder, compiledICHolderOopDesc::holder_method_offset()));
965 __ jcc(Assembler::notEqual, missed);
969 __ cmpptr(Address(rbx, in_bytes(methodOopDesc::code_offset())), (int32_t)NULL_WORD);
970 __ jcc(Assembler::equal, skip_fixup);
972 __ bind(missed);
973 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
976 address c2i_entry = __ pc();
980 __ flush();
1028 // __ ld(FP, reg2offset(src.first()) + STACK_BIAS, L5);
1029 // __ st(L5, SP, reg2offset(dst.first()) + STACK_BIAS);
1030 __ movl2ptr(rax, Address(rbp, reg2offset_in(src.first())));
1031 __ movptr(Address(rsp, reg2offset_out(dst.first())), rax);
1034 __ movl2ptr(dst.first()->as_Register(), Address(rbp, reg2offset_in(src.first())));
1039 __ movptr(Address(rsp, reg2offset_out(dst.first())), src.first()->as_Register());
1042 __ mov(dst.first()->as_Register(), src.first()->as_Register());
1067 __ xorptr(rHandle, rHandle);
1068 __ cmpptr(Address(rbp, reg2offset_in(src.first())), (int32_t)NULL_WORD);
1069 __ jcc(Assembler::equal, nil);
1070 __ lea(rHandle, Address(rbp, reg2offset_in(src.first())));
1071 __ bind(nil);
1072 __ movptr(Address(rsp, reg2offset_out(dst.first())), rHandle);
1087 __ movptr(Address(rsp, offset), rOop);
1089 __ xorptr(rHandle, rHandle);
1090 __ cmpptr(rOop, (int32_t)NULL_WORD);
1091 __ jcc(Assembler::equal, skip);
1092 __ lea(rHandle, Address(rsp, offset));
1093 __ bind(skip);
1095 __ movptr(Address(rsp, reg2offset_out(dst.first())), rHandle);
1112 __ movl(rax, Address(rbp, reg2offset_in(src.first())));
1113 __ movptr(Address(rsp, reg2offset_out(dst.first())), rax);
1116 __ movflt(Address(rsp, reg2offset_out(dst.first())), src.first()->as_XMMRegister());
1130 __ movptr(rax, Address(rbp, reg2offset_in(src.first())));
1131 NOT_LP64(__ movptr(rbx, Address(rbp, reg2offset_in(src.second()))));
1132 __ movptr(Address(rsp, reg2offset_out(dst.first())), rax);
1133 NOT_LP64(__ movptr(Address(rsp, reg2offset_out(dst.second())), rbx));
1154 __ movptr(rax, Address(rbp, reg2offset_in(src.first())));
1155 NOT_LP64(__ movptr(rbx, Address(rbp, reg2offset_in(src.second()))));
1156 __ movptr(Address(rsp, reg2offset_out(dst.first())), rax);
1157 NOT_LP64(__ movptr(Address(rsp, reg2offset_out(dst.second())), rbx));
1161 __ movdbl(Address(rsp, reg2offset_out(dst.first())), src.first()->as_XMMRegister());
1171 __ fstp_s(Address(rbp, -wordSize));
1174 __ fstp_d(Address(rbp, -2*wordSize));
1178 __ movptr(Address(rbp, -wordSize), rax);
1179 NOT_LP64(__ movptr(Address(rbp, -2*wordSize), rdx));
1182 __ movptr(Address(rbp, -wordSize), rax);
1192 __ fld_s(Address(rbp, -wordSize));
1195 __ fld_d(Address(rbp, -2*wordSize));
1198 __ movptr(rax, Address(rbp, -wordSize));
1199 NOT_LP64(__ movptr(rdx, Address(rbp, -2*wordSize)));
1203 __ movptr(rax, Address(rbp, -wordSize));
1227 __ movdbl(Address(rsp, offset), in_regs[i].first()->as_XMMRegister());
1229 __ movdbl(in_regs[i].first()->as_XMMRegister(), Address(rsp, offset));
1238 __ movl(Address(rsp, offset), in_regs[i].first()->as_Register());
1240 __ movl(Address(rsp, offset + 4), in_regs[i].second()->as_Register());
1243 __ movl(in_regs[i].first()->as_Register(), Address(rsp, offset));
1245 __ movl(in_regs[i].second()->as_Register(), Address(rsp, offset + 4));
1265 __ movptr(Address(rsp, offset), reg);
1267 __ movptr(reg, Address(rsp, offset));
1276 __ movl(Address(rsp, offset), reg);
1278 __ movl(reg, Address(rsp, offset));
1290 __ movflt(Address(rsp, offset), in_regs[i].first()->as_XMMRegister());
1292 __ movflt(in_regs[i].first()->as_XMMRegister(), Address(rsp, offset));
1317 __ block_comment("check GC_locker::needs_gc");
1319 __ cmp8(ExternalAddress((address)GC_locker::needs_gc_address()), false);
1320 __ jcc(Assembler::equal, cont);
1329 address the_pc = __ pc();
1330 oop_maps->add_gc_map( __ offset(), map);
1331 __ set_last_Java_frame(thread, rsp, noreg, the_pc);
1333 __ block_comment("block_for_jni_critical");
1334 __ push(thread);
1335 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::block_for_jni_critical)));
1336 __ increment(rsp, wordSize);
1338 __ get_thread(thread);
1339 __ reset_last_Java_frame(thread, false, true);
1344 __ bind(cont);
1355 __ xorptr(reg, reg);
1357 __ xorpd(in_regs[i].first()->as_XMMRegister(), in_regs[i].first()->as_XMMRegister());
1393 __ testptr(reg.first()->as_Register(), reg.first()->as_Register());
1394 __ jccb(Assembler::equal, is_null);
1395 __ lea(tmp_reg, Address(reg.first()->as_Register(), arrayOopDesc::base_offset_in_bytes(in_elem_type)));
1398 __ movl(tmp_reg, Address(tmp_reg, arrayOopDesc::length_offset_in_bytes() -
1401 __ jmpb(done);
1402 __ bind(is_null);
1404 __ xorptr(tmp_reg, tmp_reg);
1407 __ bind(done);
1422 __ movptr(temp_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
1423 __ verify_oop(temp_reg);
1425 __ verify_oop(r->as_Register());
1460 __ movptr(member_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
1479 __ movptr(receiver_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
1528 intptr_t start = (intptr_t)__ pc();
1529 int vep_offset = ((intptr_t)__ pc()) - start;
1534 int frame_complete = ((intptr_t)__ pc()) - start; // not complete, period
1535 __ flush();
1742 intptr_t start = (intptr_t)__ pc();
1756 __ verify_oop(receiver);
1757 __ cmpptr(ic_reg, Address(receiver, oopDesc::klass_offset_in_bytes()));
1758 __ jcc(Assembler::equal, hit);
1760 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
1765 __ align(8);
1767 __ bind(hit);
1769 int vep_offset = ((intptr_t)__ pc()) - start;
1780 __ movptr(result, Address(receiver, oopDesc::mark_offset_in_bytes()));
1783 __ testptr(result, markOopDesc::unlocked_value);
1784 __ jcc (Assembler::zero, slowCase);
1788 __ testptr(result, markOopDesc::biased_lock_bit_in_place);
1789 __ jcc (Assembler::notZero, slowCase);
1793 __ andptr(result, markOopDesc::hash_mask_in_place);
1795 __ jcc (Assembler::zero, slowCase);
1796 __ shrptr(result, markOopDesc::hash_shift);
1797 __ ret(0);
1798 __ bind (slowCase);
1809 __ bang_stack_with_offset(StackShadowPages*os::vm_page_size());
1812 __ fat_nop();
1816 __ enter();
1818 __ subptr(rsp, stack_size - 2*wordSize);
1821 int frame_complete = ((intptr_t)__ pc()) - start;
1834 __ verify_FPU(0, "c2i transition should have clean FPU stack");
1836 __ empty_FPU_stack();
1853 __ get_thread(thread);
1944 __ movoop(oop_handle_reg, JNIHandles::make_local(Klass::cast(method->method_holder())->java_mirror()));
1947 __ movptr(Address(rsp, klass_offset), oop_handle_reg);
1951 __ lea(oop_handle_reg, Address(rsp, klass_offset));
1953 __ movptr(Address(rsp, wordSize), oop_handle_reg);
1961 intptr_t the_pc = (intptr_t) __ pc();
1964 __ set_last_Java_frame(thread, rsp, noreg, (address)the_pc);
1972 __ movoop(rax, JNIHandles::make_local(method()));
1973 __ call_VM_leaf(
1980 __ movoop(rax, JNIHandles::make_local(method()));
1981 __ call_VM_leaf(
2002 __ movptr(oop_handle_reg, Address(rsp, wordSize));
2006 __ lea(lock_reg, Address(rbp, lock_slot_rbp_offset));
2009 __ movptr(obj_reg, Address(oop_handle_reg, 0));
2013 __ biased_locking_enter(lock_reg, obj_reg, swap_reg, oop_handle_reg, false, lock_done, &slow_path_lock);
2017 __ movptr(swap_reg, 1);
2020 __ orptr(swap_reg, Address(obj_reg, 0));
2023 __ movptr(Address(lock_reg, mark_word_offset), swap_reg);
2026 __ lock();
2031 __ cmpxchgptr(lock_reg, Address(obj_reg, 0));
2032 __ jcc(Assembler::equal, lock_done);
2043 __ subptr(swap_reg, rsp);
2044 __ andptr(swap_reg, 3 - os::vm_page_size());
2047 __ movptr(Address(lock_reg, mark_word_offset), swap_reg);
2048 __ jcc(Assembler::notEqual, slow_path_lock);
2050 __ bind(lock_done);
2054 __ movptr(oop_handle_reg, Address(rsp, wordSize));
2064 __ lea(rdx, Address(thread, in_bytes(JavaThread::jni_environment_offset())));
2065 __ movptr(Address(rsp, 0), rdx);
2069 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_native);
2071 __ call(RuntimeAddress(native_func));
2074 __ restore_cpu_control_state_after_jni();
2083 case T_BOOLEAN: __ c2bool(rax); break;
2084 case T_CHAR : __ andptr(rax, 0xFFFF); break;
2085 case T_BYTE : __ sign_extend_byte (rax); break;
2086 case T_SHORT : __ sign_extend_short(rax); break;
2107 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_native_trans);
2112 __ membar(Assembler::Membar_mask_bits(
2120 __ serialize_memory(thread, rcx);
2126 __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
2134 __ cmp32(ExternalAddress((address)SafepointSynchronize::address_of_state()),
2138 __ jcc(Assembler::notEqual, L);
2139 __ cmpl(Address(thread, JavaThread::suspend_flags_offset()), 0);
2140 __ jcc(Assembler::equal, Continue);
2141 __ bind(L);
2150 __ push(thread);
2152 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address,
2155 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address,
2158 __ increment(rsp, wordSize);
2165 __ jmpb(after_transition);
2168 __ bind(Continue);
2172 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_Java);
2173 __ bind(after_transition);
2177 __ cmpl(Address(thread, JavaThread::stack_guard_state_offset()), JavaThread::stack_guard_yellow_disabled);
2178 __ jcc(Assembler::equal, reguard);
2181 __ bind(reguard_done);
2195 __ movptr(obj_reg, Address(oop_handle_reg, 0));
2198 __ biased_locking_exit(obj_reg, rbx, done);
2203 __ cmpptr(Address(rbp, lock_slot_rbp_offset), (int32_t)NULL_WORD);
2204 __ jcc(Assembler::equal, done);
2212 __ movptr(rbx, Address(rbp, lock_slot_rbp_offset));
2215 __ lea(rax, Address(rbp, lock_slot_rbp_offset));
2219 __ lock();
2224 __ cmpxchgptr(rbx, Address(obj_reg, 0));
2225 __ jcc(Assembler::notEqual, slow_path_unlock);
2228 __ bind(unlock_done);
2233 __ bind(done);
2241 __ movoop(rax, JNIHandles::make_local(method()));
2242 __ call_VM_leaf(
2250 __ reset_last_Java_frame(thread, false, true);
2255 __ cmpptr(rax, (int32_t)NULL_WORD);
2256 __ jcc(Assembler::equal, L);
2257 __ movptr(rax, Address(rax, 0));
2258 __ bind(L);
2259 __ verify_oop(rax);
2264 __ movptr(rcx, Address(thread, JavaThread::active_handles_offset()));
2265 __ movptr(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD);
2268 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
2269 __ jcc(Assembler::notEqual, exception_pending);
2275 __ verify_FPU(ret_type == T_FLOAT || ret_type == T_DOUBLE ? 1 : 0, "native_wrapper normal exit");
2281 __ fstp_s(Address(rbp, -4));
2282 __ movflt(xmm0, Address(rbp, -4));
2287 __ fstp_d(Address(rbp, -8));
2288 __ movdbl(xmm0, Address(rbp, -8));
2294 __ leave();
2295 __ ret(0);
2304 __ bind(slow_path_lock);
2308 __ push(thread);
2309 __ push(lock_reg);
2310 __ push(obj_reg);
2311 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_locking_C)));
2312 __ addptr(rsp, 3*wordSize);
2316 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int)NULL_WORD);
2317 __ jcc(Assembler::equal, L);
2318 __ stop("no pending exception allowed on exit from monitorenter");
2319 __ bind(L);
2322 __ jmp(lock_done);
2327 __ bind(slow_path_unlock);
2336 __ pushptr(Address(thread, in_bytes(Thread::pending_exception_offset())));
2337 __ movptr(Address(thread, in_bytes(Thread::pending_exception_offset())), NULL_WORD);
2342 __ lea(rax, Address(rbp, lock_slot_rbp_offset));
2343 __ push(rax);
2345 __ push(obj_reg);
2346 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_unlocking_C)));
2347 __ addptr(rsp, 2*wordSize);
2351 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
2352 __ jcc(Assembler::equal, L);
2353 __ stop("no pending exception allowed on exit complete_monitor_unlocking_C");
2354 __ bind(L);
2358 __ popptr(Address(thread, in_bytes(Thread::pending_exception_offset())));
2363 __ jmp(unlock_done);
2370 __ bind(reguard);
2373 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)));
2376 __ jmp(reguard_done);
2383 __ bind(exception_pending);
2386 __ empty_FPU_stack();
2389 __ leave();
2391 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
2394 __ flush();
2551 intptr_t start = (intptr_t)__ pc();
2565 __ verify_oop(receiver);
2566 __ cmpl(ic_reg, Address(receiver, oopDesc::klass_offset_in_bytes()));
2567 __ jcc(Assembler::equal, hit);
2569 __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
2574 __ align(8);
2576 __ bind(hit);
2578 int vep_offset = ((intptr_t)__ pc()) - start;
2590 __ bang_stack_with_offset(StackShadowPages*os::vm_page_size());
2592 __ movl(rax, stack_size);
2593 __ bang_stack_size(rax, rbx);
2597 __ fat_nop();
2600 assert(((int)__ pc() - start - vep_offset) >= 5,
2604 __ enter();
2608 __ subl(rsp, stack_size - 2*wordSize);
2613 int frame_complete = ((intptr_t)__ pc()) - start;
2655 __ movl(Address(rsp, reg2offset_out(dst.first())), NULL_WORD);
2657 __ movl(Address(rsp, reg2offset_out(dst.second())), NULL_WORD);
2659 __ testl(in_reg, in_reg);
2660 __ jcc(Assembler::zero, skipUnbox);
2668 __ movl(rbx, Address(in_reg,
2670 __ movl(Address(rsp, reg2offset_out(dst.second())), rbx);
2672 __ movl(in_reg, Address(in_reg, box_offset));
2673 __ movl(Address(rsp, reg2offset_out(dst.first())), in_reg);
2674 __ bind(skipUnbox);
2677 __ movl(Address(rsp, reg2offset_out(dst.first())), NULL_WORD);
2719 __ leal(rax, utf8_addr);
2736 __ movl(rcx, dest);
2739 __ movl(rcx, Address(rbp, reg2offset_in(orig_loc)));
2745 __ movl(dest, NULL_WORD);
2746 __ testl(string_oop, string_oop);
2747 __ jcc(Assembler::zero, nullString);
2750 __ movl(dest, rax);
2753 __ call_VM_leaf(CAST_FROM_FN_PTR(
2755 __ bind(nullString);
2768 int patch_offset = ((intptr_t)__ pc()) - start;
2770 __ nop();
2775 __ leave();
2776 __ ret(0);
2778 __ flush();
2844 address start = __ pc();
2853 __ push(Deoptimization::Unpack_deopt);
2854 __ jmp(cont);
2856 int reexecute_offset = __ pc() - start;
2864 __ push(Deoptimization::Unpack_reexecute);
2865 __ jmp(cont);
2867 int exception_offset = __ pc() - start;
2876 __ get_thread(rdi);
2877 __ movptr(Address(rdi, JavaThread::exception_pc_offset()), rdx);
2878 __ movptr(Address(rdi, JavaThread::exception_oop_offset()), rax);
2880 int exception_in_tls_offset = __ pc() - start;
2893 __ push(0);
2903 __ push(Deoptimization::Unpack_exception);
2907 __ get_thread(rdi);
2908 __ movptr(rdx, Address(rdi, JavaThread::exception_pc_offset()));
2909 __ movptr(Address(rbp, wordSize), rdx);
2910 __ movptr(Address(rdi, JavaThread::exception_pc_offset()), NULL_WORD);
2914 __ movptr(rax, Address(rdi, JavaThread::exception_oop_offset()));
2915 __ verify_oop(rax);
2919 __ movptr(rax, Address(rdi, Thread::pending_exception_offset()));
2920 __ testptr(rax, rax);
2921 __ jcc(Assembler::zero, no_pending_exception);
2922 __ stop("must not have pending exception here");
2923 __ bind(no_pending_exception);
2926 __ bind(cont);
2929 __ empty_FPU_stack();
2934 __ get_thread(rcx);
2935 __ push(rcx);
2937 __ set_last_Java_frame(rcx, noreg, noreg, NULL);
2939 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info)));
2944 oop_maps->add_gc_map( __ pc()-start, map);
2947 __ pop(rcx);
2949 __ get_thread(rcx);
2950 __ reset_last_Java_frame(rcx, false, false);
2953 __ mov(rdi, rax);
2960 __ pop(rax);
2961 __ movl(unpack_kind, rax); // save the unpack_kind value
2964 __ cmpl(rax, Deoptimization::Unpack_exception); // Was exception pending?
2965 __ jcc(Assembler::notEqual, noException);
2966 __ movptr(rax, Address(rcx, JavaThread::exception_oop_offset()));
2967 __ movptr(rdx, Address(rcx, JavaThread::exception_pc_offset()));
2968 __ movptr(Address(rcx, JavaThread::exception_oop_offset()), NULL_WORD);
2969 __ movptr(Address(rcx, JavaThread::exception_pc_offset()), NULL_WORD);
2971 __ verify_oop(rax);
2974 __ movptr(Address(rsp, RegisterSaver::raxOffset()*wordSize), rax);
2975 __ movptr(Address(rsp, RegisterSaver::rdxOffset()*wordSize), rdx);
2977 __ bind(noException);
2988 __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
3005 __ addptr(rsp, Address(rdi,Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes()));
3011 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3012 __ bang_stack_size(rbx, rcx);
3016 __ movptr(rcx,Address(rdi,Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3018 __ pop(rsi); // trash the old pc
3021 __ movptr(rsi,Address(rdi,Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes()));
3025 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
3026 __ movl(counter, rbx);
3029 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3037 __ movptr(sp_temp, rsp);
3038 __ movl2ptr(rbx, Address(rdi, Deoptimization::UnrollBlock::caller_adjustment_offset_in_bytes()));
3039 __ subptr(rsp, rbx);
3043 __ bind(loop);
3044 __ movptr(rbx, Address(rsi, 0)); // Load frame size
3046 __ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and
3048 __ push(0xDEADDEAD); // Make a recognizable pattern
3049 __ push(0xDEADDEAD);
3051 __ subptr(rsp, 2*wordSize); // skip the "static long no_param"
3054 __ subptr(rbx, 2*wordSize); // we'll push pc and rbp, by hand
3056 __ pushptr(Address(rcx, 0)); // save return address
3057 __ enter(); // save old & set new rbp,
3058 __ subptr(rsp, rbx); // Prolog!
3059 __ movptr(rbx, sp_temp); // sender's sp
3061 __ movptr(Address(rbp,
3066 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
3067 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
3069 __ movptr(sp_temp, rsp); // pass to next frame
3070 __ addptr(rsi, wordSize); // Bump array pointer (sizes)
3071 __ addptr(rcx, wordSize); // Bump array pointer (pcs)
3072 __ decrementl(counter); // decrement counter
3073 __ jcc(Assembler::notZero, loop);
3074 __ pushptr(Address(rcx, 0)); // save final return address
3077 __ enter(); // save old & set new rbp,
3082 __ subptr(rsp, (frame_size_in_words-additional_words - 2) * wordSize);
3085 __ movptr(Address(rsp, RegisterSaver::raxOffset()*wordSize), rax);
3086 __ movptr(Address(rsp, RegisterSaver::rdxOffset()*wordSize), rdx);
3087 __ fstp_d(Address(rsp, RegisterSaver::fpResultOffset()*wordSize)); // Pop float stack and store in local
3088 if( UseSSE>=2 ) __ movdbl(Address(rsp, RegisterSaver::xmm0Offset()*wordSize), xmm0);
3089 if( UseSSE==1 ) __ movflt(Address(rsp, RegisterSaver::xmm0Offset()*wordSize), xmm0);
3093 __ pushl(unpack_kind); // get the unpack_kind value
3094 __ get_thread(rcx);
3095 __ push(rcx);
3098 __ set_last_Java_frame(rcx, noreg, rbp, NULL);
3103 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames)));
3105 oop_maps->add_gc_map( __ pc()-start, new OopMap( frame_size_in_words, 0 ));
3108 __ push(rax);
3110 __ get_thread(rcx);
3111 __ reset_last_Java_frame(rcx, false, false);
3114 __ movptr(rax,Address(rsp, (RegisterSaver::raxOffset() + additional_words + 1)*wordSize));
3115 __ movptr(rdx,Address(rsp, (RegisterSaver::rdxOffset() + additional_words + 1)*wordSize));
3118 __ empty_FPU_stack();
3122 __ cmpl(Address(rsp, 0), T_DOUBLE);
3123 __ jcc (Assembler::zero, yes_double_value);
3124 __ cmpl(Address(rsp, 0), T_FLOAT);
3125 __ jcc (Assembler::notZero, results_done);
3128 if( UseSSE>=1 ) __ movflt(xmm0, Address(rsp, (RegisterSaver::xmm0Offset() + additional_words + 1)*wordSize));
3129 else __ fld_d(Address(rsp, (RegisterSaver::fpResultOffset() + additional_words + 1)*wordSize));
3130 __ jmp(results_done);
3133 __ bind(yes_double_value);
3134 if( UseSSE>=2 ) __ movdbl(xmm0, Address(rsp, (RegisterSaver::xmm0Offset() + additional_words + 1)*wordSize));
3135 else __ fld_d(Address(rsp, (RegisterSaver::fpResultOffset() + additional_words + 1)*wordSize));
3137 __ bind(results_done);
3140 __ leave(); // Epilog!
3143 __ ret(0);
3174 address start = __ pc();
3176 __ subptr(rsp, return_off*wordSize); // Epilog!
3181 __ movptr(Address(rsp, rbp_off*wordSize), rbp);
3184 __ empty_FPU_stack();
3187 __ get_thread(rdx);
3188 __ set_last_Java_frame(rdx, noreg, noreg, NULL);
3193 __ movptr(Address(rsp, arg0_off*wordSize), rdx);
3195 __ movl(Address(rsp, arg1_off*wordSize),rcx);
3196 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
3203 oop_maps->add_gc_map( __ pc()-start, map);
3205 __ get_thread(rcx);
3207 __ reset_last_Java_frame(rcx, false, false);
3210 __ movptr(rdi, rax);
3220 __ addptr(rsp,(framesize-1)*wordSize); // Epilog!
3223 __ movl2ptr(rcx, Address(rdi,Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes()));
3224 __ addptr(rsp, rcx);
3230 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3231 __ bang_stack_size(rbx, rcx);
3236 __ movl(rcx,Address(rdi,Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3238 __ pop(rsi); // trash the pc
3241 __ movptr(rsi,Address(rdi,Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes()));
3245 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
3246 __ movl(counter, rbx);
3249 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3257 __ movptr(sp_temp, rsp);
3258 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::caller_adjustment_offset_in_bytes()));
3259 __ subptr(rsp, rbx);
3263 __ bind(loop);
3264 __ movptr(rbx, Address(rsi, 0)); // Load frame size
3266 __ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and
3268 __ push(0xDEADDEAD); // Make a recognizable pattern
3269 __ push(0xDEADDEAD); // (parm to RecursiveInterpreter...)
3271 __ subptr(rsp, 2*wordSize); // skip the "static long no_param"
3274 __ subptr(rbx, 2*wordSize); // we'll push pc and rbp, by hand
3276 __ pushptr(Address(rcx, 0)); // save return address
3277 __ enter(); // save old & set new rbp,
3278 __ subptr(rsp, rbx); // Prolog!
3279 __ movptr(rbx, sp_temp); // sender's sp
3281 __ movptr(Address(rbp,
3286 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD );
3287 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
3289 __ movptr(sp_temp, rsp); // pass to next frame
3290 __ addptr(rsi, wordSize); // Bump array pointer (sizes)
3291 __ addptr(rcx, wordSize); // Bump array pointer (pcs)
3292 __ decrementl(counter); // decrement counter
3293 __ jcc(Assembler::notZero, loop);
3294 __ pushptr(Address(rcx, 0)); // save final return address
3297 __ enter(); // save old & set new rbp,
3298 __ subptr(rsp, (framesize-2) * wordSize); // Prolog!
3302 __ get_thread(rdi);
3303 __ set_last_Java_frame(rdi, noreg, rbp, NULL);
3308 __ movptr(Address(rsp,arg0_off*wordSize),rdi);
3309 __ movl(Address(rsp,arg1_off*wordSize), Deoptimization::Unpack_uncommon_trap);
3310 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames)));
3312 oop_maps->add_gc_map( __ pc()-start, new OopMap( framesize, 0 ) );
3314 __ get_thread(rdi);
3315 __ reset_last_Java_frame(rdi, true, false);
3318 __ leave(); // Epilog!
3321 __ ret(0);
3355 address start = __ pc();
3366 __ push(rbx); // Make room for return address (or push it again)
3375 __ get_thread(java_thread);
3376 __ push(java_thread);
3377 __ set_last_Java_frame(java_thread, noreg, noreg, NULL);
3381 __ movptr(rax, Address(java_thread, JavaThread::saved_exception_pc_offset()));
3382 __ movptr(Address(rbp, wordSize), rax);
3386 __ call(RuntimeAddress(call_ptr));
3393 oop_maps->add_gc_map( __ pc() - start, map);
3396 __ pop(rcx);
3401 __ get_thread(java_thread);
3402 __ reset_last_Java_frame(java_thread, false, false);
3404 __ cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
3405 __ jcc(Assembler::equal, noException);
3410 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
3412 __ bind(noException);
3417 __ ret(0);
3451 int start = __ offset();
3455 int frame_complete = __ offset();
3458 __ get_thread(rdi);
3460 __ push(thread);
3461 __ set_last_Java_frame(thread, noreg, rbp, NULL);
3463 __ call(RuntimeAddress(destination));
3470 oop_maps->add_gc_map( __ offset() - start, map);
3474 __ addptr(rsp, wordSize);
3477 __ reset_last_Java_frame(thread, true, false);
3480 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
3481 __ jcc(Assembler::notEqual, pending);
3484 __ movptr(rbx, Address(thread, JavaThread::vm_result_offset()));
3485 __ movptr(Address(rsp, RegisterSaver::rbx_offset() * wordSize), rbx);
3487 __ movptr(Address(rsp, RegisterSaver::rax_offset() * wordSize), rax);
3493 __ jmp(rax);
3497 __ bind(pending);
3503 __ get_thread(thread);
3504 __ movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD);
3505 __ movptr(rax, Address(thread, Thread::pending_exception_offset()));
3506 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));