Lines Matching defs:__
68 #define __ _masm->
89 __ stf(FloatRegisterImpl::D, F0, STATE(_native_fresult));
91 __ stx(O0, STATE(_native_lresult));
93 __ std(O0, STATE(_native_lresult));
100 __ ldf(FloatRegisterImpl::D, STATE(_native_fresult), F0);
102 __ ldx(STATE(_native_lresult), O0);
104 __ ldd(STATE(_native_lresult), O0);
114 address entry = __ pc();
120 case T_BOOLEAN: __ subcc(G0, O0, G0); __ addc(G0, 0, Itos_i); break; // !0 => true; 0 => false
121 case T_CHAR : __ sll(O0, 16, O0); __ srl(O0, 16, Itos_i); break; // cannot use and3, 0xFFFF too big as immediate value!
122 case T_BYTE : __ sll(O0, 24, O0); __ sra(O0, 24, Itos_i); break;
123 case T_SHORT : __ sll(O0, 16, O0); __ sra(O0, 16, Itos_i); break;
126 __ mov(O1, Itos_l2); // move other half of long
128 case T_INT : __ mov(O0, Itos_i); break;
133 __ ld_ptr(STATE(_oop_temp), Itos_i);
134 __ verify_oop(Itos_i);
138 __ ret(); // return from interpreter activation
139 __ delayed()->restore(I5_savedSP, G0, SP); // remove interpreter frame
140 NOT_PRODUCT(__ emit_long(0);) // marker for disassembly
153 address entry = __ pc();
157 __ subcc(G0, O0, G0);
158 __ addc(G0, 0, O0);
159 __ st(O0, L1_scratch, 0);
160 __ sub(L1_scratch, wordSize, L1_scratch);
165 __ sll(O0, 16, O0);
166 __ srl(O0, 16, O0);
167 __ st(O0, L1_scratch, 0);
168 __ sub(L1_scratch, wordSize, L1_scratch);
172 __ sll(O0, 24, O0);
173 __ sra(O0, 24, O0);
174 __ st(O0, L1_scratch, 0);
175 __ sub(L1_scratch, wordSize, L1_scratch);
179 __ sll(O0, 16, O0);
180 __ sra(O0, 16, O0);
181 __ st(O0, L1_scratch, 0);
182 __ sub(L1_scratch, wordSize, L1_scratch);
195 __ stx(G1, L1_scratch, -wordSize);
198 __ st(O1, L1_scratch, 0); // Low order
199 __ st(O0, L1_scratch, -wordSize); // High order
202 __ stx(O0, L1_scratch, -wordSize);
204 __ sub(L1_scratch, 2*wordSize, L1_scratch);
208 __ st(O0, L1_scratch, 0);
209 __ sub(L1_scratch, wordSize, L1_scratch);
216 __ stf(FloatRegisterImpl::S, F0, L1_scratch, 0);
217 __ sub(L1_scratch, wordSize, L1_scratch);
223 __ stf(FloatRegisterImpl::D, F0, L1_scratch, -wordSize);
224 __ sub(L1_scratch, 2*wordSize, L1_scratch);
227 __ verify_oop(O0);
228 __ st_ptr(O0, L1_scratch, 0);
229 __ sub(L1_scratch, wordSize, L1_scratch);
233 __ retl(); // return from interpreter activation
234 __ delayed()->nop(); // schedule this better
235 NOT_PRODUCT(__ emit_long(0);) // marker for disassembly
258 address entry = __ pc();
269 __ ld(O0, 0, O2);
270 __ st(O2, O1, 0);
271 __ sub(O1, wordSize, O1);
280 __ ld_ptr(O0, 0, O2);
281 __ st_ptr(O2, O1, -wordSize);
283 __ ld(O0, 0, O2);
284 __ ld(O0, wordSize, O3);
285 __ st(O3, O1, 0);
286 __ st(O2, O1, -wordSize);
288 __ sub(O1, 2*wordSize, O1);
291 __ ld_ptr(O0, 0, O2);
292 __ verify_oop(O2); // verify it
293 __ st_ptr(O2, O1, 0);
294 __ sub(O1, wordSize, O1);
298 __ retl();
299 __ delayed()->nop(); // QQ schedule this better
316 address entry = __ pc();
321 __ ldf(FloatRegisterImpl::S, O0, 0, F0);
329 __ ld(O0, 0, O0->after_save());
332 __ ldf(FloatRegisterImpl::D, O0, 0, F0);
340 __ ld_ptr(O0, 0, O0->after_save());
342 __ ld(O0, wordSize, O1->after_save());
343 __ ld(O0, 0, O0->after_save());
350 __ sllx(Otos_l1->after_save(), 32, G1);
352 __ srl (Otos_l2->after_save(), 0, Otos_l2->after_save());
353 __ or3 (Otos_l2->after_save(), G1, G1);
357 __ ld_ptr(O0, 0, O0->after_save());
358 __ verify_oop(O0->after_save()); // verify it
362 __ retl();
363 __ delayed()->nop();
407 __ increment_invocation_counter(O0, G3_scratch);
409 __ ld_ptr(STATE(_method), G3_scratch);
411 __ ld(interpreter_invocation_counter, G3_scratch);
412 __ inc(G3_scratch);
413 __ st(G3_scratch, interpreter_invocation_counter);
417 __ sethi(invocation_limit);
418 __ ld(invocation_limit, G3_scratch);
419 __ cmp(O0, G3_scratch);
420 __ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
421 __ delayed()->nop();
429 address entry = __ pc();
432 __ verify_oop(G5_method);
438 __ load_contents(sync_state, G3_scratch);
439 __ cmp(G3_scratch, SafepointSynchronize::_not_synchronized);
440 __ br(Assembler::notEqual, false, Assembler::pn, frame_manager_entry);
441 __ delayed()->nop();
444 __ retl();
445 __ delayed()->mov(O5_savedSP, SP);
463 address entry = __ pc();
470 __ load_contents(sync_state, G3_scratch);
471 __ cmp(G3_scratch, SafepointSynchronize::_not_synchronized);
472 __ br(Assembler::notEqual, false, Assembler::pn, slow_path);
473 __ delayed()->nop();
476 __ ld_ptr(Gargs, G0, Otos_i ); // get local 0
477 __ tst(Otos_i); // check if local 0 == NULL and go the slow path
478 __ brx(Assembler::zero, false, Assembler::pn, slow_path);
479 __ delayed()->nop();
484 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::const_offset())), G1_scratch);
485 __ ld(Address(G1_scratch, 0, in_bytes(constMethodOopDesc::codes_offset())), G1_scratch);
488 __ sll(G1_scratch, 2*BitsPerByte, G1_scratch);
489 __ srl(G1_scratch, 2*BitsPerByte - exact_log2(in_words(
493 __ ld_ptr(G5_method, in_bytes(methodOopDesc::const_offset()), G3_scratch);
494 __ ld_ptr(G3_scratch, in_bytes(constMethodOopDesc::constants_offset()), G3_scratch);
495 __ ld_ptr(G3_scratch, constantPoolOopDesc::cache_offset_in_bytes(), G3_scratch);
498 __ add(G3_scratch, G1_scratch, G3_scratch);
503 __ ld_ptr(G3_scratch, in_bytes(cp_base_offset + ConstantPoolCacheEntry::indices_offset()), G1_scratch);
504 __ srl(G1_scratch, 2*BitsPerByte, G1_scratch);
505 __ and3(G1_scratch, 0xFF, G1_scratch);
506 __ cmp(G1_scratch, Bytecodes::_getfield);
507 __ br(Assembler::notEqual, false, Assembler::pn, slow_path);
508 __ delayed()->nop();
511 __ ld_ptr(G3_scratch, in_bytes(cp_base_offset + ConstantPoolCacheEntry::flags_offset()), G1_scratch);
512 __ ld_ptr(G3_scratch, in_bytes(cp_base_offset + ConstantPoolCacheEntry::f2_offset()), G3_scratch);
518 __ srl(G1_scratch, ConstantPoolCacheEntry::tos_state_shift, G1_scratch);
521 __ cmp(G1_scratch, atos );
522 __ br(Assembler::equal, true, Assembler::pt, xreturn_path);
523 __ delayed()->ld_ptr(Otos_i, G3_scratch, Otos_i);
524 __ cmp(G1_scratch, itos);
525 __ br(Assembler::equal, true, Assembler::pt, xreturn_path);
526 __ delayed()->ld(Otos_i, G3_scratch, Otos_i);
527 __ cmp(G1_scratch, stos);
528 __ br(Assembler::equal, true, Assembler::pt, xreturn_path);
529 __ delayed()->ldsh(Otos_i, G3_scratch, Otos_i);
530 __ cmp(G1_scratch, ctos);
531 __ br(Assembler::equal, true, Assembler::pt, xreturn_path);
532 __ delayed()->lduh(Otos_i, G3_scratch, Otos_i);
534 __ cmp(G1_scratch, btos);
535 __ br(Assembler::equal, true, Assembler::pt, xreturn_path);
536 __ delayed()->ldsb(Otos_i, G3_scratch, Otos_i);
537 __ should_not_reach_here();
539 __ ldsb(Otos_i, G3_scratch, Otos_i);
540 __ bind(xreturn_path);
543 __ retl(); // return from leaf routine
544 __ delayed()->mov(O5_savedSP, SP);
547 __ bind(slow_path);
548 __ ba(fast_accessor_slow_entry_path);
549 __ delayed()->nop();
582 address entry = __ pc();
597 __ bind(Lentry);
599 __ verify_oop(G5_method);
607 __ ld(access_flags, Gtmp1);
610 __ btst(JVM_ACC_NATIVE, Gtmp1);
611 __ br(Assembler::notZero, false, Assembler::pt, L);
612 __ delayed()->nop();
613 __ stop("tried to execute non-native method as native");
614 __ bind(L);
617 __ btst(JVM_ACC_ABSTRACT, Gtmp1);
618 __ br(Assembler::zero, false, Assembler::pt, L);
619 __ delayed()->nop();
620 __ stop("tried to execute abstract method as non-abstract");
621 __ bind(L);
625 __ lduh(size_of_parameters, Gtmp1);
626 __ sll(Gtmp1, LogBytesPerWord, Gtmp2); // parameter size in bytes
627 __ add(Gargs, Gtmp2, Gargs); // points to first local + BytesPerWord
629 __ add(Gargs, -wordSize, Gargs); // points to first local[0]
633 // __ mov(SP, I5_savedSP->after_restore());
651 __ movbool(true, G3_scratch);
652 __ stbool(G3_scratch, do_not_unlock_if_synchronized);
665 __ bind(Lcontinue);
669 __ stbool(G0, do_not_unlock_if_synchronized);
678 // __ verify_thread(); QQQ destroys L0,L1 can't use
682 __ ld_ptr(STATE(_method), G5_method);
683 __ ld(access_flags, O0);
684 __ btst(JVM_ACC_SYNCHRONIZED, O0);
685 __ br( Assembler::zero, false, Assembler::pt, ok);
686 __ delayed()->nop();
687 __ stop("method needs synchronization");
688 __ bind(ok);
695 // __ verify_thread(); kills L1,L2 can't use at the moment
698 __ notify_method_entry();
713 __ ld_ptr(STATE(_method), G5_method);
714 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::signature_handler_offset())), G3_scratch);
715 __ tst(G3_scratch);
716 __ brx(Assembler::notZero, false, Assembler::pt, L);
717 __ delayed()->nop();
718 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call), G5_method, false);
719 __ ld_ptr(STATE(_method), G5_method);
722 __ ld_ptr(exception_addr, G3_scratch);
723 __ br_notnull_short(G3_scratch, Assembler::pn, pending_exception_present);
724 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::signature_handler_offset())), G3_scratch);
725 __ bind(L);
736 __ st_ptr(Lstate, SP, (Lstate->sp_offset_in_saved_window() * wordSize) + STACK_BIAS);
738 __ mov(Lstate, O1); // Need to pass the state pointer across the frame
741 __ sub(SP, FP, O3); // Calculate negative of current frame size
742 __ save(SP, O3, SP); // Allocate an identical sized frame
744 __ mov(I1, Lstate); // In the "natural" register.
753 __ ld_ptr(STATE(_method), Lmethod);
754 __ ld_ptr(STATE(_locals), Llocals);
756 __ callr(G3_scratch, 0);
757 __ delayed()->nop();
758 __ ld_ptr(STATE(_thread), G2_thread); // restore thread (shouldn't be needed)
762 __ ld_ptr(STATE(_method), G5_method);
763 __ ld(access_flags, O0);
764 __ btst(JVM_ACC_STATIC, O0);
765 __ br( Assembler::zero, false, Assembler::pt, not_static);
766 __ delayed()->
772 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: const_offset())), O1);
773 __ ld_ptr(Address(O1, 0, in_bytes(constMethodOopDesc::constants_offset())), O1);
774 __ ld_ptr(Address(O1, 0, constantPoolOopDesc::pool_holder_offset_in_bytes()), O1);
775 __ ld_ptr(O1, mirror_offset, O1);
780 __ tst(O1);
781 __ brx(Assembler::notZero, false, Assembler::pt, L);
782 __ delayed()->nop();
783 __ stop("mirror is missing");
784 __ bind(L);
787 __ st_ptr(O1, STATE(_oop_temp));
788 __ add(STATE(_oop_temp), O1); // this is really an LEA not an add
789 __ bind(not_static);
799 __ tst(O0);
800 __ brx(Assembler::notZero, false, Assembler::pt, L);
801 __ delayed()->nop();
802 __ stop("native entry point is missing");
803 __ bind(L);
821 __ set_last_Java_frame(FP, O7);
822 __ mov(O7, I7); // make dummy interpreter frame look like one above,
828 __ flush_windows();
834 __ set(JavaFrameAnchor::flushed, G3_scratch);
835 __ st(G3_scratch, flags);
842 __ ld(thread_state, G3_scratch);
843 __ cmp(G3_scratch, _thread_in_Java);
844 __ br(Assembler::equal, false, Assembler::pt, L);
845 __ delayed()->nop();
846 __ stop("Wrong thread state in native stub");
847 __ bind(L);
850 __ set(_thread_in_native, G3_scratch);
851 __ st(G3_scratch, thread_state);
854 __ callr(O0, 0);
855 __ delayed()->
857 __ ld_ptr(STATE(_thread), G2_thread); // restore thread
873 __ set(_thread_in_native_trans, G3_scratch);
874 __ st(G3_scratch, thread_state);
880 __ serialize_memory(G2_thread, G1_scratch, G3_scratch);
882 __ load_contents(sync_state, G3_scratch);
883 __ cmp(G3_scratch, SafepointSynchronize::_not_synchronized);
888 __ br(Assembler::notEqual, false, Assembler::pn, L);
889 __ delayed()->
891 __ cmp(G3_scratch, 0);
892 __ br(Assembler::equal, false, Assembler::pt, no_block);
893 __ delayed()->nop();
894 __ bind(L);
899 __ call_VM_leaf(noreg,
902 __ ld_ptr(STATE(_thread), G2_thread); // restore thread
905 __ bind(no_block);
910 __ reset_last_Java_frame();
913 __ mov(Lscratch, G3_scratch);
916 __ mov(O0, I0);
917 __ restore(O1, G0, O1);
919 __ restore(O0, G0, O0);
923 __ mov(G3_scratch, Lscratch);
929 __ set(_thread_in_Java, G3_scratch);
930 __ st(G3_scratch, thread_state);
938 __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch);
939 __ cmp(G3_scratch, Lscratch);
940 __ brx(Assembler::notEqual, false, Assembler::pt, no_oop);
941 __ delayed()->nop();
942 __ addcc(G0, O0, O0);
943 __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL:
944 __ delayed()->ld_ptr(O0, 0, O0); // unbox it
945 __ mov(G0, O0);
947 __ bind(store_result);
949 __ st_ptr(O0, STATE(_oop_temp));
951 __ bind(no_oop);
956 __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), G3_scratch);
957 __ st_ptr(G0, G3_scratch, JNIHandleBlock::top_offset_in_bytes());
964 __ ld_ptr(exception_addr, Gtemp);
965 __ tst(Gtemp);
966 __ brx(Assembler::equal, false, Assembler::pt, L);
967 __ delayed()->nop();
968 __ bind(pending_exception_present);
973 __ br(Assembler::always, false, Assembler::pt, StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
974 __ delayed()->restore(I5_savedSP, G0, SP); // remove interpreter frame
976 __ bind(L);
980 __ notify_method_exit(true, ilgl, InterpreterMacroAssembler::NotifyJVMTI);
988 __ sub(Lstate, entry_size, O1); // initial monitor
989 __ unlock_object(O1);
998 __ sllx(O0, 32, G1); // Shift bits into high G1
999 __ srl (O1, 0, O1); // Zero extend O1
1000 __ or3 (O1, G1, G1); // OR 64 bits into G1
1007 __ cmp(I5_savedSP, FP);
1008 __ brx(Assembler::greaterEqualUnsigned, false, Assembler::pt, ok);
1009 __ delayed()->nop();
1010 __ stop("bad I5_savedSP value");
1011 __ should_not_reach_here();
1012 __ bind(ok);
1018 __ mov(Lscratch, G3_scratch);
1019 __ JMP(G3_scratch, 0);
1021 __ jmp(Lscratch, 0);
1023 __ delayed()->nop();
1027 __ bind(invocation_counter_overflow);
1074 __ lduh( size_of_parameters, Gtmp );
1075 __ calc_mem_param_words(Gtmp, Gtmp); // space for native call parameters passed on the stack in words
1077 __ lduh(max_stack, Gtmp); // Full size expression stack
1079 __ add(Gtmp, fixed_size, Gtmp); // plus the fixed portion
1081 __ neg(Gtmp); // negative space for stack/parameters in words
1082 __ and3(Gtmp, -WordsPerLong, Gtmp); // make multiple of 2 (SP must be 2-word aligned)
1083 __ sll(Gtmp, LogBytesPerWord, Gtmp); // negative space for frame in bytes
1093 __ ld_ptr(G2_thread, in_bytes(Thread::stack_base_offset()), O0);
1094 __ ld_ptr(G2_thread, in_bytes(Thread::stack_size_offset()), O1);
1096 __ sub(O0, O1, O0);
1103 __ set(fudge + (max_pages * os::vm_page_size()), O1);
1105 __ add(O0, O1, O0);
1106 __ sub(O0, Gtmp, O0);
1107 __ cmp(SP, O0);
1108 __ brx(Assembler::greaterUnsigned, false, Assembler::pt, stack_ok);
1109 __ delayed()->nop();
1113 __ call_VM(Oexception, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
1114 __ stop("never reached");
1116 __ bind(stack_ok);
1118 __ save(SP, Gtmp, SP); // setup new frame and register window
1123 __ sub(FP, sizeof(BytecodeInterpreter), state); // Point to new Interpreter state
1124 __ add(state, STACK_BIAS, state ); // Account for 64bit bias
1136 __ set(0xdead0004, O1);
1139 __ st_ptr(Gargs, XXX_STATE(_locals));
1140 __ st_ptr(G0, XXX_STATE(_oop_temp));
1142 __ st_ptr(state, XXX_STATE(_self_link)); // point to self
1143 __ st_ptr(prev_state->after_save(), XXX_STATE(_prev_link)); // Chain interpreter states
1144 __ st_ptr(G2_thread, XXX_STATE(_thread)); // Store javathread
1147 __ st_ptr(G0, XXX_STATE(_bcp));
1149 __ ld_ptr(G5_method, in_bytes(methodOopDesc::const_offset()), O2); // get constMethodOop
1150 __ add(O2, in_bytes(constMethodOopDesc::codes_offset()), O2); // get bcp
1151 __ st_ptr(O2, XXX_STATE(_bcp));
1154 __ st_ptr(G0, XXX_STATE(_mdx));
1155 __ st_ptr(G5_method, XXX_STATE(_method));
1157 __ set((int) BytecodeInterpreter::method_entry, O1);
1158 __ st(O1, XXX_STATE(_msg));
1160 __ ld_ptr(constMethod, O3);
1161 __ ld_ptr(O3, in_bytes(constMethodOopDesc::constants_offset()), O3);
1162 __ ld_ptr(O3, constantPoolOopDesc::cache_offset_in_bytes(), O2);
1163 __ st_ptr(O2, XXX_STATE(_constants));
1165 __ st_ptr(G0, XXX_STATE(_result._to_call._callee));
1168 __ mov(state, O2);
1169 __ st_ptr(O2, XXX_STATE(_monitor_base));
1173 __ ld(access_flags, O1);
1176 __ btst(JVM_ACC_SYNCHRONIZED, O1);
1177 __ br( Assembler::zero, false, Assembler::pt, done);
1180 __ delayed()->btst(JVM_ACC_STATIC, O1);
1181 __ ld_ptr(XXX_STATE(_locals), O1);
1182 __ br( Assembler::zero, true, Assembler::pt, got_obj);
1183 __ delayed()->ld_ptr(O1, 0, O1); // get receiver for not-static case
1184 __ ld_ptr(constMethod, O1);
1185 __ ld_ptr( O1, in_bytes(constMethodOopDesc::constants_offset()), O1);
1186 __ ld_ptr( O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1);
1188 __ ld_ptr( O1, mirror_offset, O1);
1190 __ bind(got_obj);
1193 __ tst(O1);
1194 __ breakpoint_trap(Assembler::zero, Assembler::ptr_cc);
1198 __ sub(SP, entry_size, SP); // account for initial monitor
1199 __ sub(O2, entry_size, O2); // initial monitor
1200 __ st_ptr(O1, O2, BasicObjectLock::obj_offset_in_bytes()); // and allocate it for interpreter use
1201 __ bind(done);
1206 __ st_ptr(SP, XXX_STATE(_frame_bottom));
1208 __ st_ptr(O2, XXX_STATE(_stack_base));
1210 __ sub(O2, wordSize, O2); // prepush
1211 __ st_ptr(O2, XXX_STATE(_stack)); // PREPUSH
1213 __ lduh(max_stack, O3); // Full size expression stack
1216 //6815692// __ inc(O3, methodOopDesc::extra_stack_entries());
1217 __ sll(O3, LogBytesPerWord, O3);
1218 __ sub(O2, O3, O3);
1219 // __ sub(O3, wordSize, O3); // so prepush doesn't look out of bounds
1220 __ st_ptr(O3, XXX_STATE(_stack_limit));
1235 __ set( 0x0F0F0F0F, init_value );
1243 __ lduh( size_of_locals, O2 );
1244 __ lduh( size_of_parameters, O1 );
1245 __ sll( O2, LogBytesPerWord, O2);
1246 __ sll( O1, LogBytesPerWord, O1 );
1247 __ ld_ptr(XXX_STATE(_locals), L2_scratch);
1248 __ sub( L2_scratch, O2, O2 );
1249 __ sub( L2_scratch, O1, O1 );
1251 __ bind( clear_loop );
1252 __ inc( O2, wordSize );
1254 __ cmp( O2, O1 );
1255 __ br( Assembler::lessEqualUnsigned, true, Assembler::pt, clear_loop );
1256 __ delayed()->st_ptr( init_value, O2, 0 );
1269 __ ld_ptr(STATE(_method), L2_scratch);
1270 __ ld(L2_scratch, in_bytes(methodOopDesc::access_flags_offset()), O0);
1273 __ btst(JVM_ACC_SYNCHRONIZED, O0);
1274 __ br( Assembler::notZero, false, Assembler::pt, ok);
1275 __ delayed()->nop();
1276 __ stop("method doesn't need synchronization");
1277 __ bind(ok);
1283 __ ld_ptr(STATE(_stack_base), L2_scratch);
1284 __ ld_ptr(L2_scratch, BasicObjectLock::obj_offset_in_bytes(), O0); // get object
1285 __ lock_object(L2_scratch, O0);
1295 deopt_frame_manager_return_atos = __ pc();
1298 __ ba(return_from_deopt_common);
1299 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_OBJECT), L3_scratch); // Result stub address array index
1303 deopt_frame_manager_return_btos = __ pc();
1306 __ ba(return_from_deopt_common);
1307 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_BOOLEAN), L3_scratch); // Result stub address array index
1310 deopt_frame_manager_return_itos = __ pc();
1313 __ ba(return_from_deopt_common);
1314 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_INT), L3_scratch); // Result stub address array index
1318 deopt_frame_manager_return_ltos = __ pc();
1329 __ srl (G1, 0,O1);
1330 __ srlx(G1,32,O0);
1333 __ ba(return_from_deopt_common);
1334 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_LONG), L3_scratch); // Result stub address array index
1338 deopt_frame_manager_return_ftos = __ pc();
1340 __ ba(return_from_deopt_common);
1341 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_FLOAT), L3_scratch); // Result stub address array index
1344 deopt_frame_manager_return_dtos = __ pc();
1347 __ ba(return_from_deopt_common);
1348 __ delayed()->set(AbstractInterpreter::BasicType_as_index(T_DOUBLE), L3_scratch); // Result stub address array index
1351 deopt_frame_manager_return_vtos = __ pc();
1354 __ set(AbstractInterpreter::BasicType_as_index(T_VOID), L3_scratch);
1360 __ bind(return_from_deopt_common);
1372 __ ld_ptr(STATE(_stack), L1_scratch); // get top of java expr stack
1374 __ set((intptr_t)CppInterpreter::_tosca_to_stack, L4_scratch);
1375 __ sll(L3_scratch, LogBytesPerWord, L3_scratch);
1376 __ ld_ptr(L4_scratch, L3_scratch, Lscratch); // get typed result converter address
1377 __ jmpl(Lscratch, G0, O7); // and convert it
1378 __ delayed()->nop();
1381 __ st_ptr(L1_scratch, STATE(_stack));
1390 __ delayed()->ld_ptr(STATE(_stack_base), L4_scratch); // current expression stack bottom
1391 __ sub(L4_scratch, entry_size, L4_scratch);
1392 __ st_ptr(L4_scratch, STATE(_stack_base));
1394 __ sub(SP, entry_size, SP); // Grow stack
1395 __ st_ptr(SP, STATE(_frame_bottom));
1397 __ ld_ptr(STATE(_stack_limit), L2_scratch);
1398 __ sub(L2_scratch, entry_size, L2_scratch);
1399 __ st_ptr(L2_scratch, STATE(_stack_limit));
1401 __ ld_ptr(STATE(_stack), L1_scratch); // Get current stack top
1402 __ sub(L1_scratch, entry_size, L1_scratch);
1403 __ st_ptr(L1_scratch, STATE(_stack));
1404 __ ba(entry);
1405 __ delayed()->add(L1_scratch, wordSize, L1_scratch); // first real entry (undo prepush)
1409 __ bind(loop);
1410 __ st_ptr(L3_scratch, Address(L1_scratch, 0));
1411 __ add(L1_scratch, wordSize, L1_scratch);
1412 __ bind(entry);
1413 __ cmp(L1_scratch, L4_scratch);
1414 __ br(Assembler::notEqual, false, Assembler::pt, loop);
1415 __ delayed()->ld_ptr(L1_scratch, entry_size, L3_scratch);
1418 __ st_ptr(G0, L4_scratch, BasicObjectLock::obj_offset_in_bytes());
1464 __ ld_ptr(STATE(_self_link), scratch); \
1465 __ cmp(Lstate, scratch); \
1466 __ brx(Assembler::equal, false, Assembler::pt, skip); \
1467 __ delayed()->nop(); \
1468 __ breakpoint_trap(); \
1469 __ emit_long(marker); \
1470 __ bind(skip); \
1491 __ lduh(size_of_parameters, tmp);
1492 __ sll(tmp, LogBytesPerWord, Gtmp); // parameter size in bytes
1493 __ add(args, Gtmp, Gargs); // points to first local + BytesPerWord
1495 __ add(Gargs, -wordSize, Gargs); // points to first local[0]
1498 __ lduh(size_of_locals, Gtmp);
1499 __ compute_extra_locals_size_in_bytes(tmp, Gtmp, Gtmp);
1514 __ add(Gtmp, c2i_adjust_words*wordSize, Gtmp);
1518 __ sub(SP, Gtmp, SP); // just caller's frame for the additional space we need.
1537 __ bind(frame_manager_entry);
1549 address entry_point = __ pc();
1550 __ mov(G0, prevState); // no current activation
1555 __ bind(re_dispatch);
1574 __ bind(call_interpreter);
1578 __ set(0xdead002, Lmirror);
1579 __ set(0xdead002, L2_scratch);
1580 __ set(0xdead003, L3_scratch);
1581 __ set(0xdead004, L4_scratch);
1582 __ set(0xdead005, Lscratch);
1583 __ set(0xdead006, Lscratch2);
1584 __ set(0xdead007, L7_scratch);
1586 __ set(0xdeaf002, O2);
1587 __ set(0xdeaf003, O3);
1588 __ set(0xdeaf004, O4);
1589 __ set(0xdeaf005, O5);
1597 __ bind(call_interpreter_2);
1602 __ ld_ptr(STATE(_frame_bottom), G3_scratch);
1603 __ cmp(G3_scratch, SP);
1604 __ brx(Assembler::equal, false, Assembler::pt, skip);
1605 __ delayed()->nop();
1606 __ stop("SP not restored to frame bottom");
1607 __ bind(skip);
1612 __ set_last_Java_frame(SP, noreg);
1613 __ mov(Lstate, O0); // (arg) pointer to current state
1615 __ call(CAST_FROM_FN_PTR(address,
1621 __ delayed()->nop();
1623 __ ld_ptr(STATE(_thread), G2_thread);
1624 __ reset_last_Java_frame();
1627 __ ld_ptr(STATE(_thread), G2_thread); // restore G2_thread
1629 __ ld(STATE(_msg), L1_scratch); // Get new message
1638 __ cmp(L1_scratch, (int)BytecodeInterpreter::call_method);
1639 __ br(Assembler::equal, false, Assembler::pt, call_method);
1640 __ delayed()->cmp(L1_scratch, (int)BytecodeInterpreter::return_from_method);
1641 __ br(Assembler::equal, false, Assembler::pt, return_from_interpreted_method);
1642 __ delayed()->cmp(L1_scratch, (int)BytecodeInterpreter::throwing_exception);
1643 __ br(Assembler::equal, false, Assembler::pt, throw_exception);
1644 __ delayed()->cmp(L1_scratch, (int)BytecodeInterpreter::do_osr);
1645 __ br(Assembler::equal, false, Assembler::pt, do_OSR);
1646 __ delayed()->cmp(L1_scratch, (int)BytecodeInterpreter::more_monitors);
1647 __ br(Assembler::notEqual, false, Assembler::pt, bad_msg);
1655 __ set((int)BytecodeInterpreter::got_monitors, L1_scratch);
1657 __ ba(call_interpreter);
1658 __ delayed()->st(L1_scratch, STATE(_msg));
1661 unctrap_frame_manager_entry = __ pc();
1665 __ ba(call_interpreter);
1666 __ delayed()->ld_ptr(STATE(_frame_bottom), SP); // restore to full stack frame
1680 __ set((int)BytecodeInterpreter::deopt_resume, L1_scratch);
1681 __ ba(call_interpreter);
1682 __ delayed()->st(L1_scratch, STATE(_msg));
1690 Interpreter::_rethrow_exception_entry = __ pc();
1701 __ verify_thread();
1702 __ st_ptr(O0, exception_addr);
1705 __ ld_ptr(STATE(_method), G5_method);
1709 __ ld(access_flags, Gtmp1);
1710 __ btst(JVM_ACC_NATIVE, Gtmp1);
1711 __ br(Assembler::zero, false, Assembler::pt, return_with_exception); // vanilla interpreted frame handle directly
1712 __ delayed()->nop();
1718 __ bind(unwind_and_forward);
1723 __ restore(FP, G0, SP); // unwind interpreter state frame
1724 __ br(Assembler::always, false, Assembler::pt, StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type);
1725 __ delayed()->mov(I5_savedSP->after_restore(), SP);
1733 address return_from_native_method = __ pc();
1745 __ ld_ptr(STATE(_frame_bottom), SP); // restore to full stack frame
1746 __ ld_ptr(exception_addr, Lscratch); // get any pending exception
1747 __ tst(Lscratch); // exception pending?
1748 __ brx(Assembler::notZero, false, Assembler::pt, return_with_exception);
1749 __ delayed()->nop();
1753 __ ld_ptr(STATE(_result._to_call._callee), L4_scratch); // called method
1754 __ ld_ptr(STATE(_stack), L1_scratch); // get top of java expr stack
1755 __ lduh(L4_scratch, in_bytes(methodOopDesc::size_of_parameters_offset()), L2_scratch); // get parameter size
1756 __ sll(L2_scratch, LogBytesPerWord, L2_scratch ); // parameter size in bytes
1757 __ add(L1_scratch, L2_scratch, L1_scratch); // stack destination for result
1758 __ ld(L4_scratch, in_bytes(methodOopDesc::result_index_offset()), L3_scratch); // called method result type index
1761 __ set((intptr_t)CppInterpreter::_tosca_to_stack, L4_scratch);
1762 __ sll(L3_scratch, LogBytesPerWord, L3_scratch);
1763 __ ld_ptr(L4_scratch, L3_scratch, Lscratch); // get typed result converter address
1764 __ jmpl(Lscratch, G0, O7); // and convert it
1765 __ delayed()->nop();
1769 __ ba(resume_interpreter);
1770 __ delayed()->mov(L1_scratch, O1);
1775 __ bind(return_with_exception);
1777 __ ld_ptr(STATE(_frame_bottom), SP); // restore to full stack frame
1778 __ ld_ptr(STATE(_stack_base), O1); // empty java expression stack
1779 __ ba(resume_interpreter);
1780 __ delayed()->sub(O1, wordSize, O1); // account for prepush
1786 __ bind(return_from_interpreted_method);
1800 __ ld_ptr(STATE(_prev_link), L1_scratch);
1801 __ ld_ptr(STATE(_method), L2_scratch); // get method just executed
1802 __ ld(L2_scratch, in_bytes(methodOopDesc::result_index_offset()), L2_scratch);
1803 __ tst(L1_scratch);
1804 __ brx(Assembler::zero, false, Assembler::pt, return_to_initial_caller);
1805 __ delayed()->sll(L2_scratch, LogBytesPerWord, L2_scratch);
1809 __ set((intptr_t)CppInterpreter::_stack_to_stack, L4_scratch);
1810 __ ld_ptr(L4_scratch, L2_scratch, Lscratch); // get typed result converter address
1811 __ ld_ptr(STATE(_stack), O0); // current top (prepushed)
1812 __ ld_ptr(STATE(_locals), O1); // stack destination
1815 __ jmpl(Lscratch, G0, O7); // and convert it
1816 __ delayed()->add(O0, wordSize, O0); // get source (top of current expr stack)
1825 __ bind(unwind_recursive_activation);
1840 __ mov(O1, I1); // pass back new stack top across activation
1842 __ restore(FP, G0, SP); // unwind interpreter state frame
1843 __ ld_ptr(STATE(_frame_bottom), SP); // restore to full stack frame
1851 __ bind(resume_interpreter);
1856 __ set((int)BytecodeInterpreter::method_resume, L1_scratch);
1857 __ st(L1_scratch, STATE(_msg));
1858 __ ba(call_interpreter_2);
1859 __ delayed()->st_ptr(O1, STATE(_stack));
1868 __ bind(fast_accessor_slow_entry_path);
1869 __ set((intptr_t)return_from_native_method - 8, Gtmp1);
1870 __ cmp(Gtmp1, O7); // returning to interpreter?
1871 __ brx(Assembler::equal, true, Assembler::pt, re_dispatch); // yep
1872 __ delayed()->nop();
1873 __ ba(re_dispatch);
1874 __ delayed()->mov(G0, prevState); // initial entry
1882 __ bind(return_to_initial_caller);
1884 __ set((intptr_t)CppInterpreter::_stack_to_native_abi, L4_scratch);
1885 __ ld_ptr(L4_scratch, L2_scratch, Lscratch); // get typed result converter address
1886 __ ld_ptr(STATE(_stack), O0); // current top (prepushed)
1887 __ jmpl(Lscratch, G0, O7); // and convert it
1888 __ delayed()->add(O0, wordSize, O0); // get source (top of current expr stack)
1891 __ bind(unwind_initial_activation);
1898 // __ ld_ptr(STATE(_saved_sp), Gtmp1);
1901 __ restore(FP, G0, SP);
1902 __ retl();
1903 __ delayed()->mov(I5_savedSP->after_restore(), SP);
1908 __ bind(do_OSR);
1910 __ ld_ptr(STATE(_prev_link), L1_scratch);
1911 __ ld_ptr(STATE(_result._osr._osr_buf), G1_scratch);
1916 __ tst(L1_scratch);
1917 __ brx(Assembler::zero, false, Assembler::pt, remove_initial_frame);
1918 __ delayed()->ld_ptr(STATE(_result._osr._osr_entry), G3_scratch);
1922 __ restore(FP, G0, SP); // unwind interpreter state frame
1923 __ mov(I5_savedSP->after_restore(), SP);
1928 __ set((intptr_t)return_from_native_method - 8, O7);
1930 __ jmpl(G3_scratch, G0, G0);
1931 __ delayed()->mov(G1_scratch, O0);
1933 __ bind(remove_initial_frame);
1936 __ restore(FP, G0, SP);
1937 __ mov(I5_savedSP->after_restore(), SP);
1938 __ jmpl(G3_scratch, G0, G0);
1939 __ delayed()->mov(G1_scratch, O0);
1947 __ bind(call_method);
1952 __ ld_ptr(STATE(_thread), G2_thread);
1953 __ ld_ptr(STATE(_result._to_call._callee), G5_method);
1962 __ ld_ptr(STATE(_stack), Gargs);
1963 __ ld_ptr(STATE(_stack_limit), L1_scratch);
1966 __ sub(Gargs, L1_scratch, L2_scratch); // compute unused space
1971 __ and3(L2_scratch, -2*BytesPerLong, L2_scratch);
1974 __ add(SP, L2_scratch, SP);
1978 __ add(Gargs, wordSize, Gargs);
1981 __ sub(Gargs, SP, L1_scratch);
1982 __ cmp(L1_scratch, 16*wordSize);
1985 __ brx(Assembler::greaterEqual, false, Assembler::pt, skip);
1986 __ delayed()->nop();
1987 __ stop("killed stack");
1988 __ bind(skip);
2000 __ set(CAST_FROM_FN_PTR(intptr_t, RecursiveInterpreterActivation), O7);
2002 __ mov(Lstate, I0);
2005 __ mov(SP, O5_savedSP);
2007 __ ld_ptr(STATE(_result._to_call._callee_entry_point), L2_scratch);
2008 __ set((intptr_t) entry_point, L1_scratch);
2009 __ cmp(L1_scratch, L2_scratch);
2010 __ brx(Assembler::equal, false, Assembler::pt, re_dispatch);
2011 __ delayed()->mov(Lstate, prevState); // link activations
2017 __ set((intptr_t)return_from_native_method - 8, O7);
2018 __ jmpl(L2_scratch, G0, G0); // Do specialized entry
2019 __ delayed()->nop();
2024 __ bind(bad_msg);
2025 __ stop("Bad message from interpreter");
2031 __ bind(throw_exception);
2032 __ ld_ptr(STATE(_prev_link), L1_scratch);
2033 __ tst(L1_scratch);
2034 __ brx(Assembler::zero, false, Assembler::pt, unwind_and_forward);
2035 __ delayed()->nop();
2037 __ ld_ptr(STATE(_locals), O1); // get result of popping callee's args
2038 __ ba(unwind_recursive_activation);
2039 __ delayed()->nop();