749
750
751 // call signature handler
752 __ ld_ptr(STATE(_method), Lmethod);
753 __ ld_ptr(STATE(_locals), Llocals);
754
755 __ callr(G3_scratch, 0);
756 __ delayed()->nop();
757 __ ld_ptr(STATE(_thread), G2_thread); // restore thread (shouldn't be needed)
758
759 { Label not_static;
760
761 __ ld_ptr(STATE(_method), G5_method);
762 __ ld(access_flags, O0);
763 __ btst(JVM_ACC_STATIC, O0);
764 __ br( Assembler::zero, false, Assembler::pt, not_static);
765 __ delayed()->
766 // get native function entry point(O0 is a good temp until the very end)
767 ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::native_function_offset())), O0);
768 // for static methods insert the mirror argument
769 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes();
770
771 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: constants_offset())), O1);
772 __ ld_ptr(Address(O1, 0, constantPoolOopDesc::pool_holder_offset_in_bytes()), O1);
773 __ ld_ptr(O1, mirror_offset, O1);
774 // where the mirror handle body is allocated:
775 #ifdef ASSERT
776 if (!PrintSignatureHandlers) // do not dirty the output with this
777 { Label L;
778 __ tst(O1);
779 __ brx(Assembler::notZero, false, Assembler::pt, L);
780 __ delayed()->nop();
781 __ stop("mirror is missing");
782 __ bind(L);
783 }
784 #endif // ASSERT
785 __ st_ptr(O1, STATE(_oop_temp));
786 __ add(STATE(_oop_temp), O1); // this is really an LEA not an add
787 __ bind(not_static);
788 }
789
1156 __ st(O1, XXX_STATE(_msg));
1157
1158 __ ld_ptr(constants, O3);
1159 __ ld_ptr(O3, constantPoolOopDesc::cache_offset_in_bytes(), O2);
1160 __ st_ptr(O2, XXX_STATE(_constants));
1161
1162 __ st_ptr(G0, XXX_STATE(_result._to_call._callee));
1163
1164 // Monitor base is just start of BytecodeInterpreter object;
1165 __ mov(state, O2);
1166 __ st_ptr(O2, XXX_STATE(_monitor_base));
1167
1168 // Do we need a monitor for synchonized method?
1169 {
1170 __ ld(access_flags, O1);
1171 Label done;
1172 Label got_obj;
1173 __ btst(JVM_ACC_SYNCHRONIZED, O1);
1174 __ br( Assembler::zero, false, Assembler::pt, done);
1175
1176 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes();
1177 __ delayed()->btst(JVM_ACC_STATIC, O1);
1178 __ ld_ptr(XXX_STATE(_locals), O1);
1179 __ br( Assembler::zero, true, Assembler::pt, got_obj);
1180 __ delayed()->ld_ptr(O1, 0, O1); // get receiver for not-static case
1181 __ ld_ptr(constants, O1);
1182 __ ld_ptr( O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1);
1183 // lock the mirror, not the klassOop
1184 __ ld_ptr( O1, mirror_offset, O1);
1185
1186 __ bind(got_obj);
1187
1188 #ifdef ASSERT
1189 __ tst(O1);
1190 __ breakpoint_trap(Assembler::zero);
1191 #endif // ASSERT
1192
1193 const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
1194 __ sub(SP, entry_size, SP); // account for initial monitor
1195 __ sub(O2, entry_size, O2); // initial monitor
1196 __ st_ptr(O1, O2, BasicObjectLock::obj_offset_in_bytes()); // and allocate it for interpreter use
|
749
750
751 // call signature handler
752 __ ld_ptr(STATE(_method), Lmethod);
753 __ ld_ptr(STATE(_locals), Llocals);
754
755 __ callr(G3_scratch, 0);
756 __ delayed()->nop();
757 __ ld_ptr(STATE(_thread), G2_thread); // restore thread (shouldn't be needed)
758
759 { Label not_static;
760
761 __ ld_ptr(STATE(_method), G5_method);
762 __ ld(access_flags, O0);
763 __ btst(JVM_ACC_STATIC, O0);
764 __ br( Assembler::zero, false, Assembler::pt, not_static);
765 __ delayed()->
766 // get native function entry point(O0 is a good temp until the very end)
767 ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::native_function_offset())), O0);
768 // for static methods insert the mirror argument
769 const int mirror_offset = Klass::java_mirror_offset_in_bytes();
770
771 __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: constants_offset())), O1);
772 __ ld_ptr(Address(O1, 0, constantPoolOopDesc::pool_holder_offset_in_bytes()), O1);
773 __ ld_ptr(O1, mirror_offset, O1);
774 // where the mirror handle body is allocated:
775 #ifdef ASSERT
776 if (!PrintSignatureHandlers) // do not dirty the output with this
777 { Label L;
778 __ tst(O1);
779 __ brx(Assembler::notZero, false, Assembler::pt, L);
780 __ delayed()->nop();
781 __ stop("mirror is missing");
782 __ bind(L);
783 }
784 #endif // ASSERT
785 __ st_ptr(O1, STATE(_oop_temp));
786 __ add(STATE(_oop_temp), O1); // this is really an LEA not an add
787 __ bind(not_static);
788 }
789
1156 __ st(O1, XXX_STATE(_msg));
1157
1158 __ ld_ptr(constants, O3);
1159 __ ld_ptr(O3, constantPoolOopDesc::cache_offset_in_bytes(), O2);
1160 __ st_ptr(O2, XXX_STATE(_constants));
1161
1162 __ st_ptr(G0, XXX_STATE(_result._to_call._callee));
1163
1164 // Monitor base is just start of BytecodeInterpreter object;
1165 __ mov(state, O2);
1166 __ st_ptr(O2, XXX_STATE(_monitor_base));
1167
1168 // Do we need a monitor for synchonized method?
1169 {
1170 __ ld(access_flags, O1);
1171 Label done;
1172 Label got_obj;
1173 __ btst(JVM_ACC_SYNCHRONIZED, O1);
1174 __ br( Assembler::zero, false, Assembler::pt, done);
1175
1176 const int mirror_offset = Klass::java_mirror_offset_in_bytes();
1177 __ delayed()->btst(JVM_ACC_STATIC, O1);
1178 __ ld_ptr(XXX_STATE(_locals), O1);
1179 __ br( Assembler::zero, true, Assembler::pt, got_obj);
1180 __ delayed()->ld_ptr(O1, 0, O1); // get receiver for not-static case
1181 __ ld_ptr(constants, O1);
1182 __ ld_ptr( O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1);
1183 // lock the mirror, not the klassOop
1184 __ ld_ptr( O1, mirror_offset, O1);
1185
1186 __ bind(got_obj);
1187
1188 #ifdef ASSERT
1189 __ tst(O1);
1190 __ breakpoint_trap(Assembler::zero);
1191 #endif // ASSERT
1192
1193 const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
1194 __ sub(SP, entry_size, SP); // account for initial monitor
1195 __ sub(O2, entry_size, O2); // initial monitor
1196 __ st_ptr(O1, O2, BasicObjectLock::obj_offset_in_bytes()); // and allocate it for interpreter use
|