Lines Matching defs:__
65 #define __ _masm->
123 address entry = __ pc();
125 case T_BOOLEAN: __ c2bool(rax); break;
126 case T_CHAR : __ andl(rax, 0xFFFF); break;
127 case T_BYTE : __ sign_extend_byte (rax); break;
128 case T_SHORT : __ sign_extend_short(rax); break;
137 __ pop(t); // remove return address first
144 __ fld_d(Address(rsp, 0));
146 __ fstp_s(Address(rsp, 0));
149 __ movflt(xmm0, Address(rsp, 0));
151 __ movdbl(xmm0, Address(rsp, 0));
154 __ fld_d(Address(rsp, 0));
157 __ addptr(rsp, 2 * wordSize);
158 __ push(t); // restore return address
163 __ movptr(rax, STATE(_oop_temp));
165 __ verify_oop(rax);
169 __ ret(0); // return from result handler
180 address entry = __ pc();
183 __ pop(t); // remove return address first
189 __ c2bool(rax);
191 __ push(rax);
195 __ andl(rax, 0xFFFF);
197 __ push(rax);
201 __ sign_extend_byte (rax);
203 __ push(rax);
207 __ sign_extend_short(rax);
209 __ push(rax);
212 __ push(rdx); // pushes useless junk on 64bit
213 __ push(rax);
216 __ push(rax);
220 __ subptr(rsp, wordSize);
222 __ fstp_s(Address(rsp, 0));
224 __ movflt(Address(rsp, 0), xmm0);
228 __ subptr(rsp, 2*wordSize);
230 __ fstp_d(Address(rsp, 0));
232 __ movdbl(Address(rsp, 0), xmm0);
236 __ verify_oop(rax); // verify it
237 __ push(rax);
241 __ jmp(t); // return from result handler
266 address entry = __ pc();
270 __ movptr(rax, STATE(_locals)); // pop parameters get new stack value
271 __ addptr(rax, wordSize); // account for prepush before we return
280 __ movptr(rdx, STATE(_stack));
281 __ movptr(rax, STATE(_locals)); // address for result
282 __ movl(rdx, Address(rdx, wordSize)); // get result
283 __ movptr(Address(rax, 0), rdx); // and store it
292 __ movptr(rax, STATE(_locals)); // address for result
293 __ movptr(rcx, STATE(_stack));
294 __ subptr(rax, wordSize); // need addition word besides locals[0]
295 __ movptr(rdx, Address(rcx, 2*wordSize)); // get result word (junk in 64bit)
296 __ movptr(Address(rax, wordSize), rdx); // and store it
297 __ movptr(rdx, Address(rcx, wordSize)); // get result word
298 __ movptr(Address(rax, 0), rdx); // and store it
301 __ movptr(rdx, STATE(_stack));
302 __ movptr(rax, STATE(_locals)); // address for result
303 __ movptr(rdx, Address(rdx, wordSize)); // get result
304 __ verify_oop(rdx); // verify it
305 __ movptr(Address(rax, 0), rdx); // and store it
309 __ ret(0);
325 address entry = __ pc();
334 __ movptr(rdx, STATE(_stack)); // get top of stack
335 __ movl(rax, Address(rdx, wordSize)); // get result word 1
338 __ movptr(rdx, STATE(_stack)); // get top of stack
339 __ movptr(rax, Address(rdx, wordSize)); // get result low word
340 NOT_LP64(__ movl(rdx, Address(rdx, 2*wordSize));) // get result high word
343 __ movptr(rdx, STATE(_stack)); // get top of stack
345 __ movflt(xmm0, Address(rdx, wordSize));
347 __ fld_s(Address(rdx, wordSize)); // pushd float result
351 __ movptr(rdx, STATE(_stack)); // get top of stack
353 __ movdbl(xmm0, Address(rdx, wordSize));
355 __ fld_d(Address(rdx, wordSize)); // push double result
359 __ movptr(rdx, STATE(_stack)); // get top of stack
360 __ movptr(rax, Address(rdx, wordSize)); // get result word 1
361 __ verify_oop(rax); // verify it
365 __ ret(0);
442 __ subptr(rsp, 2*wordSize);
444 __ push((int32_t)NULL_WORD);
445 __ push(state); // make it look like a real argument
451 __ push(rax);
452 __ enter();
454 __ mov(rax, state); // save current state
456 __ lea(rsp, Address(rsp, -(int)sizeof(BytecodeInterpreter)));
457 __ mov(state, rsp);
464 __ movptr(STATE(_locals), locals); // state->_locals = locals()
465 __ movptr(STATE(_self_link), state); // point to self
466 __ movptr(STATE(_prev_link), rax); // state->_link = state on entry (NULL or previous state)
467 __ movptr(STATE(_sender_sp), sender_sp); // state->_sender_sp = sender_sp
469 __ movptr(STATE(_thread), r15_thread); // state->_bcp = codes()
471 __ get_thread(rax); // get vm's javathread*
472 __ movptr(STATE(_thread), rax); // state->_bcp = codes()
474 __ movptr(rdx, Address(rbx, methodOopDesc::const_offset())); // get constantMethodOop
475 __ lea(rdx, Address(rdx, constMethodOopDesc::codes_offset())); // get code base
477 __ movptr(STATE(_bcp), (int32_t)NULL_WORD); // state->_bcp = NULL
479 __ movptr(STATE(_bcp), rdx); // state->_bcp = codes()
481 __ xorptr(rdx, rdx);
482 __ movptr(STATE(_oop_temp), rdx); // state->_oop_temp = NULL (only really needed for native)
483 __ movptr(STATE(_mdx), rdx); // state->_mdx = NULL
484 __ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
485 __ movptr(rdx, Address(rdx, constMethodOopDesc::constants_offset()));
486 __ movptr(rdx, Address(rdx, constantPoolOopDesc::cache_offset_in_bytes()));
487 __ movptr(STATE(_constants), rdx); // state->_constants = constants()
489 __ movptr(STATE(_method), rbx); // state->_method = method()
490 __ movl(STATE(_msg), (int32_t) BytecodeInterpreter::method_entry); // state->_msg = initial method entry
491 __ movptr(STATE(_result._to_call._callee), (int32_t) NULL_WORD); // state->_result._to_call._callee_callee = NULL
494 __ movptr(STATE(_monitor_base), rsp); // set monitor block bottom (grows down) this would point to entry [0]
507 __ movl(rax, access_flags);
508 __ testl(rax, JVM_ACC_SYNCHRONIZED);
509 __ jcc(Assembler::zero, not_synced);
516 __ movl(rax, access_flags);
517 __ testl(rax, JVM_ACC_STATIC);
518 __ movptr(rax, Address(locals, 0)); // get receiver (assume this is frequent case)
519 __ jcc(Assembler::zero, done);
520 __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
521 __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
522 __ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes()));
523 __ movptr(rax, Address(rax, mirror_offset));
524 __ bind(done);
526 __ subptr(rsp, entry_size); // add space for a monitor entry
527 __ movptr(Address(rsp, BasicObjectLock::obj_offset_in_bytes()), rax); // store object
528 __ bind(not_synced);
531 __ movptr(STATE(_stack_base), rsp); // set expression stack base ( == &monitors[-count])
533 __ movptr(STATE(_stack), rsp); // set current expression stack tos
534 __ movptr(STATE(_stack_limit), rsp);
536 __ subptr(rsp, wordSize); // pre-push stack
537 __ movptr(STATE(_stack), rsp); // set current expression stack tos
543 __ load_unsigned_short(rdx, size_of_stack); // get size of expression stack in words
544 __ negptr(rdx); // so we can subtract in next step
546 __ lea(rsp, Address(rsp, rdx, Address::times_ptr, -extra_stack));
547 __ movptr(STATE(_stack_limit), rsp);
552 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
553 __ andptr(rsp, -16); // must be 16 byte boundary (see amd64 ABI)
577 __ incrementl(Address(rbx,methodOopDesc::interpreter_invocation_counter_offset()));
580 __ movl(rax, backedge_counter); // load backedge counter
582 __ increment(rcx, InvocationCounter::count_increment);
583 __ andl(rax, InvocationCounter::count_mask_value); // mask out the status bits
585 __ movl(invocation_counter, rcx); // save invocation count
586 __ addl(rcx, rax); // add both counters
592 __ cmp32(rcx,
594 __ jcc(Assembler::aboveEqual, *overflow);
620 __ movptr(rax, (int32_t)false);
621 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax);
624 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); // restore state
625 __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method))); // restore method
626 __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals))); // get locals pointer
628 __ jmp(*do_continue, relocInfo::none);
675 __ push(state);
679 NOT_LP64(__ get_thread(thread));
690 __ load_unsigned_short(rax, size_of_stack); // get size of expression stack in words
691 __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), extra_stack + one_monitor));
692 __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
697 __ cmpptr(stack_base, (int32_t)0);
698 __ jcc(Assembler::notEqual, stack_base_okay);
699 __ stop("stack base is zero");
700 __ bind(stack_base_okay);
702 __ cmpptr(stack_size, (int32_t)0);
703 __ jcc(Assembler::notEqual, stack_size_okay);
704 __ stop("stack size is zero");
705 __ bind(stack_size_okay);
709 __ addptr(rax, stack_base);
710 __ subptr(rax, stack_size);
722 __ addptr(rax, slop + 2*max_pages * page_size);
725 __ cmpptr(rsp, rax);
726 __ jcc(Assembler::above, after_frame_check_pop);
728 __ pop(state); // get c++ prev state.
731 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
734 __ bind(after_frame_check_pop);
735 __ pop(state);
737 __ bind(after_frame_check);
754 __ movptr(monitor, STATE(_monitor_base)); // get monitor bottom limit
755 __ subptr(monitor, entry_size); // point to initial monitor
759 __ movl(rax, access_flags);
760 __ testl(rax, JVM_ACC_SYNCHRONIZED);
761 __ jcc(Assembler::notZero, L);
762 __ stop("method doesn't need synchronization");
763 __ bind(L);
769 __ movl(rax, access_flags);
770 __ movptr(rdi, STATE(_locals)); // prepare to get receiver (assume common case)
771 __ testl(rax, JVM_ACC_STATIC);
772 __ movptr(rax, Address(rdi, 0)); // get receiver (assume this is frequent case)
773 __ jcc(Assembler::zero, done);
774 __ movptr(rax, Address(rbx, methodOopDesc::const_offset()));
775 __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset()));
776 __ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes()));
777 __ movptr(rax, Address(rax, mirror_offset));
778 __ bind(done);
782 __ cmpptr(rax, Address(monitor, BasicObjectLock::obj_offset_in_bytes())); // correct object?
783 __ jcc(Assembler::equal, L);
784 __ stop("wrong synchronization lobject");
785 __ bind(L);
789 __ lock_object(monitor);
805 address entry_point = __ pc();
810 __ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
813 __ jcc(Assembler::notEqual, slow_path);
821 __ movptr(rax, Address(rsp, wordSize));
824 __ testptr(rax, rax);
825 __ jcc(Assembler::zero, slow_path);
828 __ movptr(rdx, Address(rbx, methodOopDesc::const_offset()));
829 __ movptr(rdi, Address(rdx, constMethodOopDesc::constants_offset()));
830 __ movl(rdx, Address(rdx, constMethodOopDesc::codes_offset()));
833 __ shrl(rdx, 2*BitsPerByte);
834 __ shll(rdx, exact_log2(in_words(ConstantPoolCacheEntry::size())));
835 __ movptr(rdi, Address(rdi, constantPoolOopDesc::cache_offset_in_bytes()));
849 __ movl(rcx,
853 __ shrl(rcx, 2*BitsPerByte);
854 __ andl(rcx, 0xFF);
855 __ cmpl(rcx, Bytecodes::_getfield);
856 __ jcc(Assembler::notEqual, slow_path);
859 __ movptr(rcx,
863 __ movl(rdx,
874 __ shrl(rdx, ConstantPoolCacheEntry::tos_state_shift);
879 __ cmpl(rdx, atos);
880 __ jcc(Assembler::notEqual, notObj);
882 __ movptr(rax, field_address);
883 __ jmp(xreturn_path);
885 __ bind(notObj);
887 __ cmpl(rdx, btos);
888 __ jcc(Assembler::notEqual, notByte);
889 __ load_signed_byte(rax, field_address);
890 __ jmp(xreturn_path);
892 __ bind(notByte);
893 __ cmpl(rdx, stos);
894 __ jcc(Assembler::notEqual, notShort);
895 __ load_signed_short(rax, field_address);
896 __ jmp(xreturn_path);
898 __ bind(notShort);
899 __ cmpl(rdx, ctos);
900 __ jcc(Assembler::notEqual, notChar);
901 __ load_unsigned_short(rax, field_address);
902 __ jmp(xreturn_path);
904 __ bind(notChar);
908 __ cmpl(rdx, atos);
909 __ jcc(Assembler::equal, okay);
911 __ cmpl(rdx, itos);
912 __ jcc(Assembler::equal, okay);
913 __ stop("what type is this?");
914 __ bind(okay);
917 __ movl(rax, field_address);
919 __ bind(xreturn_path);
922 __ pop(rdi); // get return address
923 __ mov(rsp, sender_sp_on_entry); // set sp to sender sp
924 __ jmp(rdi);
927 __ bind(slow_path);
933 __ jmp(fast_accessor_slow_entry_path);
978 address entry_point = __ pc();
989 __ load_unsigned_short(rcx, size_of_parameters);
993 __ pop(rax); // get return address
997 __ lea(locals, Address(rsp, rcx, Address::times_ptr, -wordSize));
1011 __ mov(rcx, sender_sp_on_entry);
1013 __ movptr(state, (int32_t)NULL_WORD);
1018 __ movptr(rax, STATE(_stack_base));
1021 __ subptr(rax, frame::arg_reg_save_area_bytes); // windows
1022 __ andptr(rax, -16); // must be 16 byte boundary (see amd64 ABI)
1024 __ cmpptr(rax, rsp);
1025 __ jcc(Assembler::equal, L);
1026 __ stop("broken stack frame setup in interpreter");
1027 __ bind(L);
1031 if (inc_counter) __ movl(rcx, invocation_counter); // (pre-)fetch invocation count
1034 NOT_LP64(__ movptr(unlock_thread, STATE(_thread));) // get thread
1043 __ movbool(do_not_unlock_if_synchronized, true);
1047 __ movl(rax, access_flags);
1050 __ testl(rax, JVM_ACC_NATIVE);
1051 __ jcc(Assembler::notZero, L);
1052 __ stop("tried to execute non-native method as native");
1053 __ bind(L);
1056 __ testl(rax, JVM_ACC_ABSTRACT);
1057 __ jcc(Assembler::zero, L);
1058 __ stop("tried to execute abstract method in interpreter");
1059 __ bind(L);
1072 __ bind(continue_after_compile);
1077 NOT_LP64(__ movl(rax, STATE(_thread));) // get thread
1078 __ movbool(do_not_unlock_if_synchronized, false);
1092 __ movl(rax, access_flags);
1093 __ testl(rax, JVM_ACC_SYNCHRONIZED);
1094 __ jcc(Assembler::zero, L);
1095 __ stop("method needs synchronization");
1096 __ bind(L);
1104 __ notify_method_entry();
1112 __ movptr(method, STATE(_method));
1113 __ verify_oop(method);
1114 __ load_unsigned_short(t, Address(method, methodOopDesc::size_of_parameters_offset()));
1115 __ shll(t, 2);
1117 __ subptr(rsp, t);
1118 __ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
1119 __ andptr(rsp, -16); // must be 16 byte boundary (see amd64 ABI)
1121 __ addptr(t, 2*wordSize); // allocate two more slots for JNIEnv and possible mirror
1122 __ subptr(rsp, t);
1123 __ andptr(rsp, -(StackAlignmentInBytes)); // gcc needs 16 byte aligned stacks to do XMM intrinsics
1130 __ movptr(t, Address(method, methodOopDesc::signature_handler_offset()));
1131 __ testptr(t, t);
1132 __ jcc(Assembler::notZero, L);
1133 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method, false);
1134 __ movptr(method, STATE(_method));
1135 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
1136 __ jcc(Assembler::notEqual, pending_exception_present);
1137 __ verify_oop(method);
1138 __ movptr(t, Address(method, methodOopDesc::signature_handler_offset()));
1139 __ bind(L);
1144 __ push(t);
1145 __ get_thread(t); // get vm's javathread*
1146 __ cmpptr(t, STATE(_thread));
1147 __ jcc(Assembler::equal, L);
1148 __ int3();
1149 __ bind(L);
1150 __ pop(t);
1162 __ movptr(from_ptr, STATE(_locals)); // get the from pointer
1163 __ call(t);
1164 __ movptr(method, STATE(_method));
1165 __ verify_oop(method);
1169 __ movptr(STATE(_result_handler), rax);
1174 __ movptr(rax, Address(method, methodOopDesc::native_function_offset()));
1175 __ testptr(rax, rax);
1176 __ jcc(Assembler::notZero, L);
1177 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), method);
1178 __ movptr(method, STATE(_method));
1179 __ verify_oop(method);
1180 __ movptr(rax, Address(method, methodOopDesc::native_function_offset()));
1181 __ bind(L);
1187 __ movl(t, Address(method, methodOopDesc::access_flags_offset()));
1188 __ testl(t, JVM_ACC_STATIC);
1189 __ jcc(Assembler::zero, L);
1191 __ movptr(t, Address(method, methodOopDesc:: const_offset()));
1192 __ movptr(t, Address(t, constMethodOopDesc::constants_offset()));
1193 __ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
1194 __ movptr(t, Address(t, mirror_offset));
1196 __ movptr(STATE(_oop_temp), t);
1199 __ lea(c_rarg1, STATE(_oop_temp));
1201 __ lea(t, STATE(_oop_temp));
1202 __ movptr(Address(rsp, wordSize), t);
1204 __ bind(L);
1209 __ push(t);
1210 __ get_thread(t); // get vm's javathread*
1211 __ cmpptr(t, STATE(_thread));
1212 __ jcc(Assembler::equal, L);
1213 __ int3();
1214 __ bind(L);
1215 __ pop(t);
1221 __ lea(c_rarg0, Address(thread, JavaThread::jni_environment_offset()));
1223 __ movptr(thread, STATE(_thread)); // get thread
1224 __ lea(t, Address(thread, JavaThread::jni_environment_offset()));
1226 __ movptr(Address(rsp, 0), t);
1232 __ push(t);
1233 __ get_thread(t); // get vm's javathread*
1234 __ cmpptr(t, STATE(_thread));
1235 __ jcc(Assembler::equal, L);
1236 __ int3();
1237 __ bind(L);
1238 __ pop(t);
1244 __ movl(t, Address(thread, JavaThread::thread_state_offset()));
1245 __ cmpl(t, _thread_in_Java);
1246 __ jcc(Assembler::equal, L);
1247 __ stop("Wrong thread state in native stub");
1248 __ bind(L);
1256 __ set_last_Java_frame(thread, noreg, rbp, __ pc());
1258 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_native);
1260 __ call(rax);
1263 __ movptr(method, STATE(_method));
1264 NOT_LP64(__ movptr(thread, STATE(_thread));) // get thread
1278 __ cmpptr(STATE(_result_handler), float_handler.addr());
1279 __ jcc(Assembler::equal, Lpush);
1280 __ cmpptr(STATE(_result_handler), double_handler.addr());
1281 __ jcc(Assembler::notEqual, Lskip);
1282 __ bind(Lpush);
1283 __ subptr(rsp, 2*wordSize);
1285 __ fstp_d(Address(rsp, 0));
1287 __ movdbl(Address(rsp, 0), xmm0);
1289 __ bind(Lskip);
1293 __ push(rax);
1295 __ push(rdx);
1299 __ restore_cpu_control_state_after_jni();
1302 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_native_trans);
1308 __ serialize_memory(thread, rcx);
1314 __ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
1321 __ jcc(Assembler::notEqual, L);
1322 __ cmpl(Address(thread, JavaThread::suspend_flags_offset()), 0);
1323 __ jcc(Assembler::equal, Continue);
1324 __ bind(L);
1334 __ increment(rsp, wordSize);
1336 __ movptr(method, STATE(_method));
1337 __ verify_oop(method);
1338 __ movptr(thread, STATE(_thread)); // get thread
1340 __ bind(Continue);
1344 __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_Java);
1346 __ reset_last_Java_frame(thread, true, true);
1349 __ movptr(t, Address(thread, JavaThread::active_handles_offset()));
1350 __ movptr(Address(t, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD);
1356 __ cmpptr(STATE(_result_handler), oop_handler.addr());
1357 __ jcc(Assembler::notEqual, no_oop);
1359 __ pop(rdx);
1361 __ pop(rax);
1362 __ testptr(rax, rax);
1363 __ jcc(Assembler::zero, store_result);
1365 __ movptr(rax, Address(rax, 0));
1366 __ bind(store_result);
1367 __ movptr(STATE(_oop_temp), rax);
1369 __ push(rax);
1371 __ push(rdx);
1373 __ bind(no_oop);
1378 __ cmpl(Address(thread, JavaThread::stack_guard_state_offset()), JavaThread::stack_guard_yellow_disabled);
1379 __ jcc(Assembler::notEqual, no_reguard);
1381 __ pusha();
1382 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)));
1383 __ popa();
1385 __ bind(no_reguard);
1398 __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
1399 __ jcc(Assembler::zero, L);
1400 __ bind(pending_exception_present);
1410 __ movptr(t, STATE(_sender_sp));
1411 __ leave(); // remove frame anchor
1412 __ pop(rdi); // get return address
1413 __ movptr(state, STATE(_prev_link)); // get previous state for return
1414 __ mov(rsp, t); // set sp to sender sp
1415 __ push(rdi); // push throwing pc
1418 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
1419 __ bind(L);
1424 __ movl(t, Address(method, methodOopDesc::access_flags_offset()));
1425 __ testl(t, JVM_ACC_SYNCHRONIZED);
1426 __ jcc(Assembler::zero, L);
1432 __ movptr(monitor, STATE(_monitor_base));
1433 __ subptr(monitor, frame::interpreter_frame_monitor_size() * wordSize); // address of initial monitor
1435 __ movptr(t, Address(monitor, BasicObjectLock::obj_offset_in_bytes()));
1436 __ testptr(t, t);
1437 __ jcc(Assembler::notZero, unlock);
1440 __ MacroAssembler::call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_illegal_monitor_state_exception));
1441 __ should_not_reach_here();
1443 __ bind(unlock);
1444 __ unlock_object(monitor);
1446 __ movptr(method, STATE(_method));
1448 __ bind(L);
1456 __ notify_method_exit(vtos, InterpreterMacroAssembler::NotifyJVMTI);
1460 __ pop(rdx);
1462 __ pop(rax);
1463 __ movptr(t, STATE(_result_handler)); // get result handler
1464 __ call(t); // call result handler to convert to tosca form
1468 __ movptr(t, STATE(_sender_sp));
1470 __ leave(); // remove frame anchor
1471 __ pop(rdi); // get return address
1472 __ movptr(state, STATE(_prev_link)); // get previous state for return (if c++ interpreter was caller)
1473 __ mov(rsp, t); // set sp to sender sp
1474 __ jmp(rdi);
1479 __ bind(invocation_counter_overflow);
1493 deopt_frame_manager_return_atos = __ pc();
1496 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_OBJECT)); // Result stub address array index
1497 __ jmp(return_from_deopt_common);
1501 deopt_frame_manager_return_btos = __ pc();
1504 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_BOOLEAN)); // Result stub address array index
1505 __ jmp(return_from_deopt_common);
1508 deopt_frame_manager_return_itos = __ pc();
1511 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_INT)); // Result stub address array index
1512 __ jmp(return_from_deopt_common);
1516 deopt_frame_manager_return_ltos = __ pc();
1518 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_LONG)); // Result stub address array index
1519 __ jmp(return_from_deopt_common);
1523 deopt_frame_manager_return_ftos = __ pc();
1525 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT)); // Result stub address array index
1526 __ jmp(return_from_deopt_common);
1529 deopt_frame_manager_return_dtos = __ pc();
1532 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE)); // Result stub address array index
1533 __ jmp(return_from_deopt_common);
1536 deopt_frame_manager_return_vtos = __ pc();
1538 __ movl(rcx, AbstractInterpreter::BasicType_as_index(T_VOID));
1553 __ bind(return_from_deopt_common);
1555 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));
1558 __ movptr(rsp, STATE(_stack)); // trim stack (is prepushed)
1559 __ addptr(rsp, wordSize); // undo prepush
1563 __ movptr(rcx, ArrayAddress(tosca_to_stack, Address(noreg, rcx, Address::times_ptr)));
1564 // __ movl(rcx, Address(noreg, rcx, Address::times_ptr, int(AbstractInterpreter::_tosca_to_stack)));
1565 __ call(rcx); // call result converter
1567 __ movl(STATE(_msg), (int)BytecodeInterpreter::deopt_resume);
1568 __ lea(rsp, Address(rsp, -wordSize)); // prepush stack (result if any already present)
1569 __ movptr(STATE(_stack), rsp); // inform interpreter of new stack depth (parameters removed,
1571 __ movptr(rsp, STATE(_stack_limit)); // restore expression stack to full depth
1581 __ movptr(rdx, STATE(_stack_base)); // rdx: old expression stack bottom
1582 __ subptr(rsp, entry_size); // move expression stack top limit
1583 __ subptr(STATE(_stack), entry_size); // update interpreter stack top
1584 __ subptr(STATE(_stack_limit), entry_size); // inform interpreter
1585 __ subptr(rdx, entry_size); // move expression stack bottom
1586 __ movptr(STATE(_stack_base), rdx); // inform interpreter
1587 __ movptr(rcx, STATE(_stack)); // set start value for copy loop
1588 __ jmp(entry);
1590 __ bind(loop);
1591 __ movptr(rbx, Address(rcx, entry_size)); // load expression stack word from old location
1592 __ movptr(Address(rcx, 0), rbx); // and store it at new location
1593 __ addptr(rcx, wordSize); // advance to next word
1594 __ bind(entry);
1595 __ cmpptr(rcx, rdx); // check if bottom reached
1596 __ jcc(Assembler::notEqual, loop); // if not at bottom then copy next word
1598 __ movptr(Address(rdx, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL_WORD);
1599 __ movl(STATE(_msg), (int)BytecodeInterpreter::got_monitors);
1660 address entry_point = __ pc();
1664 if (UseFastAccessorMethods && !synchronized) __ bind(fast_accessor_slow_entry_path);
1667 __ movptr(rcx, sender_sp_on_entry);
1668 __ movptr(state, (int32_t)NULL_WORD); // no current activation
1670 __ jmp(dispatch_entry_2);
1676 __ bind(re_dispatch);
1679 __ lea(rcx, Address(rsp, wordSize));
1681 __ bind(dispatch_entry_2);
1684 __ push(rcx);
1695 __ load_unsigned_short(rcx, size_of_parameters);
1699 __ load_unsigned_short(rdx, size_of_locals); // get size of locals in words
1701 __ subptr(rdx, rcx); // rdx = no. of additional locals
1713 __ lea(locals, Address(rsp, rcx, Address::times_ptr, wordSize));
1716 // __ movl(rcx, rsp);
1719 __ pop(rcx);
1722 __ pop(rax);
1729 __ testl(rdx, rdx); // (32bit ok)
1730 __ jcc(Assembler::lessEqual, exit); // do nothing if rdx <= 0
1731 __ bind(loop);
1732 __ push((int32_t)NULL_WORD); // initialize local variables
1733 __ decrement(rdx); // until everything initialized
1734 __ jcc(Assembler::greater, loop);
1735 __ bind(exit);
1753 __ bind(call_interpreter);
1765 __ bind(call_interpreter_2);
1771 __ mov(c_rarg0, state);
1773 __ push(state); // push arg to interpreter
1774 __ movptr(thread, STATE(_thread));
1781 __ movptr(Address(thread, JavaThread::last_Java_fp_offset()), rbp);
1782 __ movptr(Address(thread, JavaThread::last_Java_sp_offset()), rsp);
1789 __ call(JvmtiExport::can_post_interpreter_events() ? checking : normal);
1790 NOT_LP64(__ pop(rax);) // discard parameter to run
1797 NOT_LP64(__ movl(thread, STATE(_thread));)
1798 __ reset_last_Java_frame(thread, true, true);
1803 __ movl(rdx, STATE(_msg)); // Get new message
1811 __ cmpl(rdx, (int32_t)BytecodeInterpreter::call_method);
1812 __ jcc(Assembler::equal, call_method);
1813 __ cmpl(rdx, (int32_t)BytecodeInterpreter::return_from_method);
1814 __ jcc(Assembler::equal, return_from_interpreted_method);
1815 __ cmpl(rdx, (int32_t)BytecodeInterpreter::do_osr);
1816 __ jcc(Assembler::equal, do_OSR);
1817 __ cmpl(rdx, (int32_t)BytecodeInterpreter::throwing_exception);
1818 __ jcc(Assembler::equal, throw_exception);
1819 __ cmpl(rdx, (int32_t)BytecodeInterpreter::more_monitors);
1820 __ jcc(Assembler::notEqual, bad_msg);
1826 __ jmp(call_interpreter);
1829 unctrap_frame_manager_entry = __ pc();
1832 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));
1833 __ movptr(rsp, STATE(_stack_limit)); // restore expression stack to full depth
1834 __ jmp(call_interpreter_2);
1848 __ jmp(call_interpreter);
1857 Interpreter::_rethrow_exception_entry = __ pc();
1865 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));
1867 __ movptr(rbx, STATE(_method)); // get method
1869 __ movptr(Address(r15_thread, Thread::pending_exception_offset()), rax);
1871 __ movl(rcx, STATE(_thread)); // get thread
1874 __ movptr(Address(rcx, Thread::pending_exception_offset()), rax);
1879 __ movl(rdx, access_flags);
1880 __ testl(rdx, JVM_ACC_NATIVE);
1881 __ jcc(Assembler::zero, return_with_exception); // vanilla interpreted frame, handle directly
1887 __ bind(unwind_and_forward);
1891 __ movptr(rcx, STATE(_sender_sp));
1892 __ leave();
1893 __ pop(rdx);
1894 __ mov(rsp, rcx);
1895 __ push(rdx);
1896 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
1911 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));
1912 __ movptr(rbx, STATE(_result._to_call._callee)); // get method just executed
1913 __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset()));
1914 __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT)); // Result stub address array index
1915 __ jcc(Assembler::equal, do_float);
1916 __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE)); // Result stub address array index
1917 __ jcc(Assembler::equal, do_double);
1919 __ empty_FPU_stack();
1921 __ jmp(done_conv);
1923 __ bind(do_float);
1926 __ ffree(i);
1929 __ jmp(done_conv);
1930 __ bind(do_double);
1933 __ ffree(i);
1936 __ jmp(done_conv);
1938 __ MacroAssembler::verify_FPU(0, "generate_return_entry_for compiled");
1939 __ jmp(done_conv);
1943 InternalAddress return_from_native_method(__ pc());
1945 __ bind(done_conv);
1954 __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));
1958 __ movptr(rsp, STATE(_stack));
1959 __ lea(rsp, Address(rsp, wordSize));
1964 __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
1966 __ movptr(rcx, STATE(_thread)); // get thread
1967 __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
1969 __ jcc(Assembler::notZero, return_with_exception);
1972 __ movptr(rbx, STATE(_result._to_call._callee));
1975 __ load_unsigned_short(rcx, Address(rbx, methodOopDesc::size_of_parameters_offset()));
1976 __ lea(rsp, Address(rsp, rcx, Address::times_ptr));
1978 __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset()));
1981 __ movptr(rcx, ArrayAddress(tosca_to_stack, Address(noreg, rcx, Address::times_ptr)));
1982 // __ movl(rcx, Address(noreg, rcx, Address::times_ptr, int(AbstractInterpreter::_tosca_to_stack)));
1983 __ call(rcx); // call result converter
1984 __ jmp(resume_interpreter);
1989 __ bind(return_with_exception);
1992 __ movptr(rsp, STATE(_stack_base));
1993 __ jmp(resume_interpreter);
1999 __ bind(return_from_interpreted_method);
2003 __ movptr(rbx, STATE(_method)); // get method just executed
2004 __ cmpptr(STATE(_prev_link), (int32_t)NULL_WORD); // returning from "recursive" interpreter call?
2005 __ movl(rax, Address(rbx, methodOopDesc::result_index_offset())); // get result type index
2006 __ jcc(Assembler::equal, return_to_initial_caller); // back to native code (call_stub/c1/c2)
2012 __ movptr(rax, ArrayAddress(stack_to_stack, Address(noreg, rax, Address::times_ptr)));
2013 // __ movl(rax, Address(noreg, rax, Address::times_ptr, int(AbstractInterpreter::_stack_to_stack)));
2014 __ call(rax); // call result converter
2017 __ bind(unwind_recursive_activation);
2023 __ movptr(state, STATE(_prev_link)); // unwind state
2024 __ leave(); // pop the frame
2025 __ mov(rsp, rax); // unwind stack to remove args
2031 __ bind(resume_interpreter);
2035 __ movl(STATE(_msg), (int)BytecodeInterpreter::method_resume);
2036 __ lea(rsp, Address(rsp, -wordSize)); // prepush stack (result if any already present)
2037 __ movptr(STATE(_stack), rsp); // inform interpreter of new stack depth (parameters removed,
2039 __ movptr(rsp, STATE(_stack_limit)); // restore expression stack to full depth
2040 __ jmp(call_interpreter_2); // No need to bang
2046 __ bind(return_to_initial_caller);
2050 __ movptr(rax, ArrayAddress(stack_to_native, Address(noreg, rax, Address::times_ptr)));
2051 __ call(rax); // call result converter
2054 __ bind(unwind_initial_activation);
2072 __ movptr(rcx, STATE(_sender_sp));
2073 __ leave();
2074 __ pop(rdi); // get return address
2076 __ mov(rsp, rcx);
2077 __ jmp(rdi); // return to call_stub
2082 __ bind(do_OSR);
2090 __ movptr(rcx, STATE(_result._osr._osr_buf));
2092 __ movptr(rax, STATE(_result._osr._osr_entry));
2094 __ cmpptr(STATE(_prev_link), (int32_t)NULL_WORD); // returning from "recursive" interpreter call?
2095 __ jcc(Assembler::equal, remove_initial_frame); // back to native code (call_stub/c1/c2)
2097 __ movptr(sender_sp_on_entry, STATE(_sender_sp)); // get sender's sp in expected register
2098 __ leave(); // pop the frame
2099 __ mov(rsp, sender_sp_on_entry); // trim any stack expansion
2107 __ pushptr(return_from_native_method.addr());
2109 __ jmp(rax);
2111 __ bind(remove_initial_frame);
2113 __ movptr(rdx, STATE(_sender_sp));
2114 __ leave();
2116 __ pop(rsi);
2118 __ mov(rsp, rdx);
2120 __ push(rsi);
2122 __ jmp(rax);
2130 __ bind(call_method);
2135 __ movptr(rsp, STATE(_stack)); // pop args to c++ interpreter, set sp to java stack top
2136 __ lea(rsp, Address(rsp, wordSize));
2138 __ movptr(rbx, STATE(_result._to_call._callee)); // get method to execute
2145 __ load_unsigned_short(rcx, size_of_parameters); // get size of parameters in words
2148 __ pushptr(recursive.addr()); // make it look good in the debugger
2151 __ cmpptr(STATE(_result._to_call._callee_entry_point), entry.addr()); // returning to interpreter?
2152 __ jcc(Assembler::equal, re_dispatch); // yes
2154 __ pop(rax); // pop dummy address
2158 __ movptr(rax, STATE(_result._to_call._callee_entry_point));
2160 __ mov(sender_sp_on_entry, rsp);
2166 __ pushptr(return_from_native_method.addr());
2168 __ jmp(rax);
2170 __ bind(bad_msg);
2171 __ stop("Bad message from interpreter");
2179 __ bind(throw_exception);
2180 __ cmpptr(STATE(_prev_link), (int32_t)NULL_WORD); // returning from recursive interpreter call?
2181 __ jcc(Assembler::equal, unwind_initial_with_pending_exception); // no, back to native code (call_stub/c1/c2)
2182 __ movptr(rax, STATE(_locals)); // pop parameters get new stack value
2183 __ addptr(rax, wordSize); // account for prepush before we return
2184 __ jmp(unwind_recursive_activation);
2186 __ bind(unwind_initial_with_pending_exception);
2192 __ jmp(unwind_and_forward);